This file contains hidden or 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
| { | |
| "retry_interval": 20, | |
| "sys_interval": 10, | |
| "listeners": { | |
| "port": 1883, | |
| "max_connections": -1, | |
| "auth_plugin": { | |
| "plugin_path": "auth-plug.so", |
This file contains hidden or 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
| import gi | |
| gi.require_version('Gtk', '3.0') | |
| from gi.repository import Gtk | |
| import sys | |
| class Main(object): | |
| def __init__(self): | |
| self.window = None | |
| self.width = 500 | |
| self.height = 500 |
This file contains hidden or 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
| import paho.mqtt.subscribe as subscribe | |
| import json | |
| import os | |
| def on_message(client, userdata, msg): | |
| #print(msg.topic+" "+str(msg.payload)) | |
| payload = json.loads(msg.payload) | |
| if "action" in payload and "rgb" in payload and "mac" in payload: | |
| if payload['mac'] == "23:02:04:00:01:c6": | |
| r,g,b = payload['rgb'] |
OlderNewer