summaryrefslogtreecommitdiff
path: root/bin/mqtt_node_util.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/mqtt_node_util.py')
-rwxr-xr-xbin/mqtt_node_util.py7
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')