Andrea-Fox / peopleCounter

Code for a cheap people counter based on VL53L1X sensor and ESP32/8266
The Unlicense
95 stars 27 forks source link

Configure MQTT for HomeAssistant #5

Closed Cliff-R-K closed 3 years ago

Cliff-R-K commented 3 years ago

Ok, I got some more stupid questions. I have a Zigbee2MQTT USB-Stick in my server and also dockers running a Mosquitto MQTT server and another docker running Home Assistant. The Zigbee2MQTT-usb sends everything to the MQTT server and they show up in Home Assistant in Integrations -> MQTT.

In the Mosquitto log I see:

1605812716: New connection from 192.168.0.182 on port 1883.
1605812716: New client connected from 192.168.0.182 as PeopleCounterESP32Client-a164 (p2, c1, k15).

But how do I make the device show up in Home Assistant ? I tried Adding the :

sensor:
    - platform: mqtt
      name: "People counter"
      state_topic: "peopleCounter/serialdata/tx"

But I get no new devices with or without the sensor added to config.yaml

Andrea-Fox commented 3 years ago

Have you restarted Home Assistant?
Maybe this guide might help you. Unfortunately I use the mosquito broker inside Home Assistant and by doing what I wrote in the code I manage to make it work