Page 1 of 1
json-command to Domoticz selector-switch # solved!
Posted: Friday 26 July 2019 15:34
by Gonetolunch
I am looking for the correct json command to display the current switching state of a selector button set in Domoticz. So far only the command transfer to the actuator in ESP-Easy works.
With the conversion of an on/off switch into a 3-fold selector, I obviously need another http-json-command because the formerly working command is no longer working:
SendToHTTP 192.168.178.19,8080,/json.htm?type=command¶m=udevice&idx=48&nvalue=0 //1
I have already tried this, but it does not work because the command must be different now:
SendToHTTP 192.168.178.19,8080,/json.htm?type=command¶m=udevice&idx=48&nvalue=0 //10, 20
I have already searched in the wiki and the manual and here in the forum and found nothing. Who can help?
Re: json-command to Domoticz selector-switch
Posted: Friday 26 July 2019 15:50
by EddyG
Not clear to me, if you want the get or set state of the switch?
Try to add some logging of Domoticz and ESPEASY.
Re: json-command to Domoticz selector-switch
Posted: Friday 26 July 2019 17:16
by waaren
Gonetolunch wrote: ↑Friday 26 July 2019 15:34
I am looking for the correct json command to display the current switching state of a selector button set in Domoticz. I have already searched in the wiki and the manual and here in the forum and found nothing. Who can help?
According the
the domoticz API / JSON wiki the call to set the selector to a certain level is
Code: Select all
http://192.168.178.19:8080/json.htm?type=command¶m=switchlight&idx=48&switchcmd=Set%20Level&level=0 // 10,20
to get information about the (status of the) device is
Code: Select all
http://192.168.178.19:8080/json.htm?type=devices&rid=48
Re: json-command to Domoticz selector-switch
Posted: Friday 26 July 2019 18:47
by Gonetolunch
waaren wrote: ↑Friday 26 July 2019 17:16
Gonetolunch wrote: ↑Friday 26 July 2019 15:34
I am looking for the correct json command to display the current switching state of a selector button set in Domoticz. I have already searched in the wiki and the manual and here in the forum and found nothing. Who can help?
According the
the domoticz API / JSON wiki the call to set the selector to a certain level is
Code: Select all
http://192.168.178.19:8080/json.htm?type=command¶m=switchlight&idx=48&switchcmd=Set%20Level&level=0 // 10,20
to get information about the (status of the) device is
Code: Select all
http://192.168.178.19:8080/json.htm?type=devices&rid=48
Thank you, waaren! I had found this info nowhere. Now also the feedback of the status of the actor on ESP-Easy to Domoticz works.
For all which may have the same problem here the for ESP Easy customized command:
Code: Select all
SendToHTTP 192.168.178.19,8080,/json.htm?type=command¶m=switchlight&idx=48&switchcmd=Set%20Level&level=0 //10,20,30