Page 5 of 10
Re: 15326 - [WebServer] Depricated RType
Posted: Monday 26 June 2023 15:04
by lost
Derik wrote: ↑Monday 26 June 2023 14:03
Is there a way how i can check te places in code for this error?
Message states that (new) getdevices is handled (so no functional issue until old APIs are removed) but via a compatibility fallback.
This one is even in the examples on the wiki that document theses changes:
https://www.domoticz.com/wiki/Domoticz_ ... d_newer.29
=> You should search for JSON API "type=devices" call that should become "type=command¶m=getdevices" in your script files IMO.
In your case, this looks to spam a lot, but IMO this is just as a result of (too?) heavy use of this API that already existed (some active wait/pooling loop that should be modified to relax a bit on this call?) in some script.
Re: 15326 - [WebServer] Depricated RType
Posted: Thursday 29 June 2023 19:33
by pierrotori
i migrate in the beta version and update all my lua scripts with the new syntax, but i have always the messge error
Code: Select all
[WebServer] Deprecated RType (devices) for API request. Handled via fallback
i use only the standard plugin
Perhaps the standard plugin in domoticz use the syntax ?
Re: 15326 - [WebServer] Depricated RType
Posted: Thursday 29 June 2023 20:23
by kiddigital
The standard plugin for what? Domoticz does not have a standard ‘plugin’. What do you refer to? Maybe screenshot?
Re: 15326 - [WebServer] Depricated RType
Posted: Thursday 29 June 2023 20:27
by pierrotori
perhaps
MQTT Auto Discovery Client Gateway with LAN interface
MQTT Client Gateway with LAN interface
Re: 15326 - [WebServer] Depricated RType
Posted: Thursday 29 June 2023 20:39
by Kedi
That's not a plugin, but "internal hardware", and that does not use those API calls.
And if you use the latest beta, the error should be a little bit more descriptive.
15326 - [WebServer] Depricated RType
Posted: Thursday 29 June 2023 21:22
by pierrotori
ok, but i put all debug but i don"t have more detail on the error webserver, always
Code: Select all
2023-06-29 21:19:06.889 Status: [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (192.168.0.6)
Re: 15326 - [WebServer] Depricated RType
Posted: Thursday 29 June 2023 21:39
by Kedi
I suppose that 192.168.0.6 is you domoticz server?
If you have debug on than just before and after this message there should be some info about what triggered the message.
Re: 15326 - [WebServer] Depricated RType
Posted: Friday 30 June 2023 11:04
by pierrotori
yes 192.168.0.6 it's my domoticz ip
no info about what triggered the message, only the message
Re: 15326 - [WebServer] Depricated RType
Posted: Friday 30 June 2023 11:57
by kiddigital
So something runs on your domoticz that still uses the old command.
The domoticz hardware modules have no need to call the API as they use internal functions.
So some scripts, etc. runs on your domoticz machine causing those messages.
But you could try disabling hardware module and see what happens.
15326 - [WebServer] Depricated RType
Posted: Friday 30 June 2023 19:02
by pierrotori
--Configuration --
rpi : Raspberry Pi 2 Model B Rev 1.1
Os Name : bullseye Release: 11
--Software Domoticz bash--
Version: 2023.1 (build 15369)
Compile Date: 2023-06-22 07:56:08
dzVents Version: 3.1.8
Python Version: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
--Software Mosquitto sh --
mosquitto version 2.0.15
mosquitto is an MQTT v5.0/v3.1.1/v3.1 broker.
--Software zwave-js-ui sh --
npm version : 9.5.0
Node version : v18.14.2
And full docker
i have only the lua script
Code: Select all
sudo grep --include=*.lua -rn -e "/json.htm?type"
local url = dw.settings['http://127.0.0.1:8080'] .. '/json.htm?type=command¶m=setused&used=true&name=' .. dz.utils.urlEncode(item.name) ..
URLString = URLString .. "://127.0.0.1:"..cdd_port.."/json.htm?type=command¶m=getdevices&used=true"
URLString = URLString .. "://127.0.0.1:"..cdd_port.."/json.htm?type=command¶m=getdevices&used=true&username="..cdd_username.."&password="..cdd_password
local custom_action = "http://"..serv_ip..":"..serv_port.."/json.htm?type=command¶m=customevent&event="
dz.openURL("http://127.0.0.1:8080/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=1")
dz.openURL("http://127.0.0.1:8080/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=2")
dz.openURL("http://127.0.0.1:8080/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=4")
dz.openURL("http://127.0.0.1:8080/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=3")
local URLGetPlanning = 'http://127.0.0.1:8080/json.htm?type=command¶m=getschedules&filter=device'
local URLPlanningOn = 'http://127.0.0.1:8080/json.htm?type=command¶m=enabletimer&idx='
local URLPlanningOff = 'http://127.0.0.1:8080/json.htm?type=command¶m=disabletimer&idx='
local URLGetPlanning = 'http://127.0.0.1:8080/json.htm?type=command¶m=getschedules&filter=device'
local URLPlanningOn = 'http://127.0.0.1:8080/json.htm?type=command¶m=enabletimer&idx='
local URLPlanningOff = 'http://127.0.0.1:8080/json.htm?type=command¶m=disabletimer&idx='
local url ='http://127.0.1:8080/json.htm?type=command¶m=udevice&idx='..id..'&nvalue='..nValue..'&svalue='..sValue
and sh script
Code: Select all
sudo grep --include=*.sh -rn -e "/json.htm?type"
res=`curl -s "http://$home_ip:8080/json.htm?type=command¶m=getdevices&rid=$internet_device"`
res=$(curl -s "http://$home_ip:8080/json.htm?type=command¶m=getdevices&rid=$internet_device" | jq -r '.result[0].Status')
Re: 15326 - [WebServer] Depricated RType
Posted: Friday 30 June 2023 21:49
by jvdz
Do you have any hardware defined that is a plugin?
If so try disabling it and see if the message goes away.
Re: 15326 - [WebServer] Depricated RType
Posted: Saturday 01 July 2023 10:34
by pierrotori
no hardware plugin
Re: 15326 - [WebServer] Depricated RType
Posted: Saturday 01 July 2023 17:34
by boum
Small question about the change described in
https://www.domoticz.com/wiki/Domoticz_ ... d_newer.29
Since every API request has now "type=command", what is the point of ever having the "type" parameter?
Re: 15326 - [WebServer] Depricated RType
Posted: Saturday 01 July 2023 17:46
by kiddigital
Correct.. type=command will become optional overtime..
Before several ways of calling API commands existed (still do). Harmonizing these make things easier (also less code and less error prone).
The code cleanup opens the possibility to introduce a V2 (open)api for future developments.
Re: 15326 - [WebServer] Depricated RType
Posted: Sunday 09 July 2023 8:42
by pierrotori
when i add a value in the selector switch ja have thos error in the log
2023-07-09 08:40:20.421 Status: [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (192.168.0.6)
Could you check please ?
Re: 15326 - [WebServer] Depricated RType
Posted: Sunday 09 July 2023 9:20
by kiddigital
pierrotori wrote:when i add a value in the selector switch ja have thos error in the log
Not sure what/where you mean. Please add a screenshot and steps to repeat.
Re: 15326 - [WebServer] Depricated RType
Posted: Sunday 09 July 2023 9:46
by pierrotori
in fact you are right
it's seem that it's
this commande generate
Code: Select all
http://127.0.0.1:8080/json.htm?type=setused&used=true&name=lune&description=&idx=293&switchtype=18&customimage=112
or
this error
[WebServer] Deprecated RType (setused) for API request. Handled via fallback (setused), please use correct API Command! (127.0.0.1)
Re: 15326 - [WebServer] Depricated RType
Posted: Tuesday 11 July 2023 23:12
by kiddigital
pierrotori wrote: ↑Sunday 09 July 2023 9:46
in fact you are right
it's seem that it's
this commande generate
Code: Select all
http://127.0.0.1:8080/json.htm?type=setused&used=true&name=lune&description=&idx=293&switchtype=18&customimage=112
...
this error
[WebServer] Deprecated RType (setused) for API request. Handled via fallback (setused), please use correct API Command! (127.0.0.1)
change the
to
and the message will be gone.
Re: 15326 - [WebServer] Depricated RType
Posted: Friday 28 July 2023 13:26
by Nefsolive
hello!
After the update version 2023.2, wen i open domoticz App i recebe mensage log;
[WebServer] Deprecated RType (graph) for API request. Handled via fallback (graph), please use correct API Command!
[WebServer] Deprecated RType (users) for API request. Handled via fallback (getusers), please use correct API Command!
[WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command!
And domoticz app not show events! say "UPSS! no data domoticz server"
Any app update coming!
Anyone whit this probleam too?
Re: 15326 - [WebServer] Depricated RType
Posted: Friday 28 July 2023 13:30
by waltervl
Nefsolive wrote: ↑Friday 28 July 2023 13:26
hello!
After the update version 2023.2, wen i open domoticz App i recebe mensage log;
[WebServer] Deprecated RType (graph) for API request. Handled via fallback (graph), please use correct API Command!
[WebServer] Deprecated RType (users) for API request. Handled via fallback (getusers), please use correct API Command!
[WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command!
And domoticz app not show events! say "UPSS! no data domoticz server"
Any app update coming!
Anyone whit this probleam too?
Android App owner/author is warned for this change.
https://github.com/domoticz/domoticz-android/issues/692