MQTT configuration for zigbee2mqtt after restart HA

Hi all,

As a really fresh starter of Home assistant i stoked to a problem that i can’t figure out.
I have read allot of topics about this and still can’t get it to work.

As follow:
I managed to get Home Assistant working on a Raspberry Pi 3.
Installed:
zigbee2mqtt bridge
Mosquitto broker
File editor

In the beginning i have succeed paired my 3 zigbee devices. They worked fine and add them to my lovelace userinterface.

After shutdown the PI, and continued the next day i get this notification:

Invalid config

The following integrations and platforms could not be set up:

** mqtt*

Please check your config.

Non of the zigbee devices where available on the screen. They are still connected and i am still able to reset a device and pair it again.

This are my configs:

MQTT config

> logins:
>   - username: mqtt
>     password: passwd
> anonymous: false
> customize:
>   active: false
>   folder: mosquitto
> certfile: fullchain.pem
> keyfile: privkey.pem
> require_certificate: false

configuration.yaml


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
mobile_app: 

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml


# MQTT settings
mqtt:
  discovery: true
  discovery_prefix: homeassistant
  broker: 192.168.178.10
  client_id: homeassistant
  username: mqtt
  password: passwd
  
  birth_message:
    topic: 'hass/status'
    payload: 'online'
  will_message:
    topic: 'hass/status'
    payload: 'offline'
    
  # MQTT base topic for zigbee2mqtt MQTT messages
  base_topic: zigbee2mqtt
  # MQTT server URL
  server: 'mqtt://localhost'
  # MQTT server authentication, uncomment if required:
  # user: mqtt
  # password: passwd

I must doing something wrong. What do i miss?

Kind regards
Erik

Welcome.

The first thing you missed, is how to post correct. If you want to post code, put it between the 2x 3backticks created by clicking on the </> button.

We are not picky, it is just yaml is very sensitive about spaces.

For starters :

broker: mqtt://192.168.178.10

should be :

  broker: 192.168.178.10

And this should be in zigbee2mqtt configuration.yaml, not in HA configuration.yaml :

#MQTT base topic for zigbee2mqtt MQTT messages
base_topic: zigbee2mqtt
#MQTT server URL
server: ‘mqtt://localhost’
#MQTT server authentication, uncomment if required:
#user: mqtt
#password: passwd

Thanks!

It works perfect now! Lets hope its stays this way.