ep1cman / unifi-protect-backup

Python tool to backup unifi event clips in realtime
MIT License
576 stars 25 forks source link

Update unifi_protect_backup_core.py #100

Closed cyberpower678 closed 9 months ago

cyberpower678 commented 9 months ago

Fix typo in connection attempts. The application only attempts to connect once instead of 10 times. Incidentally the newest version of Unifi Protect is not fully compatible with pyunifiprotect causing an exception to be thrown on the first attempt, but not the second. This also will allow the application to continue working with the newest version of Unifi Protect while we wait for pyunifiprotect to be updated.

natehudson commented 9 months ago

I can confirm this got me back up and running after upgrading to Unifi Protect Early Access 2.9.16.

There are still a number of errors coming from pyunifiprotect but I do seem to be getting backup and upload of current events.

The unifi_protect_backup.missing_event_checker might not be working though, throwing a pyunifiprotect.exceptions.DataDecodeError: No modelKey error.

Thanks for this.

ep1cman commented 9 months ago

it might be that the latest pyunifiprotect already fixes this. I dont strictly follow their releases in this project with the idea of "if it ain't broke, dont fix it"

I will create a new issue from your above message. I will update that issue once I have updated to the latest version for you to test

cyberpower678 commented 9 months ago

The issue was dismissed by the dev of pyunifiprotect, because it's EA. He'll have to fix it sooner or later, but it's definitely not fixed right now. I would still merge this as this does still fix a small issue, that happens to work around another one.

ep1cman commented 9 months ago

Yeah, my interactions with that developer have been quite "frosty" sadly

ep1cman commented 9 months ago

Thanks for the fix!

cyberpower678 commented 9 months ago

No problem. :-)

realbradley commented 9 months ago

Hi all. Can someone walk me through fixing this? EA user and HA with Protect is now broken. Thanks!

ep1cman commented 9 months ago

@realbradley if you are referring to this tool, then the current "dev" version of the container has this fix included. If you are having issues with home assistant im afraid this is the wrong spot to ask about that.

realbradley commented 9 months ago

Got it. Thank you. Respectfully,Bradley SmithSent from my iPhoneOn Sep 10, 2023, at 06:59, Sebastian Goscik @.***> wrote: @realbradley if you are referring to this tool, then the current "dev" version of the container has this fix included. If you are having issues with home assistant im afraid this is the wrong spot to ask about that.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

ep1cman commented 9 months ago

Just wanted to update folks because the bulk of the discussion happened here. There has been an update to pyunifiprotect now that v2.9.0 is not early access. I will make the necessary updates this weekend.