Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing some camera devices in HA #199

Closed
lpandolfini opened this issue Aug 15, 2024 · 7 comments
Closed

Missing some camera devices in HA #199

lpandolfini opened this issue Aug 15, 2024 · 7 comments
Labels
bug Something isn't working waiting for release Done and waiting for the next release

Comments

@lpandolfini
Copy link

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
Copy link
Owner

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
Copy link
Author

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

@lpandolfini
Copy link
Author

I have more info on this issue.

First of all, I updated both HA and NVR firmware, but the issue is still there. Now HA version is 2024.11.3 and NVR firmware is 5.03.020 build 240904.
As I wrote before, I have 18 cameras configured on the NVR: 10 of them are HikVision cameras, the others are just simple chinese network cameras from Revotech. The HikVision cameras are connected to the NVR via proprietary HIKVISION protocol, the other cameras are connected using ONVIF protocol. All of them work flawlessly in the NVR.

What exactly happened here is that the integration cretaed the device for ALL the HikVision cameras, one device for each camera, but then created only ONE device for ALL the Revotech cameras, bundling everything together.

Here in this screenshot you can see the camera device called "Studio P1", this one is the Revotech camera with ID 16 in the diagnostic report JSON that I posted before (it's the last one of all the Revotech cameras). As you can see, all the other Revotech cameras are bundled together here, as simpe sensors of this single device:
image

Hope this information can help investigate a little bit further.

Thanks
Luca

@maciej-or
Copy link
Owner

Thanks for the details. Basically the integration communicates with the NVR using ISAPI protocol. ONVIF is something else.
Please send diagnostic data see https://github.com/maciej-or/hikvision_next/wiki/How-to-get-Diagnostic-Data

I will check if ONVIF cameras are somehow shared by NVR.

@lpandolfini
Copy link
Author

lpandolfini commented Dec 3, 2024

Here is the diagnostic report: https://pastebin.com/7W5LtgZe

I understand that the integration uses ISAPI to communicate with the NVR. All the cameras are configured in the NVR, the difference in the protocol (hikvision or onvif) is only between the NVR and the cameras.

Here you can see a screenshot of all the 18 cameras inside the NVR:
image
The last one with the ONVIF protocol (IP Camera 16) is the one that is configured as a device in HA, with all the other ONVIF cameras bundled together.

Thanks
Luca

@maciej-or
Copy link
Owner

Thanks, that explains a lot, it looks all ONVIF cameras have the same serial number, that's why they are merged into 1.
I will try to fix that.

@maciej-or maciej-or added the bug Something isn't working label Dec 3, 2024
@lpandolfini
Copy link
Author

That's right, I checked in the NVR and they have the same serial number also there, but that's not the correct one.
If I check in the web interface of the Revotech cameras, the S/N is 8 chars long.
In the NVR page the S/N is "00112233445566778899" for all the Revotech cameras, but of course that is fake :)
Happy you were able to find out the root cause!
Thanks
Luca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for release Done and waiting for the next release
Projects
None yet
Development

No branches or pull requests

2 participants