set selector switch with JSON in version 2020.2?

Moderator: leecollings

Post Reply
renerene
Posts: 347
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

set selector switch with JSON in version 2020.2?

Post by renerene »

This used to work in HABridge

Code: Select all

http://192.168.0.xxx:xxxx//json.htm?type=command&param=switchlight&idx=1425&switchcmd=Set%20Level&level=120
But after update to latest beta Version: 2020.2 (build 12138) HABridge reports error in log:

Code: Select all

2020-06-10 07:24:00,307 [qtp16705701-16] WARN  com.bwssystems.HABridge.plugins.domoticz.DomoticzHome - Cannot interrpret result from call for Domoticz domoticz as response is not parsable.
2020-06-10 07:24:00,309 [qtp16705701-16] WARN  com.bwssystems.HABridge.hue.HueMulator - On/Off Request failed with: [{"error":{"type":"6","address":"/lights/110","description":"Error on calling url to change device state","method_name":"/lights/110/state"}}]
Image
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: set selector switch with JSON in version 2020.2?

Post by waaren »

renerene wrote: Wednesday 10 June 2020 7:26 This used to work in HABridge

Code: Select all

http://192.168.0.xxx:xxxx//json.htm?type=command&param=switchlight&idx=1425&switchcmd=Set%20Level&level=120
If you replace //json.htm with /json.htm it should work .(Just tested with latest beta)
If stil not OK then try to enter the URL in your browser. Maybe it will show what's going on.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
renerene
Posts: 347
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: set selector switch with JSON in version 2020.2?

Post by renerene »

Thank you Waaren. Just did a quick test in address bar of browser and this time domoticz returns with asking login credentials (previous error 404). Will make it work this evening, when I have more time. Strange why the two "//" were there....

Seems like option in Domoticz settings to exclude local network devices from login is not working in this latest beta version. In Dashticz I also had to fill in login name and password, which was not needed before.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: set selector switch with JSON in version 2020.2?

Post by waaren »

renerene wrote: Wednesday 10 June 2020 14:56 Seems like option in Domoticz settings to exclude local network devices from login is not working in this latest beta version. In Dashticz I also had to fill in login name and password, which was not needed before.
What do have in the local network (no username/password) field?.
For some forum members it was needed to add ;::1

settings.png
settings.png (32.57 KiB) Viewed 2196 times
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
HansieNL
Posts: 960
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: set selector switch with JSON in version 2020.2?

Post by HansieNL »

Sorry to break in, but what does the ::1 exactly do?
Blah blah blah
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: set selector switch with JSON in version 2020.2?

Post by waaren »

HansieNL wrote: Wednesday 10 June 2020 18:31 Sorry to break in, but what does the ::1 exactly do?
Short answer: In this context it is the IPv6 equivalent of localhost (127.0.0.1 in IPv4)
wiki ( Long explanation )
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests