15326 - [WebServer] Depricated RType Topic is solved
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.
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.
- 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
Didn't think of that one. I have the Machinon theme in use. Trying to switch to default one now.
Edit: It did fix the camera thing, but the devices error still come up. So i guess I need to look further into this.
Edit: It did fix the camera thing, but the devices error still come up. So i guess I need to look further into this.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Re: 15326 - [WebServer] Depricated RType
Ok thanks for the answer.kiddigital wrote: ↑Monday 05 June 2023 7:06 No mistake, matter of cleaning up old inconsistencies.
Should be easy to fix. Maybe ask the either the author to fix it for you or do it yourself.
Look for the API calls that do not start with `type=command`.
Example `type=devices` should become `type=command¶m=getdevices`
Hum many troubles for not a lot...
I revert to a backup but I'm facing something weird. I do not have all the switches in the "switch" tab... the list is short whereas they are all in the device list.
getting crazy after this update... lesson learnt : stop beta !
Is there a way to update to a specific version of domotics? for instance I'm in build 15178, how do I do to go to build 15191 for instance?
- 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
The following RTypes have been migrated to their appropriate Command alternatives
A small set of the RTypes still work as they are mapped to their new Commands:
When ever an RType API call is received, a message will appear in the log.
Code: Select all
// Migrated RTypes to regular commands
RegisterCommandCode("getusers", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetUsers(session, req, root); });
RegisterCommandCode("getsettings", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetSettings(session, req, root); });
RegisterCommandCode("getdevices", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetDevices(session, req, root); });
RegisterCommandCode("gethardware", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetHardware(session, req, root); });
RegisterCommandCode("events", [this](auto&& session, auto&& req, auto&& root) { Cmd_Events(session, req, root); });
RegisterCommandCode("getnotifications", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetNotifications(session, req, root); });
RegisterCommandCode("createvirtualsensor", [this](auto&& session, auto&& req, auto&& root) { Cmd_CreateMappedSensor(session, req, root); });
RegisterCommandCode("createdevice", [this](auto&& session, auto&& req, auto&& root) { Cmd_CreateDevice(session, req, root); });
RegisterCommandCode("getscenelog", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetSceneLog(session, req, root); });
RegisterCommandCode("getscenes", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetScenes(session, req, root); });
RegisterCommandCode("addscene", [this](auto&& session, auto&& req, auto&& root) { Cmd_AddScene(session, req, root); });
RegisterCommandCode("deletescene", [this](auto&& session, auto&& req, auto&& root) { Cmd_DeleteScene(session, req, root); });
RegisterCommandCode("updatescene", [this](auto&& session, auto&& req, auto&& root) { Cmd_UpdateScene(session, req, root); });
RegisterCommandCode("getmobiles", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetMobiles(session, req, root); });
RegisterCommandCode("getcameras", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetCameras(session, req, root); });
RegisterCommandCode("getcameras_user", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetCamerasUser(session, req, root); });
RegisterCommandCode("getschedules", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetSchedules(session, req, root); });
RegisterCommandCode("gettimers", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetTimers(session, req, root); });
RegisterCommandCode("getscenetimers", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetSceneTimers(session, req, root); });
RegisterCommandCode("getsetpointtimers", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetSetpointTimers(session, req, root); });
RegisterCommandCode("getplans", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetPlans(session, req, root); });
RegisterCommandCode("getfloorplans", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetFloorPlans(session, req, root); });
RegisterCommandCode("getlightlog", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetLightLog(session, req, root); });
RegisterCommandCode("gettextlog", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetTextLog(session, req, root); });
RegisterCommandCode("gettransfers", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetTransfers(session, req, root); });
RegisterCommandCode("dotransferdevice", [this](auto&& session, auto&& req, auto&& root) { Cmd_DoTransferDevice(session, req, root); });
RegisterCommandCode("createrflinkdevice", [this](auto&& session, auto&& req, auto&& root) { Cmd_CreateRFLinkDevice(session, req, root); });
RegisterCommandCode("createevohomesensor", [this](auto&& session, auto&& req, auto&& root) { Cmd_CreateEvohomeSensor(session, req, root); });
RegisterCommandCode("bindevohome", [this](auto&& session, auto&& req, auto&& root) { Cmd_BindEvohome(session, req, root); });
RegisterCommandCode("custom_light_icons", [this](auto&& session, auto&& req, auto&& root) { Cmd_CustomLightIcons(session, req, root); });
RegisterCommandCode("deletedevice", [this](auto&& session, auto&& req, auto&& root) { Cmd_DeleteDevice(session, req, root); });
RegisterCommandCode("getshareduserdevices", [this](auto&& session, auto&& req, auto&& root) { Cmd_GetSharedUserDevices(session, req, root); });
RegisterCommandCode("setshareduserdevices", [this](auto&& session, auto&& req, auto&& root) { Cmd_SetSharedUserDevices(session, req, root); });
RegisterCommandCode("graph", [this](auto&& session, auto&& req, auto&& root) { Cmd_HandleGraph(session, req, root); });
});
RegisterCommandCode("setused", [this](auto&& session, auto&& req, auto&& root) { Cmd_SetUsed(session, req, root); });
Code: Select all
if (rtype.compare("settings") == 0)
{
altrtype = "getsettings";
}
else if (rtype.compare("users") == 0)
{
altrtype = "getusers";
}
else if (rtype.compare("devices") == 0)
{
altrtype = "getdevices";
}
else if (rtype.compare("hardware") == 0)
{
altrtype = "gethardware";
}
else if (rtype.compare("events") == 0)
{
altrtype = "events";
}
else if (rtype.compare("notifications") == 0)
{
altrtype = "getnotifications";
}
else if (rtype.compare("createdevice") == 0)
{
altrtype = "createdevice";
}
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
One RPi with Pi foundation standard touch screen to display Dashticz
-
- 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
Would it be possible to know to which version of domoticz this relate to. This is required to provide backward compatibility of the plugins
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
If the plugin provides you value, you can support me with a donation Paypal.
Wiki is available here.
Zigbee for Domoticz FAQ
Re: 15326 - [WebServer] Depricated RType
Maybe a crazy idea there, but would it be somehow possible to capture and "translate" those former API calls to the new format ?
A kind of proxy somehow
A kind of proxy somehow
- 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
Warning added in the wiki: 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
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- 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
This will be a challenge for standalone applications like DTGBOT to maintain backwards compatibility for current production systems while also implementing support for the current Beta's.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
- 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
As I see it most important calls will work and only give deprecation warnings in the log.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- 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
True, goal is to keep this period as short as possible meaning a new Stable is due soon. And looking into keeping some of the most important changed calls to 'translate' them internally. Some are already but maybe that small list gets extended.
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
One RPi with Pi foundation standard touch screen to display Dashticz
- 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
Keeping the period short isn't the issue here as there is no cutoff for me implementing the change in DTGBOT.
I need to support both since Domoticz internals doesn't and we honestly may not expect every user of domoticz upgrade at once.
I guess the design/change choice was made so I will go for the approach of retrieving the Revision first and depending on that either use the OLD or NEW format.
I need to support both since Domoticz internals doesn't and we honestly may not expect every user of domoticz upgrade at once.
I guess the design/change choice was made so I will go for the approach of retrieving the Revision first and depending on that either use the OLD or NEW format.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
- 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
As I see it this statement doesn't buy me anything as it doesn't support the version I use in DTGBOT.
... and the warning means it really will be remove at some point of time ...right? When?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
- 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
Which ones do you look for?jvdz wrote:As I see it this statement doesn't buy me anything as it doesn't support the once I use in DTGBOT.
... and the warning means it really will be remove at some point of time ...right? When?
And yes, eventually (6-18 months?) the backward compatibility support will go away.
We can’t keep supporting Users that do not want to upgrade for ever. Same goes for DTGBOT users. They can also choose to stay on an older version compatible with their older domoticz version.
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
One RPi with Pi foundation standard touch screen to display Dashticz
- 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
In my case it is type=devices/scenes/plans .
Understand how it works, hence my rhetorical question/comment.kiddigital wrote: ↑Monday 05 June 2023 17:49 And yes, eventually (6-18 months?) the backward compatibility support will go away.
We can’t keep supporting Users that do not want to upgrade for ever. Same goes for DTGBOT users. They can also choose to stay on an older version compatible with their older domoticz version.
So please don't worry about it, I know now what the issue is and my only approach is to maintain backwards compatibility for a longer period so will do as I mentioned and using the appropriate format based on the returned revision from the "/json.htm?type=command¶m=getversion" restcall.
Tnx
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
- 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
Don't understand much of this. Hope I'll have more time to look at this later this week. Or maybe next. For now I will have to life with the messages in the status log.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
-
- Posts: 2260
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: 15326 - [WebServer] Depricated RType
Are you using Dashticz?
Dashticz still is using the outdated API at some places causing the log massages in Domoticz.
I'm preparing a fix.
Dashticz still is using the outdated API at some places causing the log massages in Domoticz.
I'm preparing a fix.
Re: 15326 - [WebServer] Depricated RType
Revert to a version still compatible and will stop update afterthat as I have too many things relying on those calls, and more important some that I'm not able to update myself...
Bye bye domoticz upgrade then
Bye bye domoticz upgrade then
- 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
Yes, using Dashticz. Waiting for a fix then
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- 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
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
-
- Posts: 2260
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: 15326 - [WebServer] Depricated RType
Can you test Dashticz 3.10.5 beta?
- 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
Will do
Unfortunately, it still gives the same error.
Unfortunately, it still gives the same error.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Who is online
Users browsing this forum: Bing [Bot] and 1 guest