Virtual RGB switch

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.
Post Reply
lukbe
Posts: 17
Joined: Saturday 06 May 2017 22:46
Target OS: Raspberry Pi
Domoticz version: 3.8153
Contact:

Virtual RGB switch

Post by lukbe » Saturday 17 June 2017 10:51

Hello everybody,
I have in domoticz virtual RGB switch and I don't know how I can read color value from color picker in LUA.

Can you help me ?

Thank you...

miroslavpetrov
Posts: 11
Joined: Wednesday 03 February 2016 14:35
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Virtual RGB switch

Post by miroslavpetrov » Saturday 09 September 2017 8:33

Same question here. I have smart rgb bulbs that can be controlled with http requests. My idea is to create a dummy rgb switch which values would be used in a script which will translate the values to http requests send to the bulb.
Domoticz on Raspberry Pi 3 with HomeBridge.
RFXCOM, Xiaomi Smart Home, Broadlink RM3, Shelly Smart Bulbs, EasyESP custom sensors.

morilm
Posts: 24
Joined: Friday 27 January 2017 13:57
Target OS: OS X
Domoticz version:
Contact:

Re: Virtual RGB switch

Post by morilm » Saturday 09 September 2017 9:40

I'm working on the same.

/json.htm?type=command&param=setcolbrightnessvalue&idx=xx&hue=274&brightness=40&iswhite=false
/json.htm?type=command&param=setcolbrightnessvalue&idx=xx&hue=128&brightness=42&iswhite=false&sat=2
/json.htm?type=command&param=setcolbrightnessvalue&idx=xx&hex=RRGGBB

seems to be available and working to set the values to the switch, so maybe we can decode the json response from the switch status to get the values from the switch into LUA after choosing the color on the LUA picker on the virtual RGB switch.

/json.htm?type=devices&rid=xx

(xx is the IDX number)

I can't run some test until next week... but if the Json returns the values, then it shouldn't be complicated, even not a perfect solution

regards,
Miguel

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests