Mosquitto MQTT and EasyESP

New install of HassIO, I installed plugin Mosquitto broker and configured:

{
  "logins": [
{
  "username": "marek",
  "password": "hello"
}
  ],
  "anonymous": false,
  "customize": {
"active": false,
"folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

In contiguration.yaml:

mqtt:
  broker: core_mosquitto
  username: marek
  password: hello
  port: 1883
  discovery: true
  discovery_prefix: home

sensor woda1:
- platform: mqtt
  name: Woda1
  friendly_name: "Woda 1"
  state_topic: "home/bufor/TW1/temp"
  unit_of_measurement: "C"

In EasyESP:

MQTT.fx is connecting and receiving data from broker, but entity sensor.woda1 does not exist in HassIO.

  1. Are you actually seeing the sensor data in MQTT.FZ? IE: Do you have the sensor set to send over MQTT in EasyESP? In the “Devices” tab of EasyESP, under “Data Acquisition”, “Send to Controller” needs to be enabled.

  2. I don’t believe setting up MQTT in the configuration.yaml is the correct way to do this anymore, I believe it should be done in the configuration. There’s an example of how to do this on the forum, as well this migration example in the github.

  1. yes

  2. after do all migration steps:

    ERROR (MainThread) [homeassistant.setup] Setup failed for mqtt: Component failed to initialize.
    ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of sensor.mqtt. Setup failed for dependencies: mqtt
    ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.mqtt: Could not set up all dependencies.

This is going to sound like a stupid question, but you restarted HA after setting up the integration?

Yes, few times :wink:

Remove mqtt: and all the options for it from your configuration file and restart.

It is now set up by discovery.

See here (note, you can still use a locally configured user, a new user defined in HA is not essential)