I am trying to connect HomeAssistant to the Mosquito Broker, but I’m out of ideas…
I’m using the Mosquitto broker from the Add-on store in Version 5.1 with hassOS on a raspi4 with all the latest updates (see below for system info).
The broker is up and running. I can see it in the logs of the broker, I can connect to it with MQTT Explorer (<internal_ip> below in the logs) and owntracks on my mobile phone is successfully publishing messages (my phone publishes them, I see them in MQTT Explorer and the broker logs; <external_id> in the logs, connected via a dyndns).
But the home assistant logs tell me:
Log Details (ERROR)
Logger: homeassistant.components.mqtt
Source: components/mqtt/__init__.py:748
Integration: MQTT (documentation, issues)
First occurred: 9:50:40 PM (1 occurrences)
Last logged: 9:50:40 PM
Failed to connect to MQTT server due to exception: [Errno 113] Host is unreachable
Any ideas? I am grateful for any help! Thanks
These are the logs of the broker:
[21:49:01] INFO: Setup mosquitto configuration
[21:49:01] INFO: Found local users inside config
[21:49:01] INFO: Initialize Hass.io Add-on services
[21:49:01] INFO: Initialize Home Assistant discovery
[21:49:01] INFO: Start Mosquitto daemon
1600112941: mosquitto version 1.6.3 starting
1600112941: Config loaded from /etc/mosquitto.conf.
1600112941: Loading plugin: /usr/share/mosquitto/auth-plug.so
1600112941: ├── Username/password checking enabled.
1600112941: ├── TLS-PSK checking enabled.
1600112941: └── Extended authentication not enabled.
1600112941: |-- *** auth-plug: startup
1600112941: Opening ipv4 listen socket on port 1883.
1600112941: Opening ipv6 listen socket on port 1883.
1600112941: Opening websockets listen socket on port 1884.
1600112941: Opening ipv4 listen socket on port 8883.
1600112941: Opening ipv6 listen socket on port 8883.
1600112941: Opening websockets listen socket on port 8884.
1600112941: Warning: Mosquitto should not be run as root/administrator.
1600112947: New connection from <internal_ip> on port 1883.
[INFO] found mosquittoUser on local database
1600112947: New client connected from <internal_ip> as mqtt-explorer-4a6ec9b6 (p2, c1, k60, u'mosquittoUser').
1600112989: New connection from <external_ip> on port 1883.
1600112989: New client connected from <external_ip> as mosquittoUserowntrackiphone6s (p2, c0, k60, u'mosquittoUser').
1600112993: Client mosquittoUserowntrackiphone6s disconnected.
1600112993: New connection from <external_ip> on port 1883.
1600112993: New client connected from <external_ip> as mosquittoUserowntrackiphone6s (p2, c0, k60, u'mosquittoUser').
1600112997: Client mosquittoUserowntrackiphone6s disconnected.
1600113277: New connection from <external_ip> on port 1883.
This is my broker config:
logins:
- username: mosquittoUser
password: <PASSWORD>
anonymous: false
customize:
active: false
folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false
client_id: home_assistant
This is my system info:
arch armv7l
chassis embedded
dev false
docker true
docker_version 19.03.11
hassio true
host_os HassOS 4.13
installation_type Home Assistant OS
os_name Linux
os_version 4.19.127-v7l
python_version 3.8.3
supervisor 243
timezone Europe/Berlin
version 0.114.4
virtualenv false
Lovelace
dashboards 1
mode storage
resources 8
views 4