Hi,
I install mosquitto because I want to use mqtt with shelly. I think I have a problem.
u.
In the log I read [homeassistant.components.mqtt] Failed to connect due to exception: [Errno 111] Connection refused . I found in the forum that can be if the username or password is incorrect but I check several times.
This is the part in my configuration.yaml
mqtt:
broker: 192.168.86.32
port: 1883
client_id: home-assistant-1
username: !secret mqtt_user
password: !secret mqtt_pass
discovery: true
This is the service status:
pi@raspberrypi:/home/homeassistant/.homeassistant $ sudo /etc/init.d/mosquitto status
● mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
Loaded: loaded (/etc/init.d/mosquitto; generated; vendor preset: enabled)
Active: active (exited) since Sat 2019-02-09 14:06:11 CET; 18min ago
Docs: man:systemd-sysv-generator(8)
Process: 290 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/mosquitto.service
feb 09 14:06:08 raspberrypi systemd[1]: Starting LSB: mosquitto MQTT v3.1 me……
feb 09 14:06:11 raspberrypi mosquitto[290]: Starting network daemon:: mosquitto.
feb 09 14:06:11 raspberrypi systemd[1]: Started LSB: mosquitto MQTT v3.1 mes…er.
Hint: Some lines were ellipsized, use -l to show in full.
And this is the log:
2019-02-09 14:12:10 ERROR (MainThread) [homeassistant.components.mqtt] Failed to connect due to exception: [Errno 111] Connection refused
2019-02-09 14:12:16 DEBUG (MainThread) [homeassistant.components.mqtt] Subscribing to shellies/shelly-1/roller/0
2019-02-09 14:12:16 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.5/asyncio/tasks.py”, line 239, in _step
result = coro.send(None)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py”, line 350, in _async_add_entity
await entity.async_added_to_hass()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/cover.py”, line 187, in async_added_to_hass
await self._subscribe_topics()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/cover.py”, line 287, in _subscribe_topics
topics)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/subscription.py”, line 83, in async_subscribe_topics
await requested.resubscribe_if_necessary(hass, current)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/subscription.py”, line 44, in resubscribe_if_necessary
self.qos, self.encoding
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/init.py”, line 319, in async_subscribe
qos, encoding)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/init.py”, line 701, in async_subscribe
await self._async_perform_subscription(topic, qos)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/init.py”, line 736, in _async_perform_subscription
_raise_on_error(result)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/mqtt/init.py”, line 821, in _raise_on_error
‘Error talking to MQTT: {}’.format(mqtt.error_string(result_code)))
homeassistant.exceptions.HomeAssistantError: Error talking to MQTT: The client is not currently connected.
2019-02-09 14:12:26 WARNING (MainThread) [homeassistant.components.switch] Setup of platform broadlink is taking over 10 seconds.
2019-02-09 14:12:28 ERROR (Thread-16) [homeassistant.components.switch.broadlink] Failed to connect to device
Can someone help me?
Thank you.