MQTT not making it to mosquitto for 2 out of 10 DS18B20 sensors

I have a NodeMCU with 10 DS18B20 temperature sensors attached. They send their values over MQTT to Mosquitto. All sensors are set up exactly the same way. When I check the output in MQTT Explorer I get the values for all 10 sensors, as expected.

Mosquitto (in my Home Assistant) receives 8 out of 10 values. So the values for 2 sensors are dropped. When I listen to the topic in the Mosquitto settings it stays quiet for these 2 sensors, even though they do show up in my MQTT Explorer program. There are no errors in the log files. In fact, they even show up in the Home Assistant log file (see below)!

The issue is with sensor vvw_av1 and sensor vvw_rt4. The rest of them are working flawlessly.

I can understand if NONE of my sensors would show up: that would probably be a configuration error on my part. But 2 out of 10, even though they’re set up the same way and are working? I’ve tried to delete them in ESPeasy, set them up again, with a different name, but to no avail. I don’t get it…

My configuration.yaml:

mqtt:
  discovery: true
  discovery_prefix: homeassistant
  birth_message:
    topic: 'hass/status'
    payload: 'online'
  will_message:
    topic: 'hass/status'
    payload: 'offline'

  #Vloerverwarming sensoren    
sensor:
  - platform: mqtt
    state_topic: ESP_Easy_vvw/vvw_av1/temperature
    name: "VVW AV1"
  - platform: mqtt
    state_topic: ESP_Easy_vvw/vvw_av2/temperature
    name: "VVW AV2"
  - platform: mqtt
    state_topic: ESP_Easy_vvw/vvw_av3/temperature
    name: "VVW AV3"
  - platform: mqtt
    state_topic: ESP_Easy_vvw/vvw_av4/temperature
    name: "VVW AV4"
  - platform: mqtt
    state_topic: ESP_Easy_vvw/vvw_av5/temperature
    name: "VVW AV5"
  - platform: mqtt
    state_topic: ESP_Easy_vvw/vvw_rt1/temperature
    name: "VVW RT1"
  - platform: mqtt
    state_topic: ESP_Easy_vvw/vvw_rt2/temperature
    name: "VVW RT2"
  - platform: mqtt
    state_topic: ESP_Easy_vvw/vvw_rt3/temperature
    name: "VVW RT3"
  - platform: mqtt
    state_topic: ESP_Easy_vvw/vvw_rt4/temperature
    name: "VVW RT4"
  - platform: mqtt
    state_topic: ESP_Easy_vvw/vvw_rt5/temperature
    name: "VVW RT5"

Home Assistant log:

2021-02-02 12:29:36 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/ESP_Easy_vvw/vvw_av3/temperature (retained): b'22.00'
2021-02-02 12:29:36 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/ESP_Easy_vvw/vvw_rt5/temperature (retained): b'22.00'
2021-02-02 12:29:36 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/ESP_Easy_vvw/vvw_rt3/temperature (retained): b'22.00'
2021-02-02 12:29:36 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/ESP_Easy_vvw/vvw_av4/temperature (retained): b'22.00'
2021-02-02 12:29:36 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/ESP_Easy_vvw/vvw_rt1/temperature (retained): b'21.75'
2021-02-02 12:29:36 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/ESP_Easy_vvw/vvw_rt2/temperature (retained): b'22.00'
2021-02-02 12:29:36 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/ESP_Easy_vvw/vvw_av2/temperature (retained): b'21.75'
2021-02-02 12:29:36 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/ESP_Easy_vvw/vvw_av5/temperature (retained): b'22.00'
2021-02-02 12:29:36 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/ESP_Easy_vvw/vvw_rt4/temperature (retained): b'22.00'
2021-02-02 12:29:36 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/ESP_Easy_vvw/vvw_av1/temperature (retained): b'21.50'

hass2 hass1

mqttexplorer

I just have a doubt. In the below fig
image

The top part you are trying to listen to rt4 sensor but the message just says “Message 0 recieved on ESP_Easy_vvw/vvw_rt3/temperature”. Why is this so?

That’s the previous message to prove that the other sensor is working.
I would expect it tot say ‘Message 1 received…’, as it would increment the message numbers, but it’s not showing anything.

oh ok… I was confused. I see that you are using espeasy. I dont have any experience with it. My DS18B20 sensor works with tasmota. Its working fine. Maybe some one with experience will help.

1 Like

According to this:

00ca86cd1627f5c2f3dacbd80bf49a8cf71f0605

Your topic should be:

  - platform: mqtt
    state_topic: homeassistant/ESP_Easy_vvw/vvw_rt4/temperature
    name: "VVW RT4"

Welp… that’s it, they’re all working now! Thank you!
The only thing that I don’t understand is why I have to prepend ‘homeassistant/’ to just these two sensors, while the other 8 are working without. The naming is the same for all sensors, and ESPEasy only has one MQTT controller. Strange, but the important thing is they’re working. Thanks!

Has to be something in the espeasy setup.