Closed spacelama closed 7 months ago
Hey there @rohankapoorcom, mind taking a look at this issue as it has been labeled with an integration (zoneminder
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
zoneminder documentation zoneminder source (message by IssueLinks)
Hi @spacelama
I'm new to contributions but i think this is related to the way the integration handles setup itself, I could not make a real test, but since the error appears to be because an error connection i could just setup the integration without the actual server, then if you want you could try it with your working setup.
also i think they are migrating to another service called frigate? if I'm not wrong, so maybe this is just not relevant for long.
edit: sorry Michael I tagged the wrong person.
I'm up for that @moddroid94 . Looks like the zoneminder integration and the upstream zm-py code hasn't been touched by the original author since 2020 or so, so it likely won't be fixed unless you or someone is able to work it out.
I saw, but i think that is because they're gonna switch to frigate and the dev is busy on that, so idk about your setup but maybe you should give it a check to future proof your system. :)
Anyway I've managed to get this to setup without failing and retry the connection every 30 sec. or so, it shouldn't break anything, but I'm not sure if it's going to work as intended when devices are already present, or if the retry on connection would be catched by HA, because there's a flow to allow HA to handle the setup of a failing integration as explained in Handling Setup Failures But i don't understand how to edit this to make it work that way.
Anyway if you want to test it, please make a backup if you haven't yet, the link to the repo folder is this: https://github.com/moddroid94/core/tree/dev/homeassistant/components/zoneminder
you should copy the whole zoneminder folder into /custom_components/ Then on reboot HA should load the custom integration without touching the original, if you have any problem just delete the the folder and it falls back to the integrated one.
hope it helps :)
Hello- I submitted #107519 to improve the ZoneMinder connection retry behavior.
I've tested this with ZM offline as HA start up and also with ZM restarting after HA is already up and running.
Thank you
The problem
Just like auto-closed #47489 #58538 #68162 etc, zoneminder integration doesn't attempt to restart if the server isn't available at startup (eg, your VM host infrastructure is still in the process of rebooting)
It would good if it simple automatically retried in an appropriate exponential backoff fashion upon every connection failure, either automatically or via some flag (default: true). Or simply documented how one might achieve this with separate plugins such as this is hinting might be able to be done: https://community.home-assistant.io/t/configurable-auto-restart-of-components-that-failed-setup/91483 https://community.home-assistant.io/t/wth-doesnt-ha-retry-a-failed-service-call/467850/25 eg, maybe this might be promising: http://homeassistant/hacs/repository/612717689 but I don't know enough to know where to start configuring that for my zoneminder camers.
What version of Home Assistant Core has the issue?
core-2023.12.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
zoneminder
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?