MAJ fichier requirement.txt

This commit is contained in:
2025-09-11 15:14:43 +02:00
parent ce41a0ef2c
commit 7aa7fa2dfe
3 changed files with 259 additions and 33 deletions

View File

@@ -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)