fbacker / broadlink-mqtt-bridge

Bridge Broadlink RM Devices with MQTT and API for e.g. OpenHAB
41 stars 14 forks source link

Support for MQTT login #42

Closed bench2012 closed 3 years ago

bench2012 commented 4 years ago

Hi,

I am trying to config. this with a MQTT login. The usual mqtt login format is username:password@. But this doesn't seems to work. It fail to connect to the MQTT server (both MQTT log and the bridge log confirm this) The bridge is in a docker and so is the MQTT broker. There are other devices connected to the broker and working.

Any idea?

daFritz84 commented 4 years ago

Have you tried adding username and password in your local.json? This project uses mqtt.js and any options in this config file should be directly passed to the library if I'm not mistaken.

e.g.

[frigg@frigg config]$ cat local.json
{
  "logging":{
    "level": null
  },
  "mqtt": {
    "host": "frigg.local",
    "port": 1883,
    "protocol": "mqtt",
    "subscribeBasePath": "broadlink/",
    "username": "test",
    "password": "test"
  },
  "queue": {
    "delay": 500
  },
  "webhooks": {
    "scanCompleted": null
  },
  "recording": {
    "timeout": {
      "ir": 15,
      "rf": 15
    },
    "path": null
  },
  "gui": {
    "port": 3000,
    "logs": 3001
  }
}
bench2012 commented 4 years ago

Ay, noted thanks. Will try that. Thanks again.

sujitrp commented 4 years ago

This works perfect