ESP Easy + Home assistant + MQTT auto discovery
Moderators: grovkillen, Stuntteam, TD-er
ESP Easy + Home assistant + MQTT auto discovery
Did anyone have success doing auto discovery with Home assistant MQTT with a recent EE?
Can't find much info on the internets.
Have a load of EE units with plenty of sensors, I'd somehow avoid manual configuration.
Can't find much info on the internets.
Have a load of EE units with plenty of sensors, I'd somehow avoid manual configuration.
Re: ESP Easy + Home assistant + MQTT auto discovery
As a matter of fact, I'm also interested in whether the Homie plugin/controller stuff which pretends to do something similar is atually working and if so, how it is working. (and if it will work on HA too?)
To be honest, I haven't touched that code for quite some time (and haven't written it myself) as it really needs some intensive TLC.
That code really is copy/paste/paste/paste/paste/paste, but since I don't really know how it should work, I haven't started working on it.
To be honest, I haven't touched that code for quite some time (and haven't written it myself) as it really needs some intensive TLC.
That code really is copy/paste/paste/paste/paste/paste, but since I don't really know how it should work, I haven't started working on it.
Re: ESP Easy + Home assistant + MQTT auto discovery
I did some work on the MQTT plugins in PR #4770, mostly to move out the /cmd and /set endpoint handling as a generic feature for all MQTT plugins, that also slightly touches the Autodiscovery, but haven't been able to actually test how it works as I'm not running OpenHAB/HA (yet)
You could test if the Controller actually supports the Autodiscovery correctly, by just enabling the controller. And it would be nice if you could also test the PR: latest Actions run
You could test if the Controller actually supports the Autodiscovery correctly, by just enabling the controller. And it would be nice if you could also test the PR: latest Actions run
Last edited by Ath on 04 Oct 2023, 19:54, edited 1 time in total.
/Ton (PayPal.me)
Re: ESP Easy + Home assistant + MQTT auto discovery
Could test on ESP8266, but meeh how to get the artifacts? Seems to be unclickable at github.... I'm unlikely to build myself
Re: ESP Easy + Home assistant + MQTT auto discovery
Possibly the Actions run was already unavailable, I've started a new run here. You'll need to be logged in with your Github account to be able to download these artifacts.
/Ton (PayPal.me)
Re: ESP Easy + Home assistant + MQTT auto discovery
Yeah, looks like login helped with the download. Will test soon.
Re: ESP Easy + Home assistant + MQTT auto discovery
Updated the esp8266 firmware with ESP_Easy_mega_20231004_collection_A_ESP8266_4M1M.bin.
Setup controller as on the screenshot.
The only message I got with mqttx is:
I've set an AHT20 sensor to report with MQTT, that sends messages:
esp_08 seems not to show up in HomeAssistant.
Do I need to set something else?
Setup controller as on the screenshot.
The only message I got with mqttx is:
Code: Select all
Topic: homeassistant/esp_08_1
Connected
Code: Select all
Topic: homeassistant/esp_08_1/room/Temperature
24.00
Topic: homeassistant/esp_08_1/room/Humidity
43.42
Do I need to set something else?
- Attachments
-
- Screenshot_2023-10-05_16-13-58.png (84.04 KiB) Viewed 2525 times
Re: ESP Easy + Home assistant + MQTT auto discovery
Ah, just checked, it's the Homie controller (C014, available in Collection builds) that will send auto-discover data at controller activation. (Not sure if that's the correct way how 'Auto Discovery' should work, but it might help...)
You could try that controller, using the Home Assistant topics, to see if/how that works with your HA server.
You could try that controller, using the Home Assistant topics, to see if/how that works with your HA server.
/Ton (PayPal.me)
Re: ESP Easy + Home assistant + MQTT auto discovery
Does not really work on the first try...
Settings as attached.
I get messages on enabling the controller:
then
periodically
No answer from HASS, of course EE does not show up.
Looks like auto discovery is a bit more involved: https://www.home-assistant.io/integrati ... y-examples
Settings as attached.
I get messages on enabling the controller:
Code: Select all
Topic: homeassistant/esp_08_1
connect
2023-10-08 17:16:53:935
Topic: homeassistant/esp_08_1
connect
2023-10-08 17:16:53:954
Topic: homie/esp_08_1/$state
ready
2023-10-08 17:17:14:454
Topic: homie/esp_08_1/$state
ready
2023-10-08 17:17:44:442
Code: Select all
Topic: homie/esp_08_1/$state
ready
No answer from HASS, of course EE does not show up.
Looks like auto discovery is a bit more involved: https://www.home-assistant.io/integrati ... y-examples
- Attachments
-
- Screenshot_2023-10-08_17-19-48.png (65.15 KiB) Viewed 2465 times
Re: ESP Easy + Home assistant + MQTT auto discovery
It looks like every MQTT server has their own topic prefix for auto-discovery, and the Homie controller uses 'homie', not 'homeassistant'
I'll see if I can pull this out of the Homie controller, and make it more generic, but no ETA yet, have quite a few tasks on my plate already, and this isn't my daytime job...
I'll see if I can pull this out of the Homie controller, and make it more generic, but no ETA yet, have quite a few tasks on my plate already, and this isn't my daytime job...
/Ton (PayPal.me)
Re: ESP Easy + Home assistant + MQTT auto discovery
No worries, would have been a nice-to-have thing, editing HASS configuration.yaml isn't that bad.
Who is online
Users browsing this forum: Ahrefs [Bot] and 3 guests