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

ONVIF - Reolink Events not working #36145

Closed
fwestenberg opened this issue May 25, 2020 · 24 comments
Closed

ONVIF - Reolink Events not working #36145

fwestenberg opened this issue May 25, 2020 · 24 comments

Comments

@fwestenberg
Copy link
Contributor

The problem

Reolink events are not showing up in Home Assistant. They are visible in third party software like ONVIF Device Manager. In Home Assistant I also activated the log level - info, as described in the integration page. Also no info here. Camera stream is working.

Environment

  • Reolink RLC-410 and RLC-420 camera's

  • Home Assistant Core release with the issue: 0.110.2

  • Last working Home Assistant Core release (if known): n/a

  • Operating environment (Home Assistant/Supervised/Docker/venv): Supervised

  • Integration causing this issue: ONVIF

  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/onvif/

Problem-relevant configuration.yaml

ffmpeg:

Traceback/Error logs

n/a - no errors or info in the log.

Additional information

@probot-home-assistant
Copy link

Hey there @hunterjm, mind taking a look at this issue as its been labeled with a integration (onvif) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@hunterjm
Copy link
Member

This version of the integration only supports events via PullPoint subscription. On top of that, only if the camera advertises support when requesting it's capabilities. This differs from ODM in two ways:

  1. ODM supports both basic notifications and pullpoint notifications. It can be changed to "only PullPoint" in the settings (please do so and let me know if you still see events)
  2. As far as I know, ODM doesn't do the additional "Capabilities" check.

@fwestenberg
Copy link
Contributor Author

fwestenberg commented May 26, 2020 via email

@fwestenberg
Copy link
Contributor Author

I just found out the node-red-contrib-onvif-nodes module is working for my camera. If I just call the Start Listening service, the motion events shows up. Perhaps this helps you in the development.

@hunterjm
Copy link
Member

hunterjm commented Jun 2, 2020

@Tekno-man
Copy link

Hi all, I am having the same problem and from what I have read above it seems like a more difficult problem. Is there likely to be a solution in the future?

@ricarva
Copy link

ricarva commented Jul 6, 2020

@fwestenberg same problem here. One question, though: did you have to tweak anything in ODM's settings to get the events to show up there?

My E1 Zoom is able to be accessed through ODM and most of the settings on there work fine, bur the Events page gives me a error "... remote server returned an unexpected response: (400) Bad Request".

@fwestenberg
Copy link
Contributor Author

Hi @ricarva,

No tweaks were needed. It just worked. :-)

@ricarva
Copy link

ricarva commented Jul 6, 2020

Thanks @fwestenberg

'Guess maybe it's the ONVIF implementation in the E1 Zoom that has some sort of problem or deliberate limitation. Bummer.

@Tekno-man
Copy link

I gave the ODM software a go too and the event streams popped up instantly.
@fwestenberg with the node red integration did i understand correctly that you are able to get the events triggered through a node?

@ricarva
Copy link

ricarva commented Jul 7, 2020

@Tekno-man what model Reolink camera(s) are you using?

@Tekno-man
Copy link

@ricarva the RLC-420

@fwestenberg
Copy link
Contributor Author

I gave the ODM software a go too and the event streams popped up instantly.
@fwestenberg with the node red integration did i understand correctly that you are able to get the events triggered through a node?

Check this out, very easy. For some reason I get multiple events for the same motion detection.

image

@Tekno-man
Copy link

Thanks @fwestenberg will give that a go. Cheers

@ricarva
Copy link

ricarva commented Aug 18, 2020

@hunterjm

Any luck chasing down/solving the bug that prevents Reolink events from being registered? Any way that we could help your efforts?

@UmbraMalison
Copy link

UmbraMalison commented Aug 25, 2020

@hunterjm It may help to know that I have the same experience with Dahua IPC-HDW5231R-ZE.

Here are the events in ODM:
Screenshot from 2020-08-25 13-54-39

These events don't appear in the home assistant integration. and like others, I have set the log level to info - I don't see any issues in the log.

@fwestenberg - how did you set ODM to only pullpoint?

Thanks

@UmbraMalison
Copy link

@fwestenberg - stand down. found it, for anyone else. Click spanner settings icon in the right hand corner, in the middle of that dialog window is a drop down where you can select pull point only.

@UmbraMalison
Copy link

related ticket in core here: #37545

@UmbraMalison
Copy link

since upgrading to 115.2 (was on 114.4 iirc) events are now working. Not precluding intermediary releases, but this is now fixed for me.

@pipip
Copy link

pipip commented Sep 21, 2020

I don't see any onvif events for my reolink e1 pro nor for my e1 zoom registered...

@ricarva
Copy link

ricarva commented Sep 22, 2020

I don't see any onvif events for my reolink e1 pro nor for my e1 zoom registered...

Same for me: events are still not showing up for Reolink.

@fwestenberg
Copy link
Contributor Author

I also still don't see events showing up in the log, when setting up my Reolink RLC-410 and RLC-420 camera's.

@github-actions
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@catalin2009
Copy link

catalin2009 commented Feb 7, 2021

        I found a solution  (possible bug) for this in the file parser.py from onvif integration.
          This could be a solution also for #37545, #37878, #42784, #36757, #36145


             My NVR ONVIF reports data movement event state like this: (see my previous message from Dec 20, 2020 on #37545):

........................................
tt:Data <tt:SimpleItem Value="1" Name="State"></tt:SimpleItem></tt:Data>
.......................................

               In Onvif integration from https://github.com/home-assistant/core/tree/dev/homeassistant/components/onvif
              The file parser.py compares onvif event data state with a value equal to "true":

try:
source = msg.Message.value_1.Source.SimpleItem[0].Value
return Event(
f"{uid}{msg.Topic.value_1}{source}",
f"{source} Motion Alarm",
"binary_sensor",
"motion",
None,
msg.Message._value_1.Data.SimpleItem[0].Value == "true"

             As my NVR reports "1" for movement, I simply replaced value "true" with "1" ., like this: 

try:
source = msg.Message.value_1.Source.SimpleItem[0].Value
return Event(
f"{uid}{msg.Topic.value_1}{source}",
f"{source} Motion Alarm",
"binary_sensor",
"motion",
None,
msg.Message._value_1.Data.SimpleItem[0].Value == "1"

       To modify parser.py I installed ONVIF as custom_component by creating custom_components folder in config folder 
       and moving inside onvif folder from github. I modified parser.py in this folder. So onvif now works from 
       custom_components, not from original integration.

       Now the events work.
        I hope this helps somebody.

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

No branches or pull requests

8 participants