Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@

def myCommandCallback(cmd):
if cmd.event == "light":
command = cmd.payload["d"]["command"]
print command
if command == "on":
print cmd.command
if cmd.command == "on":
GPIO.output(17, True)
elif command == "off":
elif cmd.command == "off":
GPIO.output(17, False)

try:
Expand Down