Hue Emulation

Michael Ingraham 2019-10-01 15:30:02 -04:00
parent 7b1fae57d4
commit fa67bebcd7
1 changed files with 34 additions and 0 deletions

@ -9,6 +9,7 @@
- [Fast Polling](#Fast-Polling) - [Fast Polling](#Fast-Polling)
- [Switching and Dimming By Recognizing Mains Power Frequency](#Switching-and-Dimming-By-Recognizing-Mains-Power-Frequency) - [Switching and Dimming By Recognizing Mains Power Frequency](#Switching-and-Dimming-By-Recognizing-Mains-Power-Frequency)
- [Web UI](#Web-UI) - [Web UI](#Web-UI)
- [Hue Emulation](#hue-emulation)
[Back To Top](#top) [Back To Top](#top)
@ -1124,4 +1125,37 @@ tx(color "color:   ")
[Back To Top](#top) [Back To Top](#top)
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
#### Hue Emulation
An example to show how to respond to Alexa requests via Hue Emulation
When Alexa sends on/off, dimmer, and color (via hsb), send commands to a MagicHome device
>**>D**
pwr1=0
hue1=0
sat1=0
bri1=0
tmp=0
>**>E**
if upd[hue1]>0
or upd[sat1]>0
or upd[bri1]>0
then
tmp=hue1/182
->websend [192.168.178.84] hsbcolor %tmp%,%sat1%,%bri1%
endif
>
>if upd[pwr1]>0
then
->websend [192.168.178.84] power1 %pwr1%
endif
>**>H**
; on,hue,sat,bri,ct
livingroom,E,on=pwr1,hue=hue1,sat=sat1,bri=bri1
[Back To Top](#top)
------------------------------------------------------------------------------