dullage / ESP-LED-MQTT

ESP8266 firmware to control WS2812 LEDs over MQTT. Works well with Home Assistant.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Home assistant configuration example using mqtt_json

davidusb-geek opened this issue · comments

commented

Hello there, nice work and project.
I am trying to implement your code on my installation with a ws2818b led strip.
However I am having trouble with topic names. The topic names are not consistent on your arduino .ino file and the example home assistant configuration.
Notably I can't find where to define the recovery topic in home assistant.
Could you please clarify this issue, or give an updated home assistant configuration example with the correct topic names?
Thank you in advance

Hi @davidusb-geek, glad this is of use to someone else. The topics marry up like this:

INO File = Home Assitant Config
deviceAvailabilityTopic = availability_topic
deviceStateTopic = state_topic
deviceControlTopic = command_topic
rgbStateTopic = rgb_state_topic
rgbControlTopic = rgb_command_topic

If using the availability functionality you will also need to set the Home Assistant config payload_available to "1" and payload_not_available to "0". Or you can leave availability out completely.

The recovery topic doesn't need to go into the Home Assitant config. I just take advantage of the MQTT "Retain" feature as a way of remotely storing information about what state to return to if the device restarts.

I hope this helps. Let me know if you have any other questions.

commented

Ok thanks for your answer, I'll give that a try...