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

Hi Adrian,

iam using your app for quite some time with the reolink doorbell. Normally I had a general alarm that I used to trigger my flows. Unfortunately it’s not working anymore sinds I updated the camera firmware to: v3.0.0.3215_2401262240

I removed the camera and added it again. The thing is it is not adding the general alarm anymore.

Is there a way to add this? I have already pushed the doorbell button a few times hoping it would add this alarm type.

Hope you can help me out :slight_smile:

Can you set the Diagnostics log to Detailed then press the button and give it 30s or so and then send the log. I will take a look to see if it’s picking something up.

Thnx! I just send you the logs. As I see I only see the visitor state. Maybe they use that for the button push?

Yep, all I see is Visitor. If that always coincides with pushing the button and not just motion, then that’s the answer.

Yes I think it is. When I push the button it triggers only this alarm. Thnx for the quick respons!

1 Like

Hi Adrian,
I have it running for a couple of days now. But it doesn’t feel so stable as before the fw upgrade.

The alarm is not triggered instant like it used to. Sometimes it’s not or late. Sometimes it’s instant so the melody I connected to the alarm is playing directly. But in other moments the sound goes of even after I close the door taking a delivery.

Is there an optimization needed on the onvif app, or is the firmware just bad?

To bad I don’t know the fw version I had before. So I could try and revert to it.

The app responds pretty quickly as it uses either push messages or a constant connection for pull requests. All I can suggest is to monitor the Diagnostics Log to see how quickly the events fire.

Oké thnx I will monitor it some more :+1:t2:

Hi Adrian. Have 2 HikVision cams connected to NVR. Managed to get them both working. At first motion detection somehow did not work. After fiddling with ONVIF Motion Notification and setting it from Motion(Ismotion) to Motionalarm (state) it now picks up motion but as soon as it detects motion (doesn’t matter which cam) the app crashes. Could use some guidance :face_with_monocle:

Could you send the Diagnostics Log from the App Settings page (not the Homey log), after the app crashes and as soon as you start it up again.

Just did. ecd1d92c-9a76-4544-80c8-7100cf3c2605

Having two reolink 822a connected to nvr rln8-410. When person/car/pet detection triggered, and sending a push/notification, it always send double notifications with under 1sec apart. When testing flow in homey it only sends one, btr when camera triggers flow I get duplicated notices/push.

What am I doing wrong? Tried push/pull and multiple other settings wihe same result. Latest firmware for both camera and nvr as of today.
NVR: v3.4.0.304_24031817
Camera: v3.3.0.282_23103128

A detailed log:

Log ID: 2024-03-30T20:12:59.294Z
App version 2.0.48

20:12:59.294: Push event: 10.16.20.50
20:12:59.297: Push event token: 000
20:12:59.299: Wrong channel token
20:12:59.300: Push Event found correct Device: 000
20:12:59.303: Push Event process: {
"topic": {
"<em>": "tns1:RuleEngine/MyRuleDetector/PeopleDetect",
"$": {
"Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
}
},
"message": {
"message": {
"$": {
"UtcTime": "2024-03-30T20:12:58.000Z",
"PropertyOperation": "Changed"
},
"source": {
"simpleItem": {
"$": {
"Name": "Source",
"Value": "000"
}
}
},
"data": {
"simpleItem": {
"$": {
"Name": "State",
"Value": true
}
}
}
}
}
}
20:12:59.305:
-- Event detected (Inngang-nvr) --
20:12:59.308: {
"topic": {
"</em>": "tns1:RuleEngine/MyRuleDetector/PeopleDetect",
"$": {
"Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
}
},
"message": {
"message": {
"$": {
"UtcTime": "2024-03-30T20:12:58.000Z",
"PropertyOperation": "Changed"
},
"source": {
"simpleItem": {
"$": {
"Name": "Source",
"Value": "000"
}
}
},
"data": {
"simpleItem": {
"$": {
"Name": "State",
"Value": true
}
}
}
}
}
}
20:12:59.311: *** Event token 000, channel token 000

20:12:59.313: Event data: (Inngang-nvr) RuleEngine/MyRuleDetector/PeopleDetect: State = true
20:12:59.315: Event Processing (Inngang-nvr):true
20:12:59.318: Event Trigger (Inngang-nvr):Person Detected = true
20:12:59.326: Updating Motion Image in 0seconds
20:12:59.545: Event snapshot URL (Inngang-nvr): [http://10.16.20.50:80/cgi-bin/api.cgi?cmd=onvifSnapPic&channel=0](http://10.16.20.50/cgi-bin/api.cgi?cmd=onvifSnapPic&channel=0)
20:12:59.547: Fetching (Inngang-nvr) MOTION EVENT image with Digest Auth. From: [http://10.16.20.50:80/cgi-bin/api.cgi?cmd=onvifSnapPic&channel=0](http://10.16.20.50/cgi-bin/api.cgi?cmd=onvifSnapPic&channel=0)
20:13:0.062: SnapShot fetch result (Inngang-nvr): Status: true, Message: OK, Code: 200

20:13:0.123: Event Image Updated (Inngang-nvr)
20:13:7.984: Push event: 10.16.20.50
20:13:7.987: Push event token: 000
20:13:7.989: Wrong channel token
20:13:7.991: Push Event found correct Device: 000
20:13:7.993: Push Event process: {
"topic": {
"<em>": "tns1:RuleEngine/MyRuleDetector/PeopleDetect",
"$": {
"Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
}
},
"message": {
"message": {
"$": {
"UtcTime": "2024-03-30T20:13:07.000Z",
"PropertyOperation": "Changed"
},
"source": {
"simpleItem": {
"$": {
"Name": "Source",
"Value": "000"
}
}
},
"data": {
"simpleItem": {
"$": {
"Name": "State",
"Value": false
}
}
}
}
}
}
20:13:7.996:
-- Event detected (Inngang-nvr) --
20:13:7.998: {
"topic": {
"</em>": "tns1:RuleEngine/MyRuleDetector/PeopleDetect",
"$": {
"Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
}
},
"message": {
"message": {
"$": {
"UtcTime": "2024-03-30T20:13:07.000Z",
"PropertyOperation": "Changed"
},
"source": {
"simpleItem": {
"$": {
"Name": "Source",
"Value": "000"
}
}
},
"data": {
"simpleItem": {
"$": {
"Name": "State",
"Value": false
}
}
}
}
}
}
20:13:8.000: *** Event token 000, channel token 000

20:13:8.003: Event data: (Inngang-nvr) RuleEngine/MyRuleDetector/PeopleDetect: State = false
20:13:8.006: Event Processing (Inngang-nvr):false
20:13:8.011: Event Trigger (Inngang-nvr):Person Detected = false
20:16:23.284: Renewing subscription
20:16:23.287: App.subscribeToCamPushEvents: Oppkjørsel-nvr
20:16:23.290: App.subscribeToCamPushEvents: Found entry for 10.16.20.50
20:16:23.302: Renew previous events: http://10.16.20.50:8000/onvif/Notification?Idx=52666
20:16:23.436: Renew subscription response (Oppkjørsel-nvr): 10.16.20.50
info: [
{
"renewResponse": [
{
"terminationTime": [
"2024-03-30T20:21:23Z"
],
"currentTime": [
"2024-03-30T20:16:23Z"
]
}
]
}
]
20:16:23.439: Push renew every (Oppkjørsel-nvr): 300
20:16:34.319: Sending log
20:16:35.232: Message sent: [0ed46674-aedb-f63f-68a2-53db7980a316@ady.duckdns.org](mailto:0ed46674-aedb-f63f-68a2-53db7980a316@ady.duckdns.org)
20:21:18.444: Renewing subscription
20:21:18.446: App.subscribeToCamPushEvents: Oppkjørsel-nvr
20:21:18.448: App.subscribeToCamPushEvents: Found entry for 10.16.20.50
20:21:18.450: Renew previous events: http://10.16.20.50:8000/onvif/Notification?Idx=52666
20:21:18.545: Renew subscription response (Oppkjørsel-nvr): 10.16.20.50
info: [
{
"renewResponse": [
{
"terminationTime": [
"2024-03-30T20:26:18Z"
],
"currentTime": [
"2024-03-30T20:21:18Z"
]
}
]
}
]
20:21:18.549: Push renew every (Oppkjørsel-nvr): 300

The first event is for person being detected, the second event is for person not being detected anymore. Perhaps you need to add an additional card to check the status and only send a notification for the first event.

As @robertklep says, only the first event should fire trigger the Flow. Do you have any other motion event triggers hooked up as the app will also set the generic motion alarm?

Hi, I have flows as following: one for trigger person(s) and one for triggering car(s) both cameras. (4 diff flows). All motion seems to trigger as expected, only problem is they trigger double norifications within same second. Only happends when triggered by camera motion, not when testing manually in homey. No other flows / triggers in homey have the same problem, only the two cameras. Have tried adding timers once triggered to prevent it to trigger again before at least 2 min have gone, but dont help. The reolink push notification only notifies once (normally not used as I want homey to be in charge)I will do some more debugging and isolations ……thank you for your time.

This is one of the flows

Basic information from double notification done just now. I dont see any obvious problem, but you guys knows best :slight_smile:
Any other suggestions to settings/changes to try?

Log ID: 2024-03-31T16:50:01.243Z
App version 2.0.48

16:50:1.243: Push event: 10.16.20.50
16:50:1.248: Push event token: 000
16:50:1.250:
– Event detected (Inngang) –
16:50:1.253: *** Event token 000, channel token 000

16:50:1.255: Event data: (Inngang) RuleEngine/MyRuleDetector/PeopleDetect: State = true
16:50:1.258: Event Trigger (Inngang):Person Detected = true
16:50:1.261: Updating Motion Image in 1.5seconds
16:50:3.041: Fetching (Inngang) MOTION EVENT image with Digest Auth. From: http://10.16.20.50:80/cgi-bin/api.cgi?cmd=onvifSnapPic&channel=0
16:50:3.569: SnapShot fetch result (Inngang): Status: true, Message: OK, Code: 200

16:50:3.630: Event Image Updated (Inngang)
16:50:10.442: Push event: 10.16.20.50
16:50:10.451: Push event token: 000
16:50:10.452:
– Event detected (Inngang) –
16:50:10.453: *** Event token 000, channel token 000

16:50:10.455: Event data: (Inngang) RuleEngine/CellMotionDetector/Motion: IsMotion = true
16:50:10.457: Event Trigger (Inngang):IsMotion = true
16:50:10.459: Ignoring unchanged Motion event (Inngang) IsMotion = true
16:50:10.460:
– Event detected (Inngang) –
16:50:10.461: *** Event token 000, channel token 000

16:50:10.463: Event data: (Inngang) RuleEngine/MyRuleDetector/PeopleDetect: State = false
16:50:10.465: Event Trigger (Inngang):Person Detected = false
16:50:10.469:
– Event detected (Inngang) –
16:50:10.470: *** Event token 000, channel token 000

16:50:10.472: Event data: (Inngang) VideoSource/MotionAlarm: State = true
16:50:18.111: Push event: 10.16.20.50
16:50:18.118: Push event token: 000
16:50:18.119:
– Event detected (Inngang) –
16:50:18.121: *** Event token 000, channel token 000

16:50:18.123: Event data: (Inngang) RuleEngine/CellMotionDetector/Motion: IsMotion = false
16:50:18.125: Event Trigger (Inngang):IsMotion = false
16:50:18.126:
– Event detected (Inngang) –
16:50:18.128: *** Event token 000, channel token 000

16:50:18.130: Event data: (Inngang) VideoSource/MotionAlarm: State = false

Is it possible to make Amcrest IP8M-2496EW-V2 to work with this app? It have onvif support but I can not make it work.

If the camera supports ONVIF then it should work. Often the ONVIF has to be enabled in the camera and an account needs to be created.
Does the app detect the camera?
What exactly doesn’t work?

Amcrest IP8M-2496EW-V2 supports ONVIF and I have enabled ONVIF in the camera settings.
The app detects the camera.
Then the box appears where I have to enter USERNAME, PASSWORD, IP ADDRESS and ONVIF SERVICE PORT.
I fill this in and set the port to 554, as that’s the one I use for RTSP - it’s often the same.
Then I get the error message:
Error: Discovery error: socket hang up

I tried some other ports as well:
Port: 37777 - Error: Network request failed
Port: 37778 - Error: Discovery error: connect ECONNREFUSED 192.168.1.41:37778
Port: 888 - Error: Discovery error: connect ECONNREFUSED 192.168.1.41:888

I should add that I am not very knowledgeable in the field :slight_smile: