maciej-or / hikvision_next

Home Assistant integration for Hikvision NVRs and IP cameras
103 stars 20 forks source link

Missing some camera devices in HA #199

Open lpandolfini opened 4 weeks ago

lpandolfini commented 4 weeks ago

Hello everyone,

I have a NVR model DS-7732NI-M4 with firmware V5.03.010 build 240606 and 18 IP cameras connected. HA version 2024.8.1 with integration version 1.0.17.

In the past everything was working well, all the cameras were configured in HA both as devices and entities, then I think after the NVR firmware update the camera devices got renamed, so I deleted the integration and reconfigured it.

After this, the integration creates only 11 camera devices in HA, instead of 18 cameras. The streange thing is that all the 18 cameras are present in HA as entities, but only 11 of them as both devices and entities.

Also, the cameras don't have the sub stream anymore in HA, but only the main stream.

In the diagnostic report I see all the 18 cameras (https://pastebin.com/KJS0ZUW0).

Can someone help me identify the issue?

Thanks Luca

maciej-or commented 4 weeks ago

Hi Luca, Thanks for diagnostic data it's invaluable for debugging. From version 1.0.16 sub streams are hidden entities, you can enable them from device view. Also events without Notify Surveillance Center enabled and related switches are hidden. Events entities without Notify Surveillance Center option enabled are useless so that's why I hid them. Do you use switches despite disabled related events? The missing cameras remain a mystery. Please try remove NVR from the integration and add again but after restart HA.

lpandolfini commented 4 weeks ago

Hi Maciej, thanks for the reply and for the clarification about the sub streams. I did as you suggested, deleting the integration then restarting HA and adding the integration again, but it's always the same. Here is the debug log: https://pastebin.com/k48T0tWy In the log I see all the cameras and streams ecc, but then in the devices page I see only 11 camera devices (and always those 11, despite how many times I delete and add the integration again). The cameras that get configured as devices are: 1, 2, 3, 4, 5, 6, 7, 9, 16, 17, 18. If I open the entities list then I can find all the entities for all the cameras, including the ones that don't have a device configured, and I can see the streams and everything. Thanks Luca