Page 6 of 10

Re: 15326 - [WebServer] Depricated RType

Posted: Friday 28 July 2023 13:41
by Nefsolive
I see! Thanks,

So i need wait App update?
Or is there anything I can do?

Re: 15326 - [WebServer] Depricated RType

Posted: Friday 28 July 2023 23:43
by waltervl
You need an update for the app if you have issues with events as those are not backwards compatible. The rest of the messages you have are deprecation warnings, not errors, and will keep working.

Re: 15326 - [WebServer] Depricated RType

Posted: Saturday 29 July 2023 16:17
by bl34
I am getting messages 'Deprecated RType (devices) for API request....' every 5s with Domoticz 2023.2
In my attempts to isolate the culprit I removed all my LUA scripts and as well as the Domoticz-Zigbee plugin directory. I also checked there is no shell scripts running.

With the WEBSERVER debug option set I can see calls to the JSON API using the old syntax (/json.htm?type=devices..) every 5 seconds, see lines with 'CWebServer::GetJSonPage(rtype) :devices :/json.htm?type=devices' below.

But unfortunatly this does not point me to the issuer of the bad JSON calls and, given my pretty basic Domoticz setup, I wonder if these commands might be scheduled internally by at tasks in Domoticz on a 5s basis.

Is there such tasks fired every 5s in Domoticz ?
Are there other debug options I could use to dig further more.

Below the log extract. In there the calls with format json.htm?type=devices are done for device id 50 but the same calls are done for the other devices in the configuration as well.

Code: Select all

2023-07-28 23:19:49.719  Debug: [web:443] 'DH PARAMETERS' found in file ./server_cert.pem
2023-07-28 23:19:49.719  Status: WebServer(SSL) started on address: :: with port 443
2023-07-28 23:19:49.720  Debug: [web:443] Adding IPv4 network (192.168.1.*) to list of trusted networks.
2023-07-28 23:19:49.720  Debug: [web:443] Adding IPv4 network (127.0.0.1) to list of trusted networks.
2023-07-28 23:19:49.721  Debug: WebServer(SSL) started with 260 Registered Commands
2023-07-28 23:19:49.721  Debug: cWebEm Registration: 23 pages, 10 actions, 4 whitelist urls, 12 whitelist commands
2023-07-28 23:19:49.722  Starting shared server on: :::6144
2023-07-28 23:19:49.722  Status: TCPServer: shared server started...
2023-07-28 23:19:49.722  Status: RxQueue: queue worker started...
2023-07-28 23:19:51.723  Status: NotificationSystem: thread started...
2023-07-28 23:19:51.723  Status: EventSystem: reset all events...
2023-07-28 23:19:51.724  Status: EventSystem: reset all device statuses...
2023-07-28 23:19:51.751  Status: Python EventSystem: Initializing event module.
2023-07-28 23:19:51.751  Status: EventSystem: Started
2023-07-28 23:19:51.751  Status: EventSystem: Queue thread started...
2023-07-28 23:19:52.724  Status: MQTT: Connecting to 127.0.0.1:1883
2023-07-28 23:19:52.807  Debug: [web:8080] Host:192.168.1.11 Uri:/json.htm?type=devices&rid=50
2023-07-28 23:19:52.807  Debug: [web:8080] IP (192.168.1.11) is within Trusted network range!
2023-07-28 23:19:52.807  Debug: CWebServer::GetJSonPage(rtype) :devices :/json.htm?type=devices&rid=50 
2023-07-28 23:19:52.807  [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (192.168.1.11)
2023-07-28 23:19:52.808  Status: [web:8080] Incoming connection from: 192.168.1.11
2023-07-28 23:19:52.808  Debug: [web:8080] generate new session id token f5232d8a700555590be921f0e2ed5af0
2023-07-28 23:19:52.808  Debug: [web:8080] generate new authentication token MGRlMzYxNTQtYzJkOS00ODU3LWJlZWUtMTc0YWFlMzU3MDU2 for user Domoticz
2023-07-28 23:19:52.809  Debug: Web ACLF: 192.168.1.11 - - [28/Jul/2023:23:19:52.807 +0200] "GET /json.htm?type=devices&rid=50 HTTP/1.1" 200 1782 - -
2023-07-28 23:19:52.925  Status: MQTT: connected to: 127.0.0.1:1883
2023-07-28 23:19:57.808  Debug: [web:8080] Host:192.168.1.11 Uri:/json.htm?type=devices&rid=50
2023-07-28 23:19:57.808  Debug: [web:8080] IP (192.168.1.11) is within Trusted network range!
2023-07-28 23:19:57.808  Debug: CWebServer::GetJSonPage(rtype) :devices :/json.htm?type=devices&rid=50 
2023-07-28 23:19:57.808  [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (192.168.1.11)
2023-07-28 23:19:57.809  Debug: Web ACLF: 192.168.1.11 - - [28/Jul/2023:23:19:57.808 +0200] "GET /json.htm?type=devices&rid=50 HTTP/1.1" 200 1782 - -
2023-07-28 23:20:00.990  Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=command&param=devices_list
2023-07-28 23:20:00.991  Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-07-28 23:20:00.991  Debug: CWebServer::GetJSonPage :devices_list :/json.htm?type=command&param=devices_list 
2023-07-28 23:20:00.992  Debug: Web ACLF: 127.0.0.1 - - [28/Jul/2023:23:20:00.990 +0200] "GET /json.htm?type=command&param=devices_list HTTP/1.1" 200 5293 - "curl/7.81.0"
2023-07-28 23:20:01.011  Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=command&param=devices_list
2023-07-28 23:20:01.012  Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-07-28 23:20:01.012  Debug: CWebServer::GetJSonPage :devices_list :/json.htm?type=command&param=devices_list 
2023-07-28 23:20:01.013  Debug: Web ACLF: 127.0.0.1 - - [28/Jul/2023:23:20:01.011 +0200] "GET /json.htm?type=command&param=devices_list HTTP/1.1" 200 5293 - "curl/7.81.0"
2023-07-28 23:20:01.042  Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=command&param=udevice&idx=87&nvalue=0&svalue=178;S;6.925;11.08;20;0
2023-07-28 23:20:01.042  Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-07-28 23:20:01.043  Debug: CWebServer::GetJSonPage :udevice :/json.htm?type=command&param=udevice&idx=87&nvalue=0&svalue=178;S;6.925;11.08;20;0 
2023-07-28 23:20:01.044  Debug: Web ACLF: 127.0.0.1 - - [28/Jul/2023:23:20:01.042 +0200] "GET /json.htm?type=command&param=udevice&idx=87&nvalue=0&svalue=178;S;6.925;11.08;20;0 HTTP/1.1" 200 49 - "curl/7.81.0"
2023-07-28 23:20:01.045  Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=command&param=devices_list
2023-07-28 23:20:01.045  Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-07-28 23:20:01.045  Debug: CWebServer::GetJSonPage :devices_list :/json.htm?type=command&param=devices_list 
2023-07-28 23:20:01.047  Debug: Web ACLF: 127.0.0.1 - - [28/Jul/2023:23:20:01.045 +0200] "GET /json.htm?type=command&param=devices_list HTTP/1.1" 200 5293 - "curl/7.81.0"
2023-07-28 23:20:01.071  Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=command&param=udevice&idx=88&nvalue=0&svalue=2.5
2023-07-28 23:20:01.071  Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-07-28 23:20:01.071  Debug: CWebServer::GetJSonPage :udevice :/json.htm?type=command&param=udevice&idx=88&nvalue=0&svalue=2.5 
2023-07-28 23:20:01.072  Debug: Web ACLF: 127.0.0.1 - - [28/Jul/2023:23:20:01.070 +0200] "GET /json.htm?type=command&param=udevice&idx=88&nvalue=0&svalue=2.5 HTTP/1.1" 200 49 - "curl/7.81.0"
2023-07-28 23:20:01.072  Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=command&param=devices_list
2023-07-28 23:20:01.072  Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-07-28 23:20:01.073  Debug: CWebServer::GetJSonPage :devices_list :/json.htm?type=command&param=devices_list 
2023-07-28 23:20:01.074  Debug: Web ACLF: 127.0.0.1 - - [28/Jul/2023:23:20:01.072 +0200] "GET /json.htm?type=command&param=devices_list HTTP/1.1" 200 5293 - "curl/7.81.0"
2023-07-28 23:20:01.092  Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=command&param=getdevices&rid=85
2023-07-28 23:20:01.092  Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-07-28 23:20:01.092  Debug: CWebServer::GetJSonPage :getdevices :/json.htm?type=command&param=getdevices&rid=85 
2023-07-28 23:20:01.093  Debug: Web ACLF: 127.0.0.1 - - [28/Jul/2023:23:20:01.092 +0200] "GET /json.htm?type=command&param=getdevices&rid=85 HTTP/1.1" 200 1316 - "curl/7.81.0"
2023-07-28 23:20:01.107  Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_time_Automation_Volets_V1.3.lua: ...oticz/scripts/lua/script_time_Automation_Volets_V1.3.lua:517: attempt to index a nil value (global 'otherdevices_temperature')
2023-07-28 23:20:01.125  Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=command&param=devices_list
2023-07-28 23:20:01.125  Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-07-28 23:20:01.125  Debug: CWebServer::GetJSonPage :devices_list :/json.htm?type=command&param=devices_list 
2023-07-28 23:20:01.126  Debug: Web ACLF: 127.0.0.1 - - [28/Jul/2023:23:20:01.125 +0200] "GET /json.htm?type=command&param=devices_list HTTP/1.1" 200 5293 - "curl/7.81.0"
2023-07-28 23:20:01.147  Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=command&param=getdevices&rid=59
2023-07-28 23:20:01.147  Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-07-28 23:20:01.147  Debug: CWebServer::GetJSonPage :getdevices :/json.htm?type=command&param=getdevices&rid=59 
2023-07-28 23:20:01.148  Debug: Web ACLF: 127.0.0.1 - - [28/Jul/2023:23:20:01.147 +0200] "GET /json.htm?type=command&param=getdevices&rid=59 HTTP/1.1" 200 1626 - "curl/7.81.0"
2023-07-28 23:20:01.169  Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=command&param=devices_list
2023-07-28 23:20:01.169  Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-07-28 23:20:01.170  Debug: CWebServer::GetJSonPage :devices_list :/json.htm?type=command&param=devices_list 
2023-07-28 23:20:01.171  Debug: Web ACLF: 127.0.0.1 - - [28/Jul/2023:23:20:01.169 +0200] "GET /json.htm?type=command&param=devices_list HTTP/1.1" 200 5293 - "curl/7.81.0"
2023-07-28 23:20:01.190  Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=command&param=getdevices&rid=59
2023-07-28 23:20:01.190  Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-07-28 23:20:01.190  Debug: CWebServer::GetJSonPage :getdevices :/json.htm?type=command&param=getdevices&rid=59 
2023-07-28 23:20:01.191  Debug: Web ACLF: 127.0.0.1 - - [28/Jul/2023:23:20:01.190 +0200] "GET /json.htm?type=command&param=getdevices&rid=59 HTTP/1.1" 200 1626 - "curl/7.81.0"
2023-07-28 23:20:02.811  Debug: [web:8080] Host:192.168.1.11 Uri:/json.htm?type=devices&rid=50
2023-07-28 23:20:02.811  Debug: [web:8080] IP (192.168.1.11) is within Trusted network range!
2023-07-28 23:20:02.811  Debug: CWebServer::GetJSonPage(rtype) :devices :/json.htm?type=devices&rid=50 
2023-07-28 23:20:02.811  [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (192.168.1.11)
2023-07-28 23:20:02.812  Debug: Web ACLF: 192.168.1.11 - - [28/Jul/2023:23:20:02.811 +0200] "GET /json.htm?type=devices&rid=50 HTTP/1.1" 200 1782 - -
2023-07-28 23:20:07.812  Debug: [web:8080] Host:192.168.1.11 Uri:/json.htm?type=devices&rid=50
2023-07-28 23:20:07.812  Debug: [web:8080] IP (192.168.1.11) is within Trusted network range!
2023-07-28 23:20:07.812  Debug: CWebServer::GetJSonPage(rtype) :devices :/json.htm?type=devices&rid=50 
2023-07-28 23:20:07.813  [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (192.168.1.11)
2023-07-28 23:20:07.814  Debug: Web ACLF: 192.168.1.11 - - [28/Jul/2023:23:20:07.812 +0200] "GET /json.htm?type=devices&rid=50 HTTP/1.1" 200 1782 - -

Re: 15326 - [WebServer] Depricated RType

Posted: Saturday 29 July 2023 17:25
by kiddigital
@bl34 , likely your browser has some cached parts left from the UI which still uses the old code and calls.

Clear cache (appcache/serviceworker).

You can use the Browser developer tools (F12) and on the network-tab enable ‘no-cache’ and reload the UI. That forces everything to get reloaded and refreshed.

Re: 15326 - [WebServer] Depricated RType

Posted: Saturday 29 July 2023 21:37
by bl34
I fact I had unplugged the eth connection to the server to make sure no browser would access Domoticz and I looked at the log with a tail command in a local terminal. This was to make sure no external connection would pass requests with the old command format. But no changes, and I was still getting the error messages.
After few more thoughts I realized that Homebridge was still active possibly would issue commands to Domoticz at a steady pace when idle. So I stopped the Homebridge server and ..bingo, no more error reported in the log !!
I guess I know now who to talk to ;)

Nevertheless, and if at all possible, I think it would be very helpful to get an indication in the error message on the originator of the faulty request.

Re: 15326 - [WebServer] Depricated RType

Posted: Saturday 29 July 2023 21:47
by kiddigital
Didn’t the IP address in the logline give that away?

Re: 15326 - [WebServer] Depricated RType

Posted: Saturday 29 July 2023 22:16
by bl34
Well not really. The IP in the error message, in my case the IP of the server itself did not tell me much about what piece of SW issued the bad request.
The IP of an external client (a remote web brower by instance) might have shown here if an old cached request was received. I did not see that but maybe.
By originator I meant the name of an app, the name of a script,etc.
At the moment I guess CWebServer::GetJSonPage has no clue on who invoked its service.

Re: 15326 - [WebServer] Depricated RType

Posted: Saturday 29 July 2023 22:18
by kiddigital
Nope it doesn’t. Not really, maybe when running with debugflags enabled maybe some header like browserstring might give an indication.. but not something domoticz controls :)

Re: 15326 - [WebServer] Depricated RType

Posted: Monday 31 July 2023 13:34
by bl34
Quick update on the problem with error messages in Domoticz log when Homebridge task runs.
The root cause was the homebridge-edomoticz plugin. File 'homebridge-edomoticz/lib/domoticz.js' has been updated to use the API calls with the correct syntax but no update was offered in the Homebridge GUI. I guess because the version was unchanged.
I fixed the problem by replacing file domoticz.js in /var/lib/homebridge/node_modules/homebridge-edomoticz on my system by the updated one found in the homebridge-edomoticz github repo.
Additionally I made the same change to the file index.js for the homebridge-domoticz-selector-switch plugin (no more maintained)
Hope this helps

Re: 15326 - [WebServer] Depricated RType

Posted: Tuesday 01 August 2023 18:15
by desertdog
I am getting the same error
2023-08-01 18:12:46.248 [WebServer] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (192.168.1.107)

where the IP address is of a device running the website of dashticz. Any idea what this could be?

Re: 15326 - [WebServer] Depricated RType

Posted: Tuesday 01 August 2023 19:12
by Lokonli
Solved with the latest Dashticz beta version.

Re: 15326 - [WebServer] Depricated RType

Posted: Tuesday 01 August 2023 20:49
by desertdog
Ah, then I'll just wait for the lastest beta to become table version

Re: 15326 - [WebServer] Depricated RType

Posted: Tuesday 08 August 2023 21:28
by studiocascade
I got this same message:
[Webserver] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (192.168.x.xx)

I'm using another custom dashboard (not Dashticz)
The only possible API-request could be from Dutch "Buienradar" or ¨OpenWeatherMap"

Possibly i can be of help in solving the problem... although i'm not a script wizard.
So maybe someone can help me where to look and i could share the contents of the script.
With that info we might get any further in solving the problem.

Does someone also know where i can set the log level for the webserver?
I now get the above message every few seconds, i'm afraid my log is getting overloaded from that.

Re: 15326 - [WebServer] Depricated RType

Posted: Tuesday 08 August 2023 23:27
by waltervl
studiocascade wrote: Tuesday 08 August 2023 21:28 I got this same message:
[Webserver] Deprecated RType (devices) for API request. Handled via fallback (getdevices), please use correct API Command! (192.168.x.xx)

I'm using another custom dashboard (not Dashticz)
The only possible API-request could be from Dutch "Buienradar" or ¨OpenWeatherMap"

Possibly i can be of help in solving the problem... although i'm not a script wizard.
So maybe someone can help me where to look and i could share the contents of the script.
With that info we might get any further in solving the problem.

Does someone also know where i can set the log level for the webserver?
I now get the above message every few seconds, i'm afraid my log is getting overloaded from that.
It will probably not come from Dutch "Buienradar" or ¨OpenWeatherMap"
In the code of your own dashboard (why not mention/link it....?) search for "getdevices" and change the dashboard code so it uses the correct command
/json.htm?type=devices should be /json.htm?type=command&param=getdevices

Re: 15326 - [WebServer] Depricated RType

Posted: Wednesday 09 August 2023 7:58
by desertdog
I which file should I change that in Dashticz? I went trough quite some files, but can't find the 'json.htm?type=devices'

Re: 15326 - [WebServer] Depricated RType

Posted: Wednesday 09 August 2023 8:38
by kiddigital
Latest Dashticz beta’s are updated to use the updated API structure and should not generate that message anymore.

Re: 15326 - [WebServer] Depricated RType

Posted: Saturday 12 August 2023 14:20
by Hansbit
and for openzwavenodes the change is:

old:
../json.htm?type=openzwavenodes&idx=[controller_idx]

new:
../json.htm?type=command&param=getopenzwavenodes&idx=[controller_idx]

Re: 15326 - [WebServer] Depricated RType

Posted: Tuesday 15 August 2023 16:57
by Gravityz
i have this curl command in my router

curl -s "http://192.168.1.50:8084/json.htm?type=devices&rid=$idx" | grep Status | awk '{print $3}' | sed 's/[",]//g'`

however when i change it to the new version it does not seem to work

curl -s "http://192.168.1.50:8084/json.htm?type= ... s&rid=$idx" | grep Status | awk '{print $3}' | sed 's/[",]//g'`

also the homebridge thermostat plugin from akamming does not work anymore

it also uses this api call but it seizes to work
in domoticz this call generated the depreciated warning but in the homebridge plugin screen this appears
invalid reponse code: 401, on http://192.168.1.50:8084/json.htm?type=devices&rid=378
it stopped working, it can not communicate with domoticz anymore
on 2023.1 15092 everything was working fine
also here is the question if the workaround change type=devices into type=command&param=getdevices will work

i tested the new api call with the 2023.1 version and that creates an error
this means that everything who wants to talk to domoticz now needs multiple versions so that the calls/plugin work with both the old and the new version


so why al these api changes who aparently are not downwards compatible
i am ok with warning in domoticz so you have time to change/fix things but if things stop to work when they are trying to communicate with domoticz that is another thing

Re: 15326 - [WebServer] Depricated RType

Posted: Tuesday 15 August 2023 19:33
by waltervl
This has nothing to do with the Rtype api as devices is backwards compatible.

This seems an authorisation error. Check your trusted network setting and setting "Allow API basic authorisation on HTTP"

Re: 15326 - [WebServer] Depricated RType

Posted: Tuesday 15 August 2023 19:52
by Gravityz
trusted network setting is ok. everything(homebridge,docker,domoticz) is running on the same host and ip address 192.168.1.50
all the containers use the same network setting

127.0.0.*;192.168.1.*
i even added 192.168.1.50:8581(this is the homebridge instance)
also switched on basic api authorisation but this did not help either.

it seems i am not the only one with this problem
https://github.com/akamming/homebridge- ... t/issues/1

for now i switched back to 2023.1
hopefully somebody will figur out what the problem is