diff --git a/packages/modules/smarthome/mqtt/off.py b/packages/modules/smarthome/mqtt/off.py index 672f1e9c28..edb8cc3953 100644 --- a/packages/modules/smarthome/mqtt/off.py +++ b/packages/modules/smarthome/mqtt/off.py @@ -21,7 +21,7 @@ def on_message(client, userdata, msg) -> None: client.on_message = on_message startTime = time.time() waitTime = 2 -client.connect("localhost") +client.connect(host="localhost", port=1886) while True: client.loop() elapsedTime = time.time() - startTime diff --git a/packages/modules/smarthome/mqtt/on.py b/packages/modules/smarthome/mqtt/on.py index 781d850a81..aabd8d2299 100644 --- a/packages/modules/smarthome/mqtt/on.py +++ b/packages/modules/smarthome/mqtt/on.py @@ -21,7 +21,7 @@ def on_message(client, userdata, msg) -> None: client.on_message = on_message startTime = time.time() waitTime = 2 -client.connect("localhost") +client.connect(host="localhost", port=1886) while True: client.loop() elapsedTime = time.time() - startTime diff --git a/packages/modules/smarthome/mqtt/watt.py b/packages/modules/smarthome/mqtt/watt.py index d1cb945fbc..304b000423 100644 --- a/packages/modules/smarthome/mqtt/watt.py +++ b/packages/modules/smarthome/mqtt/watt.py @@ -55,7 +55,7 @@ def on_message(client, userdata, msg) -> None: client.on_message = on_message startTime = time.time() waitTime = 5 -client.connect("localhost") +client.connect(host="localhost", port=1886) while True: client.loop() elapsedTime = time.time() - startTime