added user/passwd and debug for mqtt connection
Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>master
parent
0b3391cac2
commit
bc1c162ae9
2
main.py
2
main.py
|
@ -174,6 +174,8 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
mqttBroker ="homeassistant.ping-mee.local"
|
mqttBroker ="homeassistant.ping-mee.local"
|
||||||
client = mqtt.Client("server-rack-led-1")
|
client = mqtt.Client("server-rack-led-1")
|
||||||
|
client.username_pw_set("mqtt", "pmMQTT_11!")
|
||||||
|
debug_print("Connecting to MQTT Broker "+str(mqttBroker))
|
||||||
client.connect(mqttBroker)
|
client.connect(mqttBroker)
|
||||||
client.on_connect = mqtt_on_connect
|
client.on_connect = mqtt_on_connect
|
||||||
client.on_message = mqtt_on_message
|
client.on_message = mqtt_on_message
|
||||||
|
|
Loading…
Reference in New Issue