Spaces:
Sleeping
Sleeping
LapStore commited on
Commit ·
658525f
1
Parent(s): e450bd7
debug
Browse files- keys.env +2 -0
- mqtt_manager.py +2 -2
keys.env
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
| 1 |
MQTT_BROKER="broker.hivemq.com"
|
| 2 |
MQTT_PORT=1883
|
| 3 |
|
|
|
|
| 1 |
+
URL_Traffic = "http://overpass-api.de/api/interpreter"
|
| 2 |
+
|
| 3 |
MQTT_BROKER="broker.hivemq.com"
|
| 4 |
MQTT_PORT=1883
|
| 5 |
|
mqtt_manager.py
CHANGED
|
@@ -42,8 +42,8 @@ def get_State(tl_id):
|
|
| 42 |
|
| 43 |
|
| 44 |
def mqtt_publisher_loop(tl_id):
|
| 45 |
-
|
| 46 |
-
|
| 47 |
client.loop_start()
|
| 48 |
|
| 49 |
last_state = None
|
|
|
|
| 42 |
|
| 43 |
|
| 44 |
def mqtt_publisher_loop(tl_id):
|
| 45 |
+
client = mqtt.Client()
|
| 46 |
+
client.connect(mqtt_broker, mqtt_port)
|
| 47 |
client.loop_start()
|
| 48 |
|
| 49 |
last_state = None
|