I installed mqtt on local as below:
docker run -itd -p 1883:1883 -p 9001:9001 -v /home/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf -v mosquitto_data:/mosquitto/data -v mosquitto_log:/mosquitto/log --name mosquitto eclipse-mosquitto
It seems work fine, as I verified with mqtt.fx. I can connect, and can subscribe and publish.
However in my HA in another container I can’t connect.
mqtt:
broker: 127.0.0.1
port: 1883
discovery: true
discovery_prefix: homeassistant
birth_message:
topic: "hass/status"
payload: "online"
qos: 1
retain: true
Here is the error I saw from HA log:
2019-11-22 15:42:51 ERROR (MainThread) [homeassistant.components.mqtt] Failed to connect due to exception: [Errno 111] Connection refused
Question:
- what could be issue for the connection refused?
- is there UI for mqtt to setup user/password?
Thanks.