MacWyznawca / homebridge-mqtt-switch-tasmota

Plugin to HomeBridge optimized to work with firmware Sonoff-Tasmota, MQTT.
MIT License
57 stars 18 forks source link

mqtt broker with different port #36

Open ek32 opened 6 years ago

ek32 commented 6 years ago

Hi, i'm currently working with cloudmqtt broker, it use port 15964. Is it possible to change port on config.json file?

cubilon commented 6 years ago

haven’t tried “host:15964” ?

Sent with GitHawk

ek32 commented 6 years ago

yes, i've tried, without success... i'm not sure that the problem is the port, but it is the only strange thing. i will post the config accessory, if someone see something strange pleas tell me

{ "accessory": "mqtt-switch-tasmota", "name": "sonoff",

    "url": "mqtt://m23.cloudmqtt.com:15964",
    "username": "***",
    "password": "***",

    "topics": {
        "statusGet": "stat/sonoff/RESULT",
        "statusSet": "cmnd/sonoff/POWER",
        "stateGet": "tele/sonoff/STATE",
        "onValue": "ON",
        "offValue": "OFF"
    },
    "activityTopic": "tele/sonoff/LWT",
        "activityParameter": "Online",
    "startCmd": "cmnd/sonoff/TelePeriod",
    "startParameter": "60"
}
mscreations commented 6 years ago

Have you tried setting url to "{ host: 'mqtt://m23.cloudmqtt.com', port: 15964 }". Looking at the documentation of mqtt node.js, I think that should work (or at least a variation of it)