Skip to content
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

Problem with MQTT discovery message for Home Assistant from IRMQTTServer, it is not retained #879

Closed
alwashe opened this issue Aug 30, 2019 · 4 comments · Fixed by #881
Closed
Assignees

Comments

@alwashe
Copy link

alwashe commented Aug 30, 2019

After restarting Homeassistant there is no AC Device anymore.
I have to hit the Button for Send a Climate MQTT discovery message to Home Assistant again.
It would solve this issue if the MQTT discovery message is retained.
Other devices (for example zigbee2mqtt) send retained discovery messages.

@crankyoldgit crankyoldgit self-assigned this Aug 31, 2019
crankyoldgit added a commit that referenced this issue Aug 31, 2019
* Use MQTT retain for the climate discovery message.
* Better code disabling when MQTT discovery message is not required.

Fixes #879
@crankyoldgit
Copy link
Owner

@alwashe Can you please download and try the code in the branch Issue879 and let me know if it works as you want? https://github.com/crankyoldgit/IRremoteESP8266/tree/Issue879

@alwashe
Copy link
Author

alwashe commented Aug 31, 2019

yes, it works. thank you.
Is it intended that you have to hit discovery? would it not be better if the deiscovery message would be send on a reboot or first start?

@crankyoldgit
Copy link
Owner

Thanks for the confirmation.

I originally had it broadcasting it every X minutes, and that caused it to play up on my HA setup, so I decided to just make it an optional/manual step. This means that if people don't want to use discovery, the don't have to recompile the code etc.

So, yes, it is intended to be only hit once .. kind-of. :)

crankyoldgit added a commit that referenced this issue Aug 31, 2019
* Use MQTT retain for the climate discovery message.
* Better code disabling when MQTT discovery message is not required.

Fixes #879
@crankyoldgit
Copy link
Owner

FYI, the changes mentioned above are included in the newly released version of the library (v2.6.6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants