core: unifiprotect unexpectedly reloads during setup and from conflicting discovery
The problem
The caramas stopped working after update to Core 2022.6.1
It seems that after a reboot the cameras will work for a few minutes, but then I get the following error in the log and they stop working.
Logger: homeassistant.components.switch
Source: helpers/entity_platform.py:598
Integration: Switch (documentation, issues)
First occurred: 07:55:45 (54 occurrences)
Last logged: 07:55:46
Platform unifiprotect does not generate unique IDs. ID 6006f96a010d0e03870003f1_privacy_mode already exists - ignoring switch.privacy_mode_side_yard_right
Platform unifiprotect does not generate unique IDs. ID 6006f96a010d0e03870003f1_osd_name already exists - ignoring switch.side_yard_right_overlay_show_name
Platform unifiprotect does not generate unique IDs. ID 6006f96a010d0e03870003f1_osd_date already exists - ignoring switch.side_yard_right_overlay_show_date
Platform unifiprotect does not generate unique IDs. ID 6006f96a010d0e03870003f1_osd_logo already exists - ignoring switch.side_yard_right_overlay_show_logo
Platform unifiprotect does not generate unique IDs. ID 6006f96a010d0e03870003f1_osd_bitrate already exists - ignoring switch.side_yard_right_overlay_show_bitrate
I already tried to remove and add the integration again but unfortunately with the same result. Maybe also good to know I have 4 cameras in unifi protect.
Could it be because i have unifi protect 2.0.1? Because I can find in the documentation that this version is supported.
What version of Home Assistant Core has the issue?
Core 2022.6.1
What was the last working version of Home Assistant Core?
Core 2022.5.4
What type of installation are you running?
Home Assistant OS
Integration causing the issue
UniFi Protect
Link to integration documentation on our website
https://www.home-assistant.io/integrations/unifiprotect
Diagnostics information
config_entry-unifiprotect-a8178bc7a8d26d363b0c048dcb462315.json.txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 39 (10 by maintainers)
Commits related to this issue
- Add async_ip_on_same_subnet helper to network Needed to fix #73013 but I did not want to add the logic to the integration itself since it seemed like it belongs here instead — committed to bdraco/home-assistant by bdraco 2 years ago
- Only update unifiprotect ips from discovery if the entry is in a failure state Fixes #73013 — committed to bdraco/home-assistant by bdraco 2 years ago
- Only update unifiprotect ips from discovery when the console is offline Fixes #73013 — committed to bdraco/home-assistant by bdraco 2 years ago
- Only update unifiprotect ips from discovery when the console is offline Fixes #73013 — committed to bdraco/home-assistant by bdraco 2 years ago
@fribse I don’t think so. #72595 reads more like a mix of “I used an old HA version”, “I forgot to remove the old HACS integration” and #72927. At least in my case all of the 3 options doesn’t apply and also the error logs are different. Only your comment reads similar to here in my opinion.
As I use HA in a virtual machine it’s relatively easy for me to roll back HA, and can therefore say that it’s really just the HA version. The Protect version is always the same on my UDM Pro (2.0.1) and the breaking change was somewhere between HA 2022.5.5 and HA 2022.6.0, because as soon as I roll back to 2022.5.5 the integration works fine.
Also an update from me after the update to 2022.6.6 everything works again, thank you very much!
Same here, but wanted to add some additional information. The problem started already in 2022.6.0. Last working version was 2022.5.5.
I get the same error in the log. If I visit a dashboard page with a camera I can see in the browser developer options that home assistant does get a http 404 error when accessing the api (https://ha-url/api/camera_proxy/entity). Until 2022.5.5 it got a 200 and an image.
I tried to uninstall, restart, reinstall the protect integration, but that didn’t help. A rollback to 2022.5.5 does fix the issue instantly and doesn’t show the errors in the log.