Homeassistant discovery

Hi,
I started using esphomeyamal and I loved how easy it is to integrate various sensors and component and it is mostly working fine. However I am facing an issue with the discovery. I have my NodMCU connected to several sensors and I can see all of them in the webserver and the mqtt messages on the broker. but some of them will not show up in HASS. I have tried clean-mqtt but nothing changed.

esphomeyaml:
name: garage
platform: ESP8266
board: nodemcuv2

wifi:
ssid: ‘Home’
password: ‘0504583275’
hostname: ‘Garage’

mqtt:
broker: ‘...
username: ‘
password: '
*’
topic_prefix: ‘home’

Example configuration entry

web_server:
port: 80

Enable logging

logger:

ota:
password: ‘********’

i2c:
scan: true

sensor:

  • platform: bh1750
    name: “Garage Illuminance”
    update_interval: 10s
  • platform: wifi_signal
    name: “WiFi Signal Garage”
    update_interval: 10s
  • platform: dht
    model: AM2302
    pin: D5
    temperature:
    name: “Garage Temperature”
    humidity:
    name: “Garage Humidity”
    update_interval: 10s

binary_sensor:

  • platform: gpio
    pin: D6
    name: “Garage Motion”
    filters:
    • delayed_on: 10ms

HASS MQTT

image

esp weberver
image

MQTT broker:

home/sensor/garage_illuminance/state 0.0
home/sensor/wifi_signal_garage/state -80
home/sensor/garage_temperature/state 21.5
home/sensor/garage_humidity/state 100
home/binary_sensor/garage_motion/state OFF
homeassistant/sensor/garage/garage_illuminance/config {“unit_of_measurement”:“lx”,“expire_after”:450,“icon”:“mdi:brightness-5”,“name”:“Garage Illuminance”,“state_topic”:“home/sensor/garage_illuminance/state”,“availability_topic”:“home/status”,“unique_id”:“ESPsensorgarage_illuminance”,“device”:{“identifiers”:“dc4f224c85ce”,“name”:“garage”,“sw_version”:“esphomelib v1.9.3 Dec 28 2018, 20:03:48”,“model”:“PLATFORMIO_NODEMCUV2”,“manufacturer”:“espressif”}}
homeassistant/sensor/garage/wifi_signal_garage/config {“unit_of_measurement”:“dB”,“expire_after”:450,“icon”:“mdi:wifi”,“name”:“WiFi Signal Garage”,“state_topic”:“home/sensor/wifi_signal_garage/state”,“availability_topic”:“home/status”,“unique_id”:“dc4f224c85ce-wifisignal”,“device”:{“identifiers”:“dc4f224c85ce”,“name”:“garage”,“sw_version”:“esphomelib v1.9.3 Dec 28 2018, 20:03:48”,“model”:“PLATFORMIO_NODEMCUV2”,“manufacturer”:“espressif”}}
homeassistant/light/tele/garageled/LWT Online
homeassistant/light/stat/garageled/POWER Off
home/sensor/wifi_signal_garage/state -79

After restarting one or two times it eventually detects all of them, have you try it ?

Yes I did. It did detect additional sensors after restarting, however Temperature did not show up till this moment. and I am not sure what to do to make it show.

Open the logs of the node and see if it’s reading any value, it only sends the data after some time.
Use the MQTT.fx or mosquitto and subscribe to topic of the Temperature sensor to see if you are receiving any data.

I have posted the output of those already in my original post. the logs and the mqtt broker both shows value of temperature received, but HA is not seeing that for some reason.

This bug has been solved in the ‘edge’ branch, there’s an issue for it on github. I could not get anything to discover in HA but works perfect every time on the newer branch.