Open fernandolcardoso opened 11 months ago
Complementing the question, it is possible to observe that the Home Assistant cannot obtain the MAC address correctly and registers an unknown/random MAC address in the "core.config_entries" file.
By changing the "core.config_entries" file, informing the correct MAC address in the "unique_id" key and then restarting the Home Assistant, it is possible to add the other cameras without problems.
Hey there @hunterjm, mind taking a look at this issue as it has been labeled with an integration (onvif
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
onvif documentation onvif source (message by IssueLinks)
This Home Assistant Onvif integration is buggy or poorly developed. Cameras are being added with wrong MAC addresses and now it is adding duplicate entities.
I already removed and added again and after restarting the entities are duplicated.
Resolved when editing the "core.entity_registry" file, again a manual procedure that could compromise the system when edited.
Basically, you should remove the entity that stopped working from the list, rename the duplicate entity by removing the "_2", save and restart
Is the Home Assistant interested in resolving the issue?
I see that other problems were reported, but they were left without a return and solution
The problem is still there! I'm also having the exact same issue by adding the second IMOU Cue2C device. It seems that ONVIF use the first reported MAC address as unique_id and that MAC Address seems to be the one when the device is in A/P mode and that's the same for every cameras...
To workaround the issue I did the following and it's working correctly (but this issue should really be resolved!):
I'm seeing this bug too. Generic chinese WiFI cam, local installation, they both return the same serial number, hardware version and some kind of fake mac address (4FB494:4FB495:4FB496:4FB497:4FB498:4FB499). When I try to add the second, HA says it's already configured. Workaround doesn't work : if I change only the core.config_entries MAC address with the correct one, second camera adds, but only one stream (the second one) is linked to both devices. If I try and change all references to the MAC address, duplicates sensors are created with fake MAC address at restart.
MAC address shouldn't be used to discriminate devices, as long as IP address is different, it should try to keep both.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Any solution?
Any solution? I see many similar problems in other forums. Since it is an issue that can be solved manually, I understand that it is a problem of the Home Assistant to detect the correct MAC.
I understand that it is a problem of the Home Assistant to detect the correct MAC.
I think that's a IMOU problem that expose the MAC address of the A/P mode and the fact that's the same MAC address for every device is for sure a IMOU problem, not ONVIF integration. That said it can be taken in account by the integration and resolved easily by taking in account the specific MAC address or the manufacturer and ignore the first MAC, for example. But something has to be done, I agree.
Yep still an issue. I had to shutdown my HA host machine for some electrical work today. After booting back up I have two Onvif devices.
One that works, and another one with a different MAC address and no entities. Neither MAC address are correct.
Two issues: 1) We really need to be able to delete these false devices via the UI rather than delving into the storage registry. 2) They should not be generated in the first place.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Nothing has been done so this is still an issue.
Hello Home Assistant development team, would you be able to help us or take a closer look at this issue?
The problem
I have several IMOU cameras and when adding the duplicate Onvif, the settings are merged and/or unified incorrectly.
What version of Home Assistant Core has the issue?
core-2023.7.3
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
Onvif
Link to integration documentation on our website
Diagnostics information
When adding the first camera, everything works correctly
However, when adding the second camera it informs that it was already configured
You may notice a mismatch in the settings or when the camera is added in the configuration files
In the "core.config_entries" file it is possible to observe the discrepancy of the problem, when adding a second entry with the data from the second camera, the data is somehow merged between the two. Notice the "title" and "data:name" keys are no longer the same.
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
I noticed that there are other calls without answers and/or solutions similar to my question. I hope I have presented evidence/information that leads to the solution of the problem.