Commit 5ec999af authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Fixes error in requirements.txt. Adds node-red test_ohmpi_flow

parent 40c657f2
No related merge requests found
Showing with 53 additions and 4 deletions
+53 -4
.idea/*
data/* data/*
**/.ipynb_notebooks/** **/.ipynb_notebooks/**
data.zip data.zip
......
import json import json
import paho.mqtt.client as mqtt import paho.mqtt.client as mqtt_client
import paho.mqtt.publish as publish import paho.mqtt.publish as publish
from config import MQTT_CONTROL_CONFIG, OHMPI_CONFIG from config import MQTT_CONTROL_CONFIG, OHMPI_CONFIG
import time import time
import uuid import uuid
client = mqtt.Client(f'ohmpi_{OHMPI_CONFIG["id"]}_controller', clean_session=False) # create new instance client = mqtt_client.Client(f'ohmpi_{OHMPI_CONFIG["id"]}_controller', clean_session=False) # create new instance
print('connecting controller to broker') print('connecting controller to broker')
client.connect(MQTT_CONTROL_CONFIG['hostname']) client.connect(MQTT_CONTROL_CONFIG['hostname'])
client.loop_start() client.loop_start()
......
[
{
"id": "4f3a554c97d05d5a",
"type": "ui_button",
"z": "83bcb023749d85ff",
"name": "",
"group": "142ad6ae.d55e29",
"order": 0,
"width": "2",
"height": "1",
"passthru": false,
"label": "set_sequence",
"tooltip": "",
"color": "",
"bgcolor": "green",
"className": "",
"icon": "",
"payload": "{\"cmd_id\":\"\",\"cmd\":\"set_sequence\",\"args\":\"5 6 7 8\\n10 11 12 13\"}",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 560,
"y": 500,
"wires": [
[
"689423767506a28c"
]
]
},
{
"id": "142ad6ae.d55e29",
"type": "ui_group",
"name": "Buttons",
"tab": "5d888f29.07334",
"order": 3,
"disp": true,
"width": "6",
"collapse": false
},
{
"id": "5d888f29.07334",
"type": "ui_tab",
"name": "Home",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]
Supports Markdown
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