-
Notifications
You must be signed in to change notification settings - Fork 14
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
Motion detection not being advertised? #19
Comments
You should check if your client supports PullPoint or Base Subscription. |
Yeah events=3 was a default setting - I changed it to 1 to see if it can fix my issue. It does not work either way. |
Please check if it works with another client, for example Onvif Device Manager. |
I would love to check and compare with a known good working camera but I am not familiar with onvif's data structure. I don't know where to look and what to look for. If you can give me some instructions it would be much appreciated. |
Download Onvif Device Manager (it's a Windows software), install and run it. |
I've been walking in front of a camera back and forth to trigger the motion and finally saw ONE message appeared on the Events tab! It was "Motion End" event. With no "Motion Start" before it. I checked onvif_notify_server debug log (see my 1st post) and it is detecting motion start event flag file no problem. The message was there on this page and few minutes later It has disappeared. While other cameras display a message history for past few hours. So my guess there is a problem between onvif_notify_server and onvif_simple_server where the event messages not being conveyed properly or reliably or something like that. |
It's strange, because onvif_notify_server is logging the subscription:
This log means that onvif_notify_server knows that there is 1 subscription. |
Well, SOME messages are coming through so it's not that. It cant be selective isn't it? |
I don't understand. |
Please, pull the repo. |
Well yeah - that's a progress! I can see motion event start and end in ODM now! |
Could you send me the same capture for the non working cam? |
The logs are different but I can't understand what's the problem. |
Ok. I'll try. |
Nothing. |
Well, thanks for trying anyways! At least you fixed subscription expire bug |
I will try again when I come back home |
Are you sure that your cam is not using a native protocol to send detection messages? |
I have this same, i use YI cam with your firmware version 0.3.9 with enabled Synology compatiblity. This is few onvif tcpdumps from my synology:
|
Try to remove the line |
Can I do this over SSH without rebuilding onvif server? Also I see that on
yi cam configuration page I cannot turn on Synology compatible, when I
click to this option it change colour to blue, but after click save and
refresh page I see this option disabled. This same after reboot camera.
|
Yes, you can edit the file with vi through a ssh session. |
Nothing changed on my end... |
Yes, it's not enough but I found the problem (I think). |
What is most simple method to build onvif simple server form main and put this to YiCam? |
After changing source_name=Source in the config Synology does recognize camera's motion detection and it works now. |
If you mean Allwinner-v2:
|
What's the problem, onvif in general or events handling? |
I means v1:
|
There are submodules. |
So:
and on camera:
But in synology i have error about cannot found stream address, i havent copied this message. In tcpdump:
Maybe i have problem with build this? |
This message is normal. |
I'm not sure if this is working as expected... Yesterday, my camera restarted. Today, I ran killall onvif_notify_server wsd_simple_server again, then transferred the build files from yesterday using scp, replaced the events section in the camera configuration with the example from this repository, restarted the killed services, started tcpdump, and attempted to add the camera to Synology. However, in the summary, I still see the following (as usual): Additionally, in the configuration, I couldn't select "by camera": There is pcap file and ONVIF dump: I suspect that this binary might have some verbose output or logs available, so I tried running it with debug mode enabled. Here’s what I did:
An unrecognized option warning appeared for decoder=NONE. After running the camera in foreground mode, Synology still couldn't authenticate with the camera. I suspect there might be a threading issue in this mode. Therefore, I stopped it and restarted the camera without foreground mode:
I then started tcpdump (after entering the IP in Synology, so this tcpdump missed the first two ONVIF messages) and repeated the process of deleting and adding the camera. This time, the camera was added successfully, and motion detection worked. Here are the pcap file and ONVIF dump for the successful attempt: onvif.working.txt However, I later noticed that Synology still didn’t detect the motion event. Here’s what happened: At 19:53 local time (20:53), the camera detected motion, and the file human_detection was created in /tmp/onvif_notify_server:
Despite this, Synology didn’t register any motion event: Below is the ONVIF dump captured during the time of motion detection: |
I think it's better if I prepare a new image for you, before restarting with the test. |
Firmware Version 0.3.9 |
Here it is: |
Ok, now i added without any problems, but issue is still with sending notifiction about human detection to synology - i dont see motion event in synology.
xml dump: |
Human detection and motion event are two different events.I think that synology doesn't subscribe human detection.
But I can check it.
|
I see that human_detection was only when my wife has moved, when she stop human_detection has gone. |
What I mean to say is that Synology, afaik, is able to handle just "motion detection" events (tns1:VideoSource/MotionAlarm). |
Ok, I thought to find a way for synology to support more events than just motion_detection. A quick google prompted me that some synology profiles support various onvif events. I accessed the synology configuration files, and wrote a piece of script that found me profiles that have these settings:
I tested on the profile for the LTS VSIP8442W-28MA camera, and synology reads the image and can save. Unfortunately events it can not recognize because this profile has such onvif_topic:
which is completely different from what YiHack sends. I have attached an imperfectly processed configuration of profiles that meet the above settings (chatGPT some more and more lazy...), could you tell which profile would be the best to adapt for YiHack? Obviously YiHack's synology compatibility option would have to expose events on the paths that the profile expects. |
This topic:
|
Hello! I have an issue where both Synology and a hardware NVR can not seem to detect the motion detection capability of a camera running onvif_simple_server. On Syno there is no option to choose to have motion detected "by camera" (only disabled or by synology) and NVR board I have just have grayed out all the motion detection options for the camera. Am I missing something in the config file (I hope) or is it a bug?
P.S. Notify server works fine and detects motions well it seems:
The text was updated successfully, but these errors were encountered: