Mqtt integration fails with yaml config - ui config works

Hi,
I try to setup mqtt, but it does not work. I tested with several variants (host networking, bridge, external ip, localhost, container ip) but ha is not able to talk with mqtt. Other devices in my network can communicate with mqtt broker.

  • latest HA in docker (no HASS) on armv7 with host networking
  • Mosquitto MQTT 1.6 in docker on armv7 with bridged networking, port 1883 exposed

ha startup logs

2020-01-23 08:07:01 INFO (MainThread) [homeassistant.setup] Setting up mqtt
2020-01-23 08:07:01 INFO (MainThread) [homeassistant.setup] Setup of domain mqtt took 0.0 seconds.
2020-01-23 08:07:01 ERROR (MainThread) [homeassistant.setup] Setup failed for mqtt: Integration failed to initialize.
2020-01-23 08:07:02 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform mqtt.sensor: Unable to set up component.
2020-01-23 08:07:02 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform mqtt.sensor: Unable to set up component.

configuration.yaml

mqtt:
  broker: 192.168.1.20
  port: 1883

As there is no additional error message in ha, I dont know how to solve this issue…

Edit: I configured integration with same settings in ha web ui and it works. What is the difference? Should I create a issue on Github?

1 Like