2014-01-09, 15:38
(2014-01-09, 14:18)jer78 Wrote:(2014-01-09, 13:54)opeters Wrote: Hi Jer78,
I am controlling my HUE lights with EventGhost which is using Phyton. Try this code example:
[/code]
Code:CURL -XPUT http://<IP HUE Bridge>/api/<key>/lights/1/state -d "{{\"on\": true}"
or this:
Code:CURL -XPUT http://<IP HUE Bridge>/api/<key>/groups/7/action -d "{{\"transitiontime\": 180,\"on\": true,\"hue\": 15597,\"bri\": 255,\"sat\": 104}"
Note that <key> is your HUE access/username key
Thanks for your quick reply. Unfortunately, that doesn't work either. However, since I've yet to get a script working, I'm wondering if I'm even doing this correctly? Here's where I put it (substituted of course with my real keyl). In the add-on I've enabled the script and enabled the trigger on start
Code:if trigger == "Script Start" and ha_settings[ "ha_script_start" ]:
# place code below this line
CURL -XPUT http://192.168.1.34/api/<mykey>/groups/7/action -d "{{\"on\": true}"
pass
Sorry but the examples I posted are used to call the curl.exe windows executable, like you do on your MAC and have nothing to to with Python.
Looking to find a Phytom script for this but can't find a working on. What is interesting is this link i found: http://www.eventghost.org/forum/viewtopi...f=1&t=5138 Seens to be a Python plugin HTTPIE that makes things easy.