Commit 6a613c95 authored by Gigadoc 2's avatar Gigadoc 2


parent 3b387f7d
......@@ -98,6 +98,12 @@ class Eins:
if self._connected:
def emit_cmd(self, cmd_name, **data):
self._mqttc.publish(topic = "edi/cmd/{}".format(cmd_name),
payload = json.dumps(data),
qos = self._pub_qos)
#TODO: on_publish
def _online_register_command(self, command):
"""Internal runtime command registration function.
......@@ -16,6 +16,7 @@ def on_connect():
def test_running():
print("Test running called!")
eins.on_connect = on_connect
def cmd_print(a):
......@@ -41,6 +42,9 @@ def ètoile():
def brøther():
eins.on_connect = on_connect
def reflector(**kwargs):
del kwargs['mqtt_topic']
eins.emit_cmd("reflector-target", **kwargs)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment