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

Reolink RLC-520A V2 not triggering AI sensors #89773

Closed
dbiczo opened this issue Mar 16, 2023 · 14 comments
Closed

Reolink RLC-520A V2 not triggering AI sensors #89773

dbiczo opened this issue Mar 16, 2023 · 14 comments

Comments

@dbiczo
Copy link

dbiczo commented Mar 16, 2023

The problem

Vehicle & person sensors are not being triggered by push notifications from RLC-520A V2 camera. It looks like ONVIF motion events are being received by the integration but not triggering the sensors.
The camera has firmware v3.1.0.801_22010701 and there is no available update.
Camera has push enabled and is on same local network 192.168.200.48 as home assistant.
Home assistant has local network set as http://192.168.200.4:8123/ and has webhooks enabled.
I also tried with reolink-aio 0.5.5 with the same result.

What version of Home Assistant Core has the issue?

2023.3.4

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

Reolink IP NVR/camera

Link to integration documentation on our website

https://www.home-assistant.io/integrations/reolink

Diagnostics information

home-assistant_reolink_2023-03-15T07-25-28.165Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @starkillerOG, mind taking a look at this issue as it has been labeled with an integration (reolink) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of reolink can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign reolink Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


reolink documentation
reolink source
(message by IssueLinks)

@starkillerOG
Copy link
Contributor

@dbiczo thank you for reporting this issue and sharing the debug log.
It took me quite some hours, but I was able to reproduce the issue and figure out what is going on.

Your camera (RLC-520A) does not (yet) support rich ONVIF notifications, therefore when receiving a ONVIF push it will poll the status of the AI detection which takes about 0.5 to 1.5 seconds. During this time the webhook callback task would be cancelled (or garbage collected), stopping the processing while still waiting on the response.

I made this PR #89798 that will solve the problem and shields the callback from cancellation.

This will make sure all motion events will come through.
AI will be detected only if motion is detected at the same time (which I think is most of the time the case).

If you want 100% AI detection, the camera firmware needs to support rich ONVIF notifications: ONVIF WS base-notification messages schould include the Vehicle/Pet/Person rules and states.
You could request Reolink support to include this in the firmware for your camera type.

I do see there is a newer firmware version available for your RLC-520A: v3.1.0.951_22041566, you can get it from https://reolink.com/download-center/

@starkillerOG
Copy link
Contributor

If you appreciate the reolink integration and want to support its development, please consider sponsering the upstream library.

@dbiczo
Copy link
Author

dbiczo commented Mar 16, 2023

Many thanks for your hard work. I believe the RLC-520A: v3.1.0.951_22041566 firmware is for the IPC_523128M5MP model not for the IPC_523128M5MP_V2 version which I have. There have been numerous requests for a firmware upgrade in the community forum to which I have added mine. Fingers crossed.

@Stuartyboy75
Copy link

Stuartyboy75 commented Mar 17, 2023

Rather than opening another ticket these are my logs

home-assistant_reolink_2023-03-17T09-54-57.331Z.log

@starkillerOG
Copy link
Contributor

@Stuartyboy75 your reolink cameras are not able to reach http://stuartyboy75.duckdns.org succesfully so no ONVIF pushes are comming in.
Please use the IP as the local homeassistant adress under settings->general-network, something like: http://192.168.1.10:8123

@Stuartyboy75
Copy link

@starkillerOG I was watching a video on Reolink with Blue Iris and have changed Frame Rate/Interframe Space/Frame Rate Mode on one camera then enabled your integration and its working far better now.

Just need to find out what setting has made a difference so going to work backwards

@dbiczo
Copy link
Author

dbiczo commented Mar 21, 2023

I found a newer firmware for the RLC-520A V2 hardware model that is not available on the reolink download centre:
https://support.reolink.com/attachments/token/tb9cE1rSuu2Iat6TBCs14Y9ld/?name=IPC_523128M5MP_V2.1228_22082201.RLC-520A.OV05A10.5MP.REOLINK.pak

@starkillerOG
Copy link
Contributor

This will be resolved once HA 2023.04 is released on April 5th.
Therefore I will close this issue.

If you still encounter any issues once you are on HA 2023.04, please let me know by making a new issue.

@starkillerOG
Copy link
Contributor

@home-assistant close

@robertoamd90
Copy link

Great! i have the same problem, and i have resolved!
But in my use case HA and Reolink camera are in two different vlan, i'm able to get realtime notification only if my firewall traffic rule allow all port, from camera to HA, but i would like a restricted rule, only on necessary port.

Can you support me? or i have to create a new issue? i'm not sure because my problem probably is not an issue.

Thanks

@dbiczo
Copy link
Author

dbiczo commented Mar 25, 2023

Great! i have the same problem, and i have resolved! But in my use case HA and Reolink camera are in two different vlan, i'm able to get realtime notification only if my firewall traffic rule allow all port, from camera to HA, but i would like a restricted rule, only on necessary port.

Can you support me? or i have to create a new issue? i'm not sure because my problem probably is not an issue.

Thanks

Standard Ports
Onvif 8000, Media 9000, RTSP 554, RTMP 1935

Open web front end to camera to check
Settings -> Network -> Advanced -> Port Settings

@robertoamd90
Copy link

robertoamd90 commented Mar 25, 2023

Great! i have the same problem, and i have resolved! But in my use case HA and Reolink camera are in two different vlan, i'm able to get realtime notification only if my firewall traffic rule allow all port, from camera to HA, but i would like a restricted rule, only on necessary port.
Can you support me? or i have to create a new issue? i'm not sure because my problem probably is not an issue.
Thanks

Standard Ports Onvif 8000, Media 9000, RTSP 554, RTMP 1935

Open web front end to camera to check Settings -> Network -> Advanced -> Port Settings

allow traffic on all ports you have reported, from Camera to HA, the motion detection on HA is delayed of 60 seconds, due to the polling from HA to Camera. If I allow all port, the morion detection from HA panel is near real time.

Screenshot 2023-03-25 at 08 50 04

@starkillerOG
Copy link
Contributor

@robertoamd90 advanced network configurations like putting the reolink cams in a seprate restricted VLAN are not supported.
I do think it schould be possible with the correct network configurations, but this depends on your network setup and equipment.
If you figure out how to get it working, please do add the information to the troubleshooting section of the reolink documentation:
https://www.home-assistant.io/integrations/reolink/#troubleshooting

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants