Browse Source

some additions

master
caliskanbi 1 year ago
parent
commit
5338490503
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      software/backend/main.py

+ 2
- 2
software/backend/main.py View File

@@ -9,7 +9,7 @@ Used protocol for interaction: mqtt (paho-mqtt module)

# imports
import paho.mqtt.client as mqtt
from software.defines import MQTT_BROKER_LOCAL, MQTT_BROKER_GLOBAL, Topics
from software.defines import MQTT_BROKER_LOCAL, MQTT_BROKER_GLOBAL, Topics, BACKEND_CLIENT_ID
from plantdatabase import PlantDataBase
import data_functions

@@ -64,7 +64,7 @@ def on_connect(client: mqtt.Client, userdata, flags, rc):


def main():
client = mqtt.Client()
client = mqtt.Client(BACKEND_CLIENT_ID)
client.on_connect = on_connect
client.connect(MQTT_BROKER_GLOBAL)
client.loop_forever()

Loading…
Cancel
Save