[APP][Pro] Support for ONVIF compatible cameras (Release 2.0.41)

That shouldn’t be a problem as that will be using a different protocol, and I have mine setup the same but on Reolink.
I have seen the same issue from other users, but I don’t know if or how that was resolved as they didn’t come back to me.

OK, now they are added via the NVR, could you send the log again after moving in front of the camera.

The new log only shows the information for one camera, but I wonder if the duplicate Device Data error is caused by the NVR supplying its MAC address for all the cameras. The app uses the MAC address to identify each camera as in the past multiple cameras on and NVR are identified by the channel number, and therefore added to the app in a different way.
So, just to confirm, the auto-discovery is not working, so you are adding the cameras manually?
The cameras that you have added are working correctly?

Sorry, could you increase the log level to Detailed or even full information and do the same as the last log just shows Push Event unknown Device: 10.0.0.57, so it seems it can’t be identified.
I can see then name is (10.0.0.210 (Ch4)), so I wonder if the channel information sis being passed back in the event.

Before (yesterday), I added all the cameras individually via IP. today after deleting all (app and cameras) I loaded them automatically when adding NVR. The cameras work, but the motion detection doesn’t. I’m not at home now, so the last sent log is only for one camera after turning on the motion detection function but without the motion triger in front of the camera. I’ll try to send the log after switching on with movement in front of the camera, but when I’m home.
10.0.0.210 is th NVR address, 10.0.0.57 is the camera address.

After loading camaras automatically when adding NVR i must then change the IP for all 5 channels (for each camera), because otherwise all channels displayed the same image from one camera.
Now everything is displayed correctly (each channel is for one camera from NVR). Only the motion detection does not work. I have also already synchronized the time for all cameras.

Ah, that sort of explains it. When adding them via the NVR, the IP address should be the same, but the channel number should be different. That way the app gets all the data from the NVR and the NVR acts as a proxy to fetch the correct data.
You could also try putting the NVR IP address back into each camera and then change the USER Snapshot URL so that fetches directly from the camera IP.

Yes they are added manually.
The 2 camera’s which have been added are working correctly (at least the snapshot, I have no flows yet).

Ok i will try it. And the user name and password should be everywhere for the NVR or different for every camera (channel)? When I loaded the cameras from the NVR, I changed the user name, password and IP for each camera in the settings.

It should be the NVR credentials, unless you change the Snapshot URL to point to the camera, in which case it will be the camera credentials.
However, I would suggest try to get the correct image via the NVR first to ensure that channel number is correct.

Strange thing is this:

Blockquote
7:42:39.052: Adding {
“name”: “192.168.178.237”,
“data”: {
“id”: “c0:6d:ed:1c:12:e3”
},
“settings”: {
“username”: “xxxxxx”,
“password”: “xxxxxxxx”,
“ip”: “192.168.178.237”,
“port”: “65003”,
“urn”: “c0:6d:ed:1c:12:e3”,
“mac”: “c0:6d:ed:1c:12:e3”,
“channel”: -1
}
}

The mac adres (which I don’t fill in) is not the correct one for that camera on that port. Obviously that mac adres is from one of the already added cams. So why is it using the wrong MAC adres while I see the correct one in the HIK interface.

That should be the mac address of the NVR.

Normally, when an NVR is detected automatically, it reports the cameras via a channel number and not different ports. The app then shows a second stage during the add device procedure to add the cameras on each channel.
As your NVR is operating differently, I need to think of a different method to identify the cameras.
The ONVIF protocols are well defined, but most camera manufacturers abuse them to suit their own needs or only partially implement them.

Yes, strange thing is that it works for 2 and fails the 3rd time.
You’re right that the mac adress is from the NVR.

No idea why HIK puts the cams on different ports and not on different channels. I don’t see any option to change that. As for that, I don’t see the second stap when adding.

Channels are working. After adding the cameras via NVR, 5 channels were loaded, for which I modified the IP and login data to match the individual cameras and now it does not detect movement at all.
Here is the log after activating motion detection in one camera and with movement in front of the camera:

Log ID: 2024-08-16T22:12:22.211Z
App version 2.0.48

*22:12:22.211: Subscribe err (Camera Entry (10.0.0.56) ): ONVIF SOAP Fault The action requested requires authorization and the sender is not authorized: *
*22:12:22.213: *
## FAILED to register Push events (Camera Entry (10.0.0.56) ) undefined ##

I have published a test version that allows the port number to be appended to the mac address for the camera id. The option is a checkbox in the add camera settings. So remove the cameras and and add them again with the new option checked.

Sorry, I am really confused now as to what you are changing.
I suggest removing all the cameras from Homey and add them again via the NVR, but don’t change anything. Then let me know what works and what doesn’t.

I added the cam succesfully, but the URL for the snapshot seems incorrect. It’s adding the cam’s IP which should be the NVR’s IP following by the port.
After changing manually it still doesn’t work. Same for the old cams.

Working URL:
http://192.168.178.237:65003/Streaming/Channels/101/picture

Sorry for the confusion.
So I did it again. Removed everything, added it. In the onvif app it found the NVR (10.0.0.210) + also all 5 cameras, so I added the NVR only.

After entering the NVR login and password, it found 5 channels from the cameras.

I added to Homey and left everything unchanged, just activated motion detection.
In homey, every added camera has the same Snapshot (only from channel one) and motion detection does not work (false negative).


The rest looks ok. I am sending the log.
Thanx

@Dirk_vdM and @Mithrandir86 as your problems are similar but different, I am struggling to keep track of each issue in this topic.
Therefore, I will send each of you a PM so we can continue the help, but keep the tracks separated.

Nice garden by the way @Mithrandir86

Thank you for the compliment. It’s not quite done yet.
You are great, how quickly you respond and try to help.