Fix mqtt API
This commit is contained in:
@ -12,6 +12,7 @@ from datetime import date,datetime
|
|||||||
# Settings
|
# Settings
|
||||||
from secret import ecodevice,use_eco,gx,gxsn,chgbleu,chgblanc,chgrouge,minbleu,minblanc,minrouge,prowlkey
|
from secret import ecodevice,use_eco,gx,gxsn,chgbleu,chgblanc,chgrouge,minbleu,minblanc,minrouge,prowlkey
|
||||||
|
|
||||||
|
|
||||||
# Lancer ceci du 01 Oct au 31 mai
|
# Lancer ceci du 01 Oct au 31 mai
|
||||||
# une fois avant 22h / une fois apres 22h
|
# une fois avant 22h / une fois apres 22h
|
||||||
|
|
||||||
@ -51,7 +52,8 @@ def on_disconnect(client, userdata, rc):
|
|||||||
flagConntected = 0
|
flagConntected = 0
|
||||||
loggerinfo("Broker disconnected.")
|
loggerinfo("Broker disconnected.")
|
||||||
|
|
||||||
client = mqtt.Client("clientdynTEMPO")
|
##client = mqtt.Client("clientdynTEMPO")
|
||||||
|
client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1)
|
||||||
flagConntected = 0
|
flagConntected = 0
|
||||||
client.on_connect = on_connect
|
client.on_connect = on_connect
|
||||||
client.on_message = on_message
|
client.on_message = on_message
|
||||||
|
|||||||
Reference in New Issue
Block a user