-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discovery in HomeAssistant don't work with custom base topic #596
Comments
This is indeed a bug. In MQTT Discovery I'm using the Also, FYI only, I run 90% of all my EMS-ESP tests without being connected to the EMS lines. First compile with the DEBUG flags uncommented in
Then from the console (serial) type in |
No problem, I was suggesting it too. oh, just no wsl 😵 that's heresy 😄 . Thanks for info, I'll see if I'm that desperate to grab the source and build it 😀 (I think VSCode w/h pio should do the trick too on windows, in any case I have some lying around machines with linux too so no problem). Ps. Good that you have in README flashing cmd, because I'm not used to few separate files to flash at different addresses (A habit from esp8266 and tasmota - there is one binary, that is flashed from 0x000000000). Would be nice to have one big file just for flashing new devices, and for update like usual 🙃 . |
Fixed in next release |
Bug description
If I set custom base topic like
home/esp/ems
- because I want to have order in my MQTT (and not everything dumped 💩 under "root node"), the auto discovery don't work in HA. In MQTT-Explorer I see then this:So basically it get too-deep nested for HA to understand this.
Steps to reproduce
Set MQTT topic in
MQTT Settings: Base
to be deeper than one level. For example:home/esp
Expected behavior
I can think of 3 ways to handle this:
MQTT: Base
is character/
then pull out from it "the last node name", and use it in discovery topics. E.g.: if I sethome/esp/ems
then extract from items
and use it for discovery topics (homeassistant/sensor/ems/...
) - this seems to be easiest to implement without much changes to UI.ems
and root_topic tohome/esp
, then full topic will be/home/esp/ems-esp
, if it's empty (default behavior) then full topic will be as usual/ems
, and discovery topic/homeassistant/sensor/ems/....
.Hostname
as base name, thenMQTT: Base
will serve as what I call "root topic", so the full topic would have "syntax":<mqtt_base>/<hostname>
, e.g.: hostname=boiler
, mqtt_base=home/basement
/home/basement/boiler
.Device information
For now I tinkering with just the ESP32 - my boiler is in state of being installed so I can't connect to it (until it'll be fully connected to gas, central heating and water) - so there is no EMS devices.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: