add timeout
This commit is contained in:
parent
b2897829cc
commit
20bdbecfce
1 changed files with 2 additions and 2 deletions
2
main.py
2
main.py
|
@ -104,7 +104,7 @@ if not check_wifi_connection():
|
||||||
machine.reset()
|
machine.reset()
|
||||||
|
|
||||||
# MQTT Setup
|
# MQTT Setup
|
||||||
mqtt_client = MQTTClient(config.MQTT_ID, config.MQTT_SERVER, config.MQTT_PORT, config.MQTT_USER, config.MQTT_PASSWORD)
|
mqtt_client = MQTTClient(config.MQTT_ID, config.MQTT_SERVER, config.MQTT_PORT, config.MQTT_USER, config.MQTT_PASSWORD, 30)
|
||||||
mqtt_client.set_callback(mqtt_receive_message)
|
mqtt_client.set_callback(mqtt_receive_message)
|
||||||
mqtt_client.connect()
|
mqtt_client.connect()
|
||||||
mqtt_client.subscribe(config.MQTT_TOPIC + "/brightness/set")
|
mqtt_client.subscribe(config.MQTT_TOPIC + "/brightness/set")
|
||||||
|
|
Loading…
Reference in a new issue