15326 - [WebServer] Depricated RType Topic is solved

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
pipiche
Posts: 1977
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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.
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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. 😉
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: 15326 - [WebServer] Depricated RType

Post by Kedi »

There are still a few 'old' calls left in dzVents/runtime/device-adaptors/*
Will they be changed to the 'new' call?
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
kiddigital
Posts: 435
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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)
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
keros
Posts: 75
Joined: Saturday 27 July 2019 0:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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.
Moderator on Easydomoticz.com, the French DomoticZ forum.
French writer for ZigBeeForDomoticZ Plugin Wiki
User avatar
kiddigital
Posts: 435
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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).
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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
Logic will get you from A to B. Imagination will take you everywhere.
keros
Posts: 75
Joined: Saturday 27 July 2019 0:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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.
Moderator on Easydomoticz.com, the French DomoticZ forum.
French writer for ZigBeeForDomoticZ Plugin Wiki
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
keros
Posts: 75
Joined: Saturday 27 July 2019 0:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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.
Moderator on Easydomoticz.com, the French DomoticZ forum.
French writer for ZigBeeForDomoticZ Plugin Wiki
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
keros
Posts: 75
Joined: Saturday 27 July 2019 0:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: 15326 - [WebServer] Depricated RType

Post by keros »

I am running the developpment branch with the check of version.
Moderator on Easydomoticz.com, the French DomoticZ forum.
French writer for ZigBeeForDomoticZ Plugin Wiki
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
keros
Posts: 75
Joined: Saturday 27 July 2019 0:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: 15326 - [WebServer] Depricated RType

Post by keros »

It is solved with the latest versions of DomoticZ and the Z4D plugin. Thank you.
Moderator on Easydomoticz.com, the French DomoticZ forum.
French writer for ZigBeeForDomoticZ Plugin Wiki
User avatar
a3vd
Posts: 22
Joined: Tuesday 25 February 2014 14:02
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Noordwijk, The Netherlands
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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 :shock:
Raspberry 3+ / 4
P1 smartcable / RFXtrx433 FW 182 / Several 1 wire Temp Sensors /DHT12/Conbee2 (zigbee)
Several Kaku switches/ Weather Underground / Hue
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: 15326 - [WebServer] Depricated RType

Post 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?
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest