MAJ fichier requirement.txt
This commit is contained in:
@@ -42,7 +42,12 @@ alertes_actives = {}
|
||||
# === AJOUT GYRO (MQTT) ===
|
||||
def publish_gyro_states(states_by_site: dict):
|
||||
"""Publie Alarmes/<Site>/Gyro = ON|OFF (retained). Optionnel : Alarmes/Global/Gyro."""
|
||||
client = mqtt.Client(client_id="MonitorGyroPublisher", clean_session=True)
|
||||
client = mqtt.Client(
|
||||
client_id="MonitorGyroPublisher",
|
||||
clean_session=True, # OK si protocol = MQTTv311
|
||||
protocol=mqtt.MQTTv311,
|
||||
callback_api_version=mqtt.CallbackAPIVersion.VERSION2
|
||||
)
|
||||
if MQTT_USER or MQTT_PASS:
|
||||
client.username_pw_set(MQTT_USER, MQTT_PASS)
|
||||
client.connect(MQTT_HOST, MQTT_PORT, keepalive=30)
|
||||
|
||||
Reference in New Issue
Block a user