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.
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 understand that its a depricated issue from Json, but which api is it ? i switched off all my hardware one by one but can't figure out
which one is giving the problem. :cry:

The message in the log is :

2023-06-07 09:36:19.629 Status: [WebServer] Depricated RType (devices) for API request. Please use correct API Command!

Version: 2023.1 (build 15335)
Build Hash: 83bfca4d7
Compile Date: 2023-06-07 08:24:29
dzVents Version: 3.1.8
Python Version: 3.9.2 (default, Mar 12 2021, 04:06:34) [GCC 10.2.1 20210110]
Raspberry 3+ / 4
P1 smartcable / RFXtrx433 FW 182 / Several 1 wire Temp Sensors /DHT12/Conbee2 (zigbee)
Several Kaku switches/ Weather Underground / Hue
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 »

a3vd wrote: Wednesday 07 June 2023 9:39 I understand that its a depricated issue from Json, but which api is it ? i switched off all my hardware one by one but can't figure out
which one is giving the problem. :cry:

The message in the log is :

2023-06-07 09:36:19.629 Status: [WebServer] Depricated RType (devices) for API request. Please use correct API Command!

Version: 2023.1 (build 15335)
Build Hash: 83bfca4d7
Compile Date: 2023-06-07 08:24:29
dzVents Version: 3.1.8
Python Version: 3.9.2 (default, Mar 12 2021, 04:06:34) [GCC 10.2.1 20210110]
You have to be sure you have cleared your browser cache. Using the normal Domoticz interface and hardware should not give issues.
So propably you use another interface like an app, dashticz etc. Or an external script that connects to domoticz.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
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 »

Maybe updating the console message to contain the remote ip address and username would help to determine the source?
Something like? (untested):

Code: Select all

_log.Log(LOG_STATUS, "[WebServer] %s-%s: Depricated RType (%s) for API request. Please use correct API Command!", session.remote_host.c_str(), session.username.c_str(), rtype.c_str());
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: 15326 - [WebServer] Depricated RType

Post by heggink »

jvdz wrote: Wednesday 07 June 2023 11:28 Maybe updating the console message to contain the remote ip address and username would help to determine the source?
Something like? (untested):

Code: Select all

_log.Log(LOG_STATUS, "[WebServer] %s-%s: Depricated RType (%s) for API request. Please use correct API Command!", session.remote_host.c_str(), session.username.c_str(), rtype.c_str());
That would be really helpful indeed. I managed to clear most of the messages except for one and I can't, for the life of me, figure out where it comes from...
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
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 »

heggink wrote:
jvdz wrote: Wednesday 07 June 2023 11:28 Maybe updating the console message to contain the remote ip address and username would help to determine the source?
Something like? (untested):

Code: Select all

_log.Log(LOG_STATUS, "[WebServer] %s-%s: Depricated RType (%s) for API request. Please use correct API Command!", session.remote_host.c_str(), session.username.c_str(), rtype.c_str());
That would be really helpful indeed. I managed to clear most of the messages except for one and I can't, for the life of me, figure out where it comes from...
Just enable the `webserver` debug flag and you will see a lot more details from the webserver.
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
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: 15326 - [WebServer] Depricated RType

Post by heggink »

kiddigital wrote: Wednesday 07 June 2023 21:37
heggink wrote:
jvdz wrote: Wednesday 07 June 2023 11:28 Maybe updating the console message to contain the remote ip address and username would help to determine the source?
Something like? (untested):

Code: Select all

_log.Log(LOG_STATUS, "[WebServer] %s-%s: Depricated RType (%s) for API request. Please use correct API Command!", session.remote_host.c_str(), session.username.c_str(), rtype.c_str());
That would be really helpful indeed. I managed to clear most of the messages except for one and I can't, for the life of me, figure out where it comes from...
Just enable the `webserver` debug flag and you will see a lot more details from the webserver.
Excellent so that helped. FOund the culprit which was unexpected: type=setused throws the warning but I didn';t see that mentioned in the wiki.
What would be the correct syntax?

NVM, found it: type=command&param=setused

Many thanks!!
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: 15326 - [WebServer] Depricated RType

Post by heggink »

heggink wrote: Wednesday 07 June 2023 22:26
kiddigital wrote: Wednesday 07 June 2023 21:37
heggink wrote:
That would be really helpful indeed. I managed to clear most of the messages except for one and I can't, for the life of me, figure out where it comes from...
Just enable the `webserver` debug flag and you will see a lot more details from the webserver.
Excellent so that helped. FOund the culprit which was unexpected: type=setused throws the warning but I didn';t see that mentioned in the wiki.
What would be the correct syntax?

NVM, found it: type=command&param=setused

Many thanks!!
For those using the machinon theme, there are a couple of changes to be made in custom.js:

Code: Select all

fetch('json.htm?type=command&param=getsettings', {
and js/functions.js:

Code: Select all

if (settings.url.startsWith("json.htm?type=command&param=getdevices") || settings.url.startsWith("json.htm?type=command&param=getscenes")) {
    } else if (settings.url.startsWith("json.htm?type=command&param=switchscene")) {
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
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 »

Beta 15342 contains a few small API ‘backwards’ compatibility changes. A few more old RTypes are now still working (scene/plan/graph).

See https://github.com/domoticz/domoticz/c ... 8b640a6ea3

Also the status message shows if (and via which command) it worked or was ignored and where the request came from (IP address).
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
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 »

[/quote]
You have to be sure you have cleared your browser cache. Using the normal Domoticz interface and hardware should not give issues.
So propably you use another interface like an app, dashticz etc. Or an external script that connects to domoticz.
[/quote]

Off course i cleared the cache, and domoticz is still working fine but with the latest beta (15342) i finally can see where the api problem is,
it is in de toon plugin. Now i have to dig in the source to find out where the problem is, and find some time for it :-)

The log message is now much more clearer :
[WebServer] Depricated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (xxx.xxx.xxx.xxx)
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 »

kiddigital wrote: Thursday 08 June 2023 21:17
Also the status message shows if (and via which command) it worked or was ignored and where the request came from (IP address).
It's. coming from my macBook. Updated the machinon and the machinon-beta theme to the latest version and it seems the errors are gone now.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
newpond
Posts: 26
Joined: Sunday 26 September 2021 2:34
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: 15326 - [WebServer] Depricated RType

Post by newpond »

so… in my case after trying lots of the things suggested earlier in this post, on my rpi 4 with no luck, i decided to upgrade another domoticz server i have running on a pi zero to see if that displayed the same problem (as this is not running as many apps in the back ground as my rpi4 setup)

The pi zero server doesnt display the [WebServer] Depricated RType (devices) for API request error.

I started looking at the differences between the two devices and then remembered that the rpi4 has a touchscreen screen attached to it which runs a custom frontpage allowing me to control devices from that rather than the domoticz interface itself.

This is running as a different user, with the browser opening automatically on startup in kiosk mode.

Disabling this from automatically opening the browser, fixed the issue, so the custom front page is clearly using api calls that are no longer supported.

there are 3 commands in that page which could possibly be causing the issue.

If any one can see how to modify these to follow the new requirements, i would be grateful of any help.

var jurl=$.domoticzurl+"/json.htm?type=devices&plan="+$.roomplan+"&jsoncallback=?";


$(document).ready(function() {
$.roomplan=0; // define roomplan in Domoticz and create items below.
$.domoticzurl="http://192.168.1.x:8080";
//format: idx, value, label, description, [override css], [alarm value]

url: "http://192.168.1.x:8080/json.htm?type=c ... witchlight" + "&idx=" + idx + "&switchcmd=" + switchcmd + "&level=0"


I hope this is useful to some people to maybe at least to remind them to be conscious of other devices that maybe causing these issues..

thanks
Newpond
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 »

newpond wrote:

If any one can see how to modify these to follow the new requirements, i would be grateful of any help.

var jurl=$.domoticzurl+"/json.htm?type=devices

thanks
Newpond
That one has to change ‘type=command&param=getdevices’

You can remove the ‘&jsoncallback=?’ as that is also not supported anymore.

The others should be ok
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
newpond
Posts: 26
Joined: Sunday 26 September 2021 2:34
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: 15326 - [WebServer] Depricated RType

Post by newpond »

@kiddigital that worked perfectly thank you so much for the help (and the fast response).

much appreciated

Bedankt!!!!!

Newpond
Romain2022
Posts: 10
Joined: Friday 16 September 2022 14:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: 15326 - [WebServer] Depricated RType

Post by Romain2022 »

kiddigital wrote: Wednesday 07 June 2023 21:37
heggink wrote:
jvdz wrote: Wednesday 07 June 2023 11:28 Maybe updating the console message to contain the remote ip address and username would help to determine the source?
Something like? (untested):

Code: Select all

_log.Log(LOG_STATUS, "[WebServer] %s-%s: Depricated RType (%s) for API request. Please use correct API Command!", session.remote_host.c_str(), session.username.c_str(), rtype.c_str());
That would be really helpful indeed. I managed to clear most of the messages except for one and I can't, for the life of me, figure out where it comes from...
Just enable the `webserver` debug flag and you will see a lot more details from the webserver.
Hello,
How can I enable this debug flag ? Because I didn't find where come my errors....

Thanks a lot.
User avatar
wnaves
Posts: 3
Joined: Monday 21 May 2018 9:35
Target OS: NAS (Synology & others)
Domoticz version: 2023.2
Contact:

Re: 15326 - [WebServer] Depricated RType

Post by wnaves »

Just to add to this conversation as i did not find any references to this issue yet.
I'm running the Android mobile app version 0 . 2 . 358 (9328) and found that as the source device that generate these errors as well.
Any thoughts on the mobile version and if they could be affected ?
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 »

Any external App/Script/WebFrontend will use the standard API calls to retrieve the information from Domoticz so Yes, the android app will probably mostly still work but will trigger these warnings in the log each time it does one of the modified API calls.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
wnaves
Posts: 3
Joined: Monday 21 May 2018 9:35
Target OS: NAS (Synology & others)
Domoticz version: 2023.2
Contact:

Re: 15326 - [WebServer] Depricated RType

Post by wnaves »

jvdz wrote: Tuesday 13 June 2023 22:30 Any external App/Script/WebFrontend will use the standard API calls to retrieve the information from Domoticz so Yes, the android app will probably mostly still work but will trigger these warnings in the log each time it does one of the modified API calls.
And is the mobile app going to be updated as well to make use of these new api calling method's ?
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 »

The issue is brought to the attention of the app author https://github.com/domoticz/domoticz-android/issues/692

For now most likely the app should work, you only have these messages. The app will probably change only after the current beta is promoted to stable else the app will not work on current stable.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
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 »

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. :)
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
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 »

I agree (but have no influence on this)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests