Problems with MQTT lights after converting to HASS.io

Hi everybody,
I have been running Hassbian for a while and decided to switch to Hass.io to see what the fuss is about :slight_smile: Everything went smooth but I simply cannot get my MQTT lights up and running :frowning:
I can see the following error in the logs:
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 258, in _async_add_entity
await entity.async_added_to_hass()
File “/usr/lib/python3.6/site-packages/homeassistant/components/light/mqtt_json.py”, line 245, in async_added_to_hass
self._qos)
File “/usr/lib/python3.6/site-packages/homeassistant/components/mqtt/init.py”, line 241, in async_subscribe
topic, msg_callback, qos, encoding)
File “/usr/lib/python3.6/site-packages/homeassistant/components/mqtt/init.py”, line 559, in async_subscribe
await self._async_perform_subscription(topic, qos)
File “/usr/lib/python3.6/site-packages/homeassistant/components/mqtt/init.py”, line 594, in _async_perform_subscription
_raise_on_error(result)
File “/usr/lib/python3.6/site-packages/homeassistant/components/mqtt/init.py”, line 680, 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.

Some snips from my config:
mqtt:
broker: 192.168.1.80
port: 1883
keepalive: 60
username: xxxxx
password: xxxxx

light:

  • platform: mqtt_json
    name: Cabinet
    state_topic: “home/rgbw1”
    command_topic: “home/rgbw1/set”
    brightness: true
    rgb: true
    white_value: true
    effect: true
    effect_list: [colorfade_slow, colorfade_fast, flash]
    optimistic: false
    qos: 0
    (Sorry if spaces doesnt match)

My Mosquitto broker (installed via Hass.io)
{
“plain”: true,
“ssl”: false,
“anonymous”: true,
“logins”: [
{
“username”: “xxxxxxx”,
“password”: “xxxxxxxx”
}
],
“customize”: {
“active”: false,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
}

I hope somebody can help me and make my sunday! :slight_smile:
BR,
Lars
PS running HA 66.1

1 Like

I am having the exact same problem - switching from a Pi3 to WSL.

I have tested the mosquitto server as much as I can, I can send remote messages to it and see them via:
mosquitto_sub -h 127.0.0.1 -v -t “home-assistant/#”

But they are not making it to HASS. Also tried my local IP address. Tried from the same machine and another machine to rule out firewall issues…

Argh! Somehow my automations were just turned off for the events. I didn’t have my automations showing on the homescreen so didn’t notice. Well that was a fun two hours :smiley:

I still have the problem :frowning: