summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-12-24 19:09:33 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-12-24 19:09:33 +0300
commit14f885f1a7f0697f3b9311c36e2ad805cf3e3f5c (patch)
tree497cb9a2701d62428108c64e9de0c289ea66f990 /tools
parent0a065f48be99d4ebae49de622a335f23e50c6ca0 (diff)
relay_mqtt_bot, pump_mqtt_bot
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mcuota.py7
1 files changed, 3 insertions, 4 deletions
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()