john30 / ebusd-configuration

ebusd configuration files
GNU General Public License v3.0
177 stars 277 forks source link

Supplying user credentials to Mosquito? #426

Closed Matt47989 closed 1 month ago

Matt47989 commented 1 month ago

I'm running ebusd with Home Assistant and am starting the daemon using the ebusd --scanconfig --mqtthost 192.168.1.91 --mqttport 1883 --mqttint=/etc/ebusd/mqtt-hassio.cfg --mqttjson command to allow for discovery.

However, no data is coming through to MQTT, and checking the log it states 'New connection from 192.168.1.91:50230 on port 1883. error: received null username or password for unpwd check. Client ebusd_23.2_396 disconnected, not authorised.'

Knowing that Mosquito doesn't allow anonymous connections now, how do I supply the username/password credentials to it when I start ebusd? Through trial and error I've found that adding --mqttuser <user/pswd> to the end when starting ebusd is accepted on the command line, but alas the 'null username' error above remains. Any pointers please on how I add the credentials?

Matt47989 commented 1 month ago

Solved it myself. Found this and worked out that I needed to include --mqttuser and --mqttpass , where username & password are from a valid list which is defined as 'people' in Home Assistant.