json-command to Domoticz selector-switch # solved! Topic is solved

Moderator: leecollings

Post Reply
Gonetolunch
Posts: 8
Joined: Thursday 22 December 2016 14:33
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Contact:

json-command to Domoticz selector-switch # solved!

Post 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.
Image
Image

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&param=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&param=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?
Last edited by Gonetolunch on Friday 26 July 2019 18:42, edited 1 time in total.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: json-command to Domoticz selector-switch

Post 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.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: json-command to Domoticz selector-switch

Post 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&param=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
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Gonetolunch
Posts: 8
Joined: Thursday 22 December 2016 14:33
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Contact:

Re: json-command to Domoticz selector-switch

Post 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&param=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&param=switchlight&idx=48&switchcmd=Set%20Level&level=0  //10,20,30
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest