summaryrefslogtreecommitdiff
path: root/src/mqtt_node_util.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mqtt_node_util.py')
-rwxr-xr-xsrc/mqtt_node_util.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mqtt_node_util.py b/src/mqtt_node_util.py
index 0af430a..70eae95 100755
--- a/src/mqtt_node_util.py
+++ b/src/mqtt_node_util.py
@@ -30,7 +30,7 @@ if __name__ == '__main__':
raise ArgumentError(None, '--relay is only allowed when \'relay\' module included in --modules')
mqtt = MqttWrapper(randomize_client_id=True)
- mqtt_node = MqttNode(node_id=arg.node_id)
+ mqtt_node = MqttNode(node_id=arg.node_id, node_secret=arg.node_secret)
mqtt.add_node(mqtt_node)
@@ -44,9 +44,7 @@ if __name__ == '__main__':
if m == 'relay' and arg.switch_relay is not None:
if not arg.node_secret:
raise ArgumentError(None, '--switch-relay requires --node-secret')
- module_instance.switchpower(mqtt_node,
- arg.switch_relay == 1,
- arg.node_secret)
+ module_instance.switchpower(arg.switch_relay == 1)
mqtt.configure_tls()
try:
@@ -58,7 +56,7 @@ if __name__ == '__main__':
if not arg.node_secret:
raise ArgumentError(None, 'pushing OTA requires --node-secret')
- ota_module.push_ota(arg.node_secret, arg.push_ota, 1)
+ ota_module.push_ota(arg.push_ota, 1)
while True:
sleep(0.1)