Created
March 27, 2013 11:14
-
-
Save rasathus/5253456 to your computer and use it in GitHub Desktop.
The control my pi elements of LightsInABox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from controlmypi import ControlMyPi | |
jabber_id = 'Jabber ID' | |
password = 'password' | |
panel_id = 'circMan' | |
panel_name = 'Lights In A Box' | |
panel_status = 'pub' | |
def controlmypi_callback(connection, key, value): | |
logging.info("Got message from controlmypi.com key : %s Value : %s" % (key, value)) | |
if key == 'wheel': | |
connection.update_status({'indicator':value}) | |
snap_queue.put(hex_to_rgb(value[1:7])) | |
panel_description = [[['L','Select a colour, and few seconds later your selection should appear.']], | |
[['L','To find out how it all works head on over to http://rasathus.blogspot.co.uk']], | |
[['L','']], | |
[['P','box_image','http://commondatastorage.googleapis.com/image-store/default.jpeg']], | |
[['L','Pick a colour:'],['W','wheel'],['L','Current lighting State:'],['I','indicator','#000000']]] | |
controlmypi_connection = ControlMyPi(jabber_id, password, panel_id, panel_name, panel_description, controlmypi_callback, panel_status) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment