-
7th December 2014, 07:48 PM
#1
Automated Home Sr Member
Philips Hue
Hi all,
I've just purchased a Philips Hue bridge which allows my three existing Philips LivingColors LED lights to be controlled via REST HTTP calls (and an iPad!). Before setting off on a Christmas project to rustle up a python xAP/Hue interface so I can use them with Cortex, has anyone done this before?
My alternative is to use a simple command line tool to control the lights which is called from a macro, but that doesn't seem very elegant, any other ideas?
-
8th December 2014, 10:47 AM
#2
Automated Home Legend
Cortex API? But then xAP route might be just as good. If using macro type method might be worth linking to the state of a virtual light object to give some aspects of automation. Of course if someone changes light states via an external application then things will get in a mess.
-
5th January 2016, 11:37 AM
#3
Automated Home Ninja
Did you make any progress with this pbj? I'm looking to do something similar but some native Cortex support for Hue would be great if possible. http://www.developers.meethue.com/tools-and-sdks
-
7th January 2016, 06:44 PM
#4
Automated Home Ninja
I made a start on this but unfortunately the hue API requires the PUT method to be used and the Cortex API only allows for Get and POST. Also rather than a key/value list would it be possible to get a raw message body area?
For a post request...
Sent
http://192.168.1.140/api/myapikey/li.../state?on=true
HTTP/1.1 400 Bad request
PUT requests made outside of cortex are working correctly.
DELETE method is also used in the hue API but I haven't come across a need for it yet
-
9th January 2016, 10:23 AM
#5
Automated Home Sr Member
Hi Andrew,
I ended up using powerscript to create a command line. It's not terribly elegant, but does the job. Of course that means there's no possibility of feedback from the light, but I don't think the Hue offers that anyway.
Peter
-
9th January 2016, 04:58 PM
#6
Automated Home Ninja
The Hue API does feature a JSON response with "success" reported on a successful command.
Aside from the issue of no PUT/DELETE, I only seem to be encountering one other minor issue with the lights. I've replaced some of the lamps on a QLD circuit with hue bulbs and occasionally they don't want to come on even though I've reset the rates to immediate. No amount of toggling the circuit on/off brings the bulb back to life, I have to take the bulb out of the holder and pop it back in. I don't have this issue with lamps on a relay switched circuit. With API support in Cortex I hope I'll be able to overcome this by leaving the dimmer circuit on all the time and adding a virtual light object to send on/off api commands to the hue lamps to retain the occupancy sensing capabilities of Cortex. This should also allow me to automate some other desk/floor lamps around the house where I neglected to install Idratek switched sockets.
I'm on hold until if/when we can get PUT/DELETE support in the cortex API however. Karam?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules