5 ms·
Philips Hue API Hacking
- kevingadd 14y agoWhy does the Hue class have an argumentless constructor that must immediately be followed up with attribute initialization and a call to the actual constructor? Kind of a nitpick, but definitely doesn't seem pythonic - or obvious. Cool hack though, API looks straightforward.
- izak30 14y agoI haven't gotten around to writing an application with it yet, just futzing from the terminal. I agree that it's a wart, I pretty much stopped once I got it all working here, and until tonight I haven't had much outside interest in this one.
- timClicks 14y agoI would also change h.lights.get('l3') to h.lights[l3] by defining __getitem__(). Possibly even cut this back to h[13], as you'll always be referring to the lights.
- masklinn 14y agoAnd setState should probably take kwargs rather than a dict of arguments. Might also be cool to use a context manager for a "complex send" e.g. with light: light.bri(220) light.alert("select") which would only send the whole request at once in __exit__, as in "transactional" APIs.
- izak30 14y agoI do really like this one. Been trying to think of a decent way to do pipelining. If you haven't noticed, it is possible to do chaining with the existing API, but it's one request/call.
- lumawake 14y agoWeMo and Hue...looks like we have much in common ;) http://blog.lumawake.com/post/37648185851/ask-and-you-shall-receive-after-dozens-of http://blog.lumawake.com/post/37648185851/ask-and-you-shall-...
- codewright 14y agoIt just so happens that I met Issac Kelly (the author of the post) three or four years ago at a coffeeshop in Columbus, nearby the Short North I think. Spoke mostly about entrepreneurship, .NET, and Python. Nice guy. I'm mostly tinkering with Clojure these days, but the day job so to speak is Python. No more .NET anymore :) I moved to the bay area too! About the post: You mentioned that you were disappointed in the security of their straightforward HTTP/REST implementation, what do you think would've been more secure?
- izak30 14y agoThe security issue is that they're sending my data back to their sites (phone homes) via HTTP not HTTPS. Schedules, on/off status and device hashes. At that point if you had the traffic it would be fairly trivial to pretend you were one of my registered devices locally (this is how I did initial testing), possibly even over the internet back to Hue (not tested, as their webservice hasn't quite worked for me in normal circumstances) Also, reintroduce yourself! Coffee in Columbus talking shop doesn't narrow it down enough for me.
- izak30 14y agoAs an aside, What I really need for this system is a wall-switch that doesn't clobber the state. Right now if you cut power completely (use the wall switch) it loses all it's last settings and turns into roughly the visual equivalent of a 60w incandescent bulb. I'm trying to decide the best way to do this, the easiest would be a raspberry pi. I'm thinking there must be some way to do it with a much ligher thing like a xbee module.
- remcoder 14y agoNice work! I work at Q42 and we wrote some of the (web) software for the Hue platform. As you might guess we're great fans of Hue and we have lots of lamps in the office to play with (http://www.w00tcamp.nl/image/36420335853 http://www.w00tcamp.nl/image/36420335853). Anyway, just wanted to say that I put up a list of Hue libraries on github: https://github.com/Q42/hue-libs https://github.com/Q42/hue-libs I added python-hue as the first entry. To everyone else: Send us a pr if you want to get your lib on the list. Would be cool to see support for Ruby, Scale, Closure, Haskell etc ;-)
- w0utert 14y agoI like how the building says 'Huelands Spoor', I guess you're located pretty close to the train station ('Hollands Spoor' for those not familiar with the train stations near The Hague in the Netherlands) ;-)
- derwildemomo 14y agoA friend of mine hacked something quite nice for/using his Hue. http://vimeo.com/54065245 http://vimeo.com/54065245.
- burgestrand- 14y agoThere’s been efforts to map out the Hue API. I’ve created a GitHub repository for documenting the API, and host it via GitHub pages: http://burgestrand.github.com/hue-api/ http://burgestrand.github.com/hue-api/ Through the README there’s additional links to other resources, such as the EveryHue forum, where people from the Hue developer team appear to hang out as well: http://www.everyhue.com/?page_id=38 http://www.everyhue.com/?page_id=38
- acqq 14y agoDoes anybody know what the response times of commands is? Is it possible to make a disco-like light show controlled by music or are response times too long?
- remcoder 14y agoHere are some clips showing how we heuified the office: strobe effect http://www.youtube.com/watch?v=CVh4V5QyVQY http://www.youtube.com/watch?v=CVh4V5QyVQY remote control http://vimeo.com/54163866 http://vimeo.com/54163866