-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Stopping the docker container in Hass.io doesn't put sensors as unavailable #181
Comments
Distributed entities - such as Bluetooth Classic or BLE sensors - will not be marked as unavailable when shutting down by design. Since these entities are controlled from multiple instances in the room-assistant cluster model we can never be really sure if it should be unavailable. It could be that there is another instance writing to the same topics, but the instance going down wasn't aware of it because the cluster connection didn't happen for example. In this case the shutdown would trigger the entity to go unavailable and block updates from the other node. Adding this feature would only make sense as an additional option imo, which can then be used people in single instance setups like yours or when the cluster functionality has been confirmed to be stable. Would that be enough from your point of view? |
As a follow up to mKeRix comment: I'm not even running Room-Assistant in my HA instance. I technically have it installed, but it isn't running. All the info is just passed to my MQTT server running on HA. |
Thanks @mKeRix. I've checked the mqtt_room integration and it seems that it used to give the option to put as away if no update was received after a certain delay. I understand this would require an integration on HA's side but it felt safer. Actually there are some options but I'm wondering what is your view on that?
|
Do you think that utilizing the |
I think that would be the best solution :) |
I would have a suggestion, not sure if it was already suggested Each node send a LWT message to room-assistant/STATUS every 1 (or 5( minutes. Would that work in your opinion or just hammer the MQTT Server for nothing? |
This is now implemented as such:
This behavior also applies in situations where the application doesn't exit gracefully or loses the MQTT connection using the will message feature. It should be a great improvement over the previous implementation. I tried out various approaches in multiple iterations and this was the best I could come up with for now - but if you have any further improvement ideas for the future don't hesitate with commenting here or opening a new issue. :) |
# [2.18.0](v2.17.0...v2.18.0) (2021-05-24) ### Bug Fixes * prevent Loki log transport from interfering ([1a4d662](1a4d662)) * speed up heatmap generation ([0da4ff6](0da4ff6)), closes [#721](#721) ### Features * **bluetooth-low-energy:** add health indicator for advertisement timeouts ([f0cea61](f0cea61)) * **status:** support systemd watchdog ([6d1816d](6d1816d)) * mark entities as unavailable on disconnect, shutdown & crash ([91b7cc1](91b7cc1)), closes [#181](#181) [#348](#348)
🎉 This issue has been resolved in version 2.18.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Describe the bug
Shutting down the docker container (Hass.io) doesn't put monitored Classic Bluetooth devices as
unavailable
(maybe others too).Note: I only have 1 instance.
To reproduce
Relevant logs
N/A
Relevant configuration
Paste the relevant parts of your configuration below.
Expected behavior
Putting sensors as unavailable when the last instance is down or when there where no updates for some time (ideally configurable).
This would help secure the solution a bit, especially if the app crashes.
Environment
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: