Closed wpeterw closed 7 years ago
The script passes broker
directly from the config file to mqtt.connect()
so that it is fully configurable.
I believe you can add the port using their of these formats in config.json
:
{
"broker": {
"host": "localhost",
"port": 1883,
"username": "XXXXXXXX",
"password": "XXXXXXXX"
},
"bridges": [
...
]
}
{
"broker": {
"host": "localhost:1883",
"username": "XXXXXXXX",
"password": "XXXXXXXX"
},
"bridges": [
...
]
}
Thanks, I figured it out by looking at the MQTT library. I can confirm that Option 1 is the correct way to configure a non-default port. Option 2 is not correct, this results in "localhost:8883:1883" (or whatever port you specify).
Perfect, thank you for reporting back with the correct solution!
I'm running my mqtt broker on a non-default port. The hue-mqtt-bridge has port 1883 hardcoded. Can this be made configurable ?