-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[BUG] Homie MQTT convention ignores unit number #4864
Comments
Hi! Agreed with the confusing names, even more because the document page https://espeasy.readthedocs.io/en/latest/Controller/C014.html refers to My 2 cts, I see two solutions:
I’d go with option 1 because unit number really seems to be a thing, so we lose a feature if this controller does not honor it, but that means updating the plugin code and maybe UI – beyond my skills at this point, especially the UI part! |
I have been working on Controller improvements, and will incorporate this as a fix in the pending changes. Edit: See PR #4770 |
Excellent news :) I’ll keep an eye on this PR, maybe I can build/test the branch locally and see how it goes. Thanks for all the effort! |
After a push to a branch the matching GH Actions run will have a complete build for your in ca. 45 minutes (or somewhat longer if another build starts in parallel), so no need to build locally 😃 |
@Didier-SimpleCommeDev A GH Actions run is brewing that uses the correct |
Describe the bug
Homie MQTT convention sends auto-discovery messages without the unit number, but cannot be setup to send the actual data without the unit name.
To Reproduce
Steps to reproduce the behavior:
homie/%sysname%/%tskname%/%valname%
homie/%sysname%/$state
homie/#
Expected behavior
Either one of the following:
/homie/ESP_Easy_proto_1/#
, or/homie/ESP_Easy_proto/#
Screenshots
Observed behavior from MQTT logs (Mosquitto): anouncement messages are sent to
homie/ESP_Easy_proto
and device-related messages (data, LWT) are sent tohomie/ESP_Easy_proto_1
Used platform (please complete the following information):
Analysis
Plugin C014 uses the following source for base topic:
pubname.replace(F("%sysname%"), Settings.getName());
. Documentation forgetName()
reads:AFAIK, there is no system variable for "unit name without the unit number", so there is no way to configure the controller "data" and "LWT" topics without the unit number.
Workaround: disable "Append Unit Number to hostname"
The text was updated successfully, but these errors were encountered: