diff options
Diffstat (limited to 'bigclown-leds')
-rwxr-xr-x | bigclown-leds | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bigclown-leds b/bigclown-leds index 9bb3b0b..29d2e31 100755 --- a/bigclown-leds +++ b/bigclown-leds @@ -10,9 +10,15 @@ def on_connect(client, userdata, flags, rc): # The callback for when a PUBLISH message is received from the server. def on_message(client, userdata, msg): topic = msg.topic[26:] - client.publish( - 'node/power-controller:0/led-strip/-/' + topic, - payload=msg.payload) + if topic == 'effect/set': + # Well for now just this way + client.publish( + 'node/power-controller:0/led-strip/-/effect/set', + '{"type": "rainbow", "wait":50}') + else: + client.publish( + 'node/power-controller:0/led-strip/-/' + topic, + payload=msg.payload) #def on_log(mqttc, obj, level, string): |