Page 4 of 10
Re: 15326 - [WebServer] Depricated RType
Posted: Wednesday 14 June 2023 14:25
by pipiche
jvdz wrote:waltervl wrote: βWednesday 14 June 2023 0:36
The app will probably change only after the current beta is promoted to stable else the app will not work on current stable.
Which is an issue when there is no backward compatibility build into the APP since a hard cut change would mean everybody needs to upgrade Domoticz immediately when the app changes!
To avoid putting the burden onto the developers of APPS and other external processes and hard cutoffs, these "breaking change" really should be implemented over 2 releases:
- First release (now) the new and old format API should work without it triggering all these errors in the logfile and informing everyone of start making the changes to the APIs in their external APPs/Fornt-ends/Batch processes.
- Next release (Beta&Prod after current Beta went into production) the new and old format API should work, but now implement the errors in the logfile so people know this is really happening.
- 2nd Next release (Beta&Prod) stop support for old API format.
This way everybody gets the time to make the adaptions and upgrades in their own time.
Just my 2 cents.

This is exactly the perfect way to do it. Unfortunately that has not been so often the case. Look after the new blind behaviour.
I do hope that for the API we will apply those approach
EnvoyΓ© de mon iPhone en utilisant Tapatalk
Re: 15326 - [WebServer] Depricated RType
Posted: Wednesday 14 June 2023 15:27
by jvdz
The blinds chamge is not the same situation as that really needed to be changed to make it work the way it should have been in the first place and there is no option to make it backwards compatible, so you have to bite that bullet and go for it.
The API change mak s sense but is very easy to keep backward compatibility for a couple of release.
Re: 15326 - [WebServer] Depricated RType
Posted: Wednesday 14 June 2023 20:14
by pipiche
jvdz wrote: βWednesday 14 June 2023 15:27
The blinds chamge is not the same situation as that really needed to be changed to make it work the way it should have been in the first place and there is no option to make it backwards compatible, so you have to bite that bullet and go for it.
The API change mak s sense but is very easy to keep backward compatibility for a couple of release.
I do not fully agree, as they were a possibility to have backward capability by a settings in the Domoticz settings.
Re: 15326 - [WebServer] Depricated RType
Posted: Wednesday 14 June 2023 20:18
by jvdz
That's fine, but adding an option doesn't do anything on the app side and is still a hard cut-over so nothing to fo with backward compatibility as it doesn't support both at the same time. .... Either way, let's not wordsmith too much and get back on the topic at hand: the change of the API format.

Re: 15326 - [WebServer] Depricated RType
Posted: Saturday 17 June 2023 18:43
by Kedi
There are still a few 'old' calls left in dzVents/runtime/device-adaptors/*
Will they be changed to the 'new' call?
Re: 15326 - [WebServer] Depricated RType
Posted: Saturday 17 June 2023 19:27
by kiddigital
Kedi wrote:There are still a few 'old' calls left in dzVents/runtime/device-adaptors/*
Will they be changed to the 'new' call?
Found those as well. Will try to update those as well.
Re: 15326 - [WebServer] Depricated RType
Posted: Saturday 17 June 2023 19:35
by jvdz
Tried to report them all previously
jvdz wrote: βTuesday 06 June 2023 9:28
Isn't dzVents causing these messages too as I see some 28 references that needs changing in the current github source of which 12 seem to be in the core code?:
Code: Select all
\domoticz\dzVents\runtime\device-adapters\evohome_device.lua
43,7: "/json.htm?type=setused&idx=" .. device.id ..
\domoticz\dzVents\runtime\device-adapters\generic_device.lua
153,6: '/json.htm?type=setused&used=true&name=' ..
172,8: '/json.htm?type=setused&used=true&protected=true' ..
179,8: '/json.htm?type=setused&used=true&protected=false' ..
\domoticz\dzVents\runtime\device-adapters\group_device.lua
56,8: '/json.htm?type=updatescene&scenetype=1' ..
64,54: local url = domoticz.settings['Domoticz url'] .. '/json.htm?type=updatescene&scenetype=1' ..
72,54: local url = domoticz.settings['Domoticz url'] .. '/json.htm?type=updatescene&scenetype=1&protected=true' ..
80,54: local url = domoticz.settings['Domoticz url'] .. '/json.htm?type=updatescene&scenetype=1&protected=false' ..
\domoticz\dzVents\runtime\device-adapters\scene_device.lua
51,54: local url = domoticz.settings['Domoticz url'] .. '/json.htm?type=updatescene&scenetype=0' ..
59,54: local url = domoticz.settings['Domoticz url'] .. '/json.htm?type=updatescene&scenetype=0' ..
67,54: local url = domoticz.settings['Domoticz url'] .. '/json.htm?type=updatescene&scenetype=0&protected=true' ..
75,54: local url = domoticz.settings['Domoticz url'] .. '/json.htm?type=updatescene&scenetype=0&protected=false' ..
\domoticz\dzVents\runtime\integration-tests\descriptionScript.lua
16,49: local url = dz.settings['Domoticz url'] .. "/json.htm?type=scenes"
\domoticz\dzVents\runtime\integration-tests\domoticzTestTools.lua
285,27: -- http://localhost:8080/json.htm?type=hardware
338,26: --http://localhost:8080/json.htm?type=setused&idx=1&name=vdSwitch&description=des&strparam1=&strparam2=&protected=false&switchtype=0&customimage=0&used=true&addjvalue=0&addjvalue2=0&options=
\domoticz\dzVents\runtime\integration-tests\IconScript.lua
12,49: local url = dz.settings['Domoticz url'] .. '/json.htm?type=devices&rid=' .. item.id
\domoticz\dzVents\runtime\tests\testDevice.lua
672,41: assert.is_same('http://127.0.0.1:8080/json.htm?type=setused&used=true&protected=false&idx=1', res)
688,41: assert.is_same('http://127.0.0.1:8080/json.htm?type=setused&used=true&protected=false&idx=1', res)
722,41: assert.is_same('http://127.0.0.1:8080/json.htm?type=setused&used=true&name=myDevice&description=Description+1&idx=1&switchtype=2&customimage=24', res)
805,41: assert.is_same('http://127.0.0.1:8080/json.htm?type=setused&idx=1&setpoint=&state=Off&mode=Permanent&used=true', res)
1551,42: assert.is_same('http://127.0.0.1:8080/json.htm?type=updatescene&scenetype=0&protected=false&idx=1&name=myScene&description=Description+1', res)
1554,42: assert.is_same('http://127.0.0.1:8080/json.htm?type=updatescene&scenetype=0&protected=true&idx=1&name=myScene&description=Description+1', res)
1557,42: assert.is_same('http://127.0.0.1:8080/json.htm?type=updatescene&scenetype=0&idx=1&name=a&description=Description+1', res)
1560,42: assert.is_same('http://127.0.0.1:8080/json.htm?type=updatescene&scenetype=0&idx=1&name=myScene&description=groupie', res)
1622,42: assert.is_same('http://127.0.0.1:8080/json.htm?type=updatescene&scenetype=1&protected=false&idx=1&name=myGroup&description=Description+1', res)
1625,42: assert.is_same('http://127.0.0.1:8080/json.htm?type=updatescene&scenetype=1&protected=true&idx=1&name=myGroup&description=Description+1', res)
1628,42: assert.is_same('http://127.0.0.1:8080/json.htm?type=updatescene&scenetype=1&idx=1&name=a&description=Description+1', res)
1631,42: assert.is_same('http://127.0.0.1:8080/json.htm?type=updatescene&scenetype=1&idx=1&name=myGroup&description=groupie', res)
Re: 15326 - [WebServer] Depricated RType
Posted: Sunday 18 June 2023 7:04
by keros
kiddigital wrote: βWednesday 07 June 2023 21:37
Just enable the `webserver` debug flag and you will see a lot more details from the webserver.
Where do you do this ?
I have about 4 error by minutes and I can not figure out where it comes from.
I checked all my scripts, all the scripts links inside the devices, all my external script. I see nothng special.
Perhaps it would help if we have a print of the api command in the log next to the message in order to see what call creates the error.
Re: 15326 - [WebServer] Depricated RType
Posted: Sunday 18 June 2023 8:15
by kiddigital
keros wrote:kiddigital wrote: βWednesday 07 June 2023 21:37
Just enable the `webserver` debug flag and you will see a lot more details from the webserver.
Where do you do this ?
I have about 4 error by minutes and I can not figure out where it comes from.
I checked all my scripts, all the scripts links inside the devices, all my external script. I see nothng special.
Perhaps it would help if we have a print of the api command in the log next to the message in order to see what call creates the error.
The status message tells you which RType command is called and from which IP the request is coming from. (And if it is handled via fallback or not).
Re: 15326 - [WebServer] Depricated RType
Posted: Sunday 18 June 2023 8:29
by Kedi
keros wrote: βSunday 18 June 2023 7:04
kiddigital wrote: βWednesday 07 June 2023 21:37
Just enable the `webserver` debug flag and you will see a lot more details from the webserver.
Where do you do this ?
It is done in /etc/init.d/domoticz.sh by adding at the end of the other "DEAMON_ARGS":
Code: Select all
DAEMON_ARGS="$DAEMON_ARGS -debuglevel webserver"
and do
Code: Select all
sudo systemctl daemon-reload
sudo systemctl restart domoticz.service
Re: 15326 - [WebServer] Depricated RType
Posted: Sunday 18 June 2023 11:45
by keros
@kiddigital, the request was from 127.0.0.1 so it doesn't help a lot.
@Kedi, thank you very much for the explainations. I have isolated the logs :
2023-06-18 11:34:28.970 Status: [WebServer] Depricated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (127.0.0.1)
2023-06-18 11:34:28.994 Status: [WebServer] Depricated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (127.0.0.1)
2023-06-18 11:34:28.961 Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=devices&rid=40
2023-06-18 11:34:28.962 Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-06-18 11:34:28.962 Debug: CWebServer::GetJSonPage(rtype) :devices :/json.htm?type=devices&rid=40
2023-06-18 11:34:28.987 Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=devices&rid=41
2023-06-18 11:34:28.988 Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-06-18 11:34:28.988 Debug: CWebServer::GetJSonPage(rtype) :devices :/json.htm?type=devices&rid=41
The device 40 and 41 is an Aqara Temp+Hum+Bar device managed by the Z4D plugin.
The only thing I do with this device is a dzvent script running each minutes to compare the humidity. But the errors doesn't match this timing.
Re: 15326 - [WebServer] Depricated RType
Posted: Sunday 18 June 2023 12:33
by jvdz
Think you basically gave the answer as it likely is the z4d plug-in itself doing this API call. Did you check it's source?
Re: 15326 - [WebServer] Depricated RType
Posted: Sunday 18 June 2023 13:53
by keros
I looked at the source, and it seems that the plugin check the API version and use the old or the new call api.
I tried to stop the plugin : almost all the errors stopped, but it is not necessarily the plugin fault. Perhaps it is something using this device and if the plugin is stopped, the device is no more available > so the errors stop.
I have asked Pipiche to be sure.
Re: 15326 - [WebServer] Depricated RType
Posted: Sunday 18 June 2023 16:15
by jvdz
Not sure where you looked, but when I check the Github source I only see "DOMOTICZ_DEVICEST_API = "type=devices&rid="" in DomoticzDB.py?
EDIT: ... or are you running the Development branch, which indeed has a check for version in it?
Re: 15326 - [WebServer] Depricated RType
Posted: Sunday 18 June 2023 16:35
by keros
I am running the developpment branch with the check of version.
Re: 15326 - [WebServer] Depricated RType
Posted: Monday 19 June 2023 16:02
by waltervl
In latest beta the list of changed API calls has been increased, see the wiki for an overview:
https://www.domoticz.com/wiki/Domoticz_ ... d_newer.29
Re: 15326 - [WebServer] Depricated RType
Posted: Wednesday 21 June 2023 20:12
by keros
It is solved with the latest versions of DomoticZ and the Z4D plugin. Thank you.
Re: 15326 - [WebServer] Depricated RType
Posted: Thursday 22 June 2023 14:46
by a3vd
I still have the error :
Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command!
I know now that it is the domoticz-rooted-toon but in the plugin.py i can not find any /json.htm?type can anyone help me where to look

Re: 15326 - [WebServer] Depricated RType
Posted: Friday 23 June 2023 11:07
by EdwinK
It looked like the error was gone for me, but now I see it's still there. In my case it has to do with Dashticz
Re: 15326 - [WebServer] Depricated RType
Posted: Monday 26 June 2023 14:03
by Derik
mmm Here also some error's:
Code: Select all
2023-06-26 14:01:07.579 Status: [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (127.0.0.1)
2023-06-26 14:01:07.583 Status: [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (127.0.0.1)
2023-06-26 14:01:07.651 Status: [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (127.0.0.1)
2023-06-26 14:01:07.655 Status: [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (127.0.0.1)
2023-06-26 14:01:07.717 Status: [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (127.0.0.1)
2023-06-26 14:01:07.722 Status: [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (127.0.0.1)
2023-06-26 14:01:07.798 Status: [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (127.0.0.1)
2023-06-26 14:01:07.802 Status: [WebServer] Deprecated RType (devices) for API request. Handled via fallback (g
Is this mean i have 7 errors with api calls?
Only how can i find this in all my scripts?
I can not script i am a user..
Is there a way how i can check te places in code for this error?