From 14f885f1a7f0697f3b9311c36e2ad805cf3e3f5c Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sat, 24 Dec 2022 19:09:33 +0300 Subject: relay_mqtt_bot, pump_mqtt_bot --- tools/mcuota.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/mcuota.py b/tools/mcuota.py index f7f2968..8d47c8c 100755 --- a/tools/mcuota.py +++ b/tools/mcuota.py @@ -10,7 +10,7 @@ sys.path.extend([ from time import sleep from argparse import ArgumentParser from src.home.config import config -from src.home.mqtt import MQTTRelay +from src.home.mqtt import MQTTRelay, MQTTRelayDevice def guess_filename(product: str, build_target: str): @@ -34,11 +34,10 @@ def relayctl_publish_ota(filename: str, global stop stop = True - mqtt_relay = MQTTRelay(home_id=home_id, - secret=home_secret) + mqtt_relay = MQTTRelay(devices=MQTTRelayDevice(home_id=home_id, secret=home_secret)) mqtt_relay.configure_tls() mqtt_relay.connect_and_loop(loop_forever=False) - mqtt_relay.push_ota(filename, published, qos) + mqtt_relay.push_ota(home_id, filename, published, qos) while not stop: sleep(0.1) mqtt_relay.disconnect() -- cgit v1.2.3