diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2024-02-24 02:00:40 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2024-02-24 02:00:40 +0300 |
commit | c9b351a08e31aa0c34892065f02f9ef710b6cd34 (patch) | |
tree | 509b7886b76c8f432ad9809945d59b0c5e3aca77 /bin/mqtt_node_util.py | |
parent | 2a5c34b28d7842ee2de2937faa36f78a1f5364fd (diff) |
mqtt changes
Diffstat (limited to 'bin/mqtt_node_util.py')
-rwxr-xr-x | bin/mqtt_node_util.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/mqtt_node_util.py b/bin/mqtt_node_util.py index a685f26..657fcf9 100755 --- a/bin/mqtt_node_util.py +++ b/bin/mqtt_node_util.py @@ -54,6 +54,8 @@ if __name__ == '__main__': help='send relay state') parser.add_argument('--push-ota', type=str, metavar='OTA_FILENAME', help='push OTA, receives path to firmware.bin (not .elf!)') + parser.add_argument('--custom-ota-topic', type=str, + help='only needed for update very old devices') parser.add_argument('--no-wait', action='store_true', help='execute command and exit') @@ -86,7 +88,10 @@ if __name__ == '__main__': mqtt.add_node(mqtt_node) # must-have modules - ota_module = mqtt_node.load_module('ota') + ota_kwargs = {} + if arg.custom_ota_topic: + ota_kwargs['custom_ota_topic'] = arg.custom_ota_topic + ota_module = mqtt_node.load_module('ota', **ota_kwargs) ota_val = arg.push_ota mqtt_node.load_module('diagnostics') |