Welcome to the Pythonista Community Forums!

Pythonista is a Python programming environment for iOS. To learn more, head over to the Pythonista Website.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter
Home automation with Pythonista
  • Just wrote this little script in 10 minutes !
    It's a visual representation of my living room that I can touch to turn lights on and off, next step is to automate the TV !

    It's pretty simple, it's a crossfade between layers !
  • Looks pretty cool - care to share the code?
  • Sure !
    It uses the Philips Hue library that I coded : https://github.com/studioimaginaire/phue
    And the actual script is here: https://gist.github.com/4156421
  • was it difficult to do?
  • The actual Pythonista app, not really, the hue library was longer to do but not difficult. The Pythonista app is pretty simple, it's basically crossfading between different images to show the current state of the lights. I have one layer for each state (3 lights so 2^3) and I have invisible layers that I use as buttons to trigger the lamps and transition on and off. I'm quite fascinated by the possibilities of Pythonista ! Doing this in objective c would have been hell !
  • Nice !! Thanks for the article !
  • WidgetLocker for Android lets you create a custom lock slider screen for your Android phone, overriding the default lock slider. It also lets you customize the behavior of the lock screen, including setting the lock screen timeout duration. Thanks.
    Regards,
    sf grandezza light oblique font
  • Dang never noticed Dalorbi's articles but those are awesome!

    Speaking of awesome, this script is amazing. I am just curious how phue works, what hardware you need, etc. I want to do something like this but wouldn't mind starting small and cheap. What did you use to receive the signal?
  • phue works (for the moment) with the Philips hue system. The starter kit comes with 3 bulbs and a Bridge. The Bridge plugs into your router/network via ethernet and controls the bulbs wirelessly. The Bridge API uses JSON so phue sends JSON commands to the Bridge to control the lights.