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 motion detection on HIK nvr #937

Open
piot84zet opened this issue Sep 20, 2024 · 20 comments
Open

ONVIF motion detection on HIK nvr #937

piot84zet opened this issue Sep 20, 2024 · 20 comments

Comments

@piot84zet
Copy link

Hello, thank you for the great job.
I got problem with my hik nvr. I want to start records based on motion detection. Is any way to make it work?
my yi home 2k pro (y623) is detected by nvr, got streams, can continuous record. Want to change the continuous record to record when motion is detected. When changes options in my nvr, always shows cam doesn't suport motion detection.
I can resign lot from fw, just need to cam work with nvr and record when motion is detected.
Thank you for any help.

@roleoroleo
Copy link
Owner

The cam supports event handling through ONVIF.
When the cam detects a motion, it sends a message to the onvif client (nvr).
So the NVR can handle the event as it wants.
The cam supports both Pullpoint Subscription and WS Base. It depends on the client.
You can try this feature with Onvif Device Manager.

@piot84zet
Copy link
Author

Thank you for replay.
What is strange, ODM does not see my cam. others cams (hik) are visiable. Will try to reformat sd and start everything from begining.
Is it nessesary to start with official app? I just opened box after shippment arrived and inserted sd with your fw.

Will be back soon.

@piot84zet
Copy link
Author

Ok, ODM can see yi hacked cam, but events shows very late, or not.
Well...no matter what I try to set on yi hack web, and after try to turn on motion detection for this cam in nvr, I just get "incorrect operation" from my nvr website.

@roleoroleo
Copy link
Owner

I recently fixed some bugs.
Please try this version:
y623_0.3.2.tgz

@piot84zet
Copy link
Author

Thank you for new image.
On this image webapi works faster I think so.
For motion detection, I changed all options related to rtsp and onvif and unfortunately I still get the "incorrect operation" message.
I tried to change the RTSP server program to "alternative" or "go2rtc" but after reboot it returns to "standard".
In ODM when clik "Events" get "Error during events subscripion: Subscribe creation failed fault".

Any sugestion?
Should I turn on/off anything in yi app? i didnt even instaled it, just started with yi hack on brand new cam.

@roleoroleo
Copy link
Owner

For motion detection, I changed all options related to rtsp and onvif and unfortunately I still get the "incorrect operation" message.

RTSP is not related to onvif events.

I tried to change the RTSP server program to "alternative" or "go2rtc" but after reboot it returns to "standard".

Maybe you need to clear the cache of the browser, I changed js code.

In ODM when clik "Events" get "Error during events subscripion: Subscribe creation failed fault".

This is strange. Check the option, are you using PullPoint or WS-Base?
immagine

Should I turn on/off anything in yi app? i didnt even instaled it, just started with yi hack on brand new cam.

No, if the wifi is running properly, the app is not necessary.

@piot84zet
Copy link
Author

I just installed ODM, nothing changed, so "application settings" looks like your screen.

After few hours of searching just clicked on my other cam with onvif where motion detection works well. And please look at this screen:
obraz
In "Profiles" section can find "Video Analytics Configuration" and some with "motion detection rule"
here is screen from yi hack cam:
obraz
there is no section with Analytics

here is my prtscreen from yi hack webapi config site onvif section:
obraz

@roleoroleo
Copy link
Owner

roleoroleo commented Sep 23, 2024

VideoAnalytics is not supported in this simplified onvif server.
But I never find a client that needs this configuration.
Usually (client side) events handling is not related to VideoAnalyticsConfiguration.

About ODM, what do you see in Events page?
Does ODM receive event messages?

@piot84zet
Copy link
Author

Do I need to have like that in options?
obraz

In ODM got mesages after a long while when cover cam with hand.
obraz

@roleoroleo
Copy link
Owner

Yes, you need motion detection enabled in your cam.
Is the message late?
If yes, please compare the time with the mqtt messages, if you configured mqtt.
I need to understand if the delay depends on the cam or on the onvif implementation.
Another try, you could try configuring ODM with WS-Base instead of PullPoint.

@piot84zet
Copy link
Author

Yes, get late mesages.
On Base Subscription no messages at all.
but even got messages on Pullpoint in ODM, NVR doesnt recrod any video based on motion.

Must configure mqtt to check it deley, will check it later.

What else I find, when change RTSP server program to other than Standard, NVR cant connect with cam.

@roleoroleo
Copy link
Owner

On Base Subscription no messages at all.

Remember to disable the software firewall. The cam will try to connect to your PC.

What else I find, when change RTSP server program to other than Standard, NVR cant connect with cam.

Does it work with VLC?

@piot84zet
Copy link
Author

piot84zet commented Sep 26, 2024

Well, what is strange, when open ODM when cam is on, get error "Subcribe creation failed fault" with reading Events in ODM. after a while, cam reset itself. After reset cam and refresh ODM, get no error in Events section.
On Base Subscription get late messages too or no messages at all. all firewalls turned off.
Noticed, after rebots cam (changing options) Evenst show "Subcribe creation failed fault". must restart ODM and cam.

Ok, tried to change to go2rtc/alternative and check with vlc, but after saving and rebot, its go back to "standard" rtsp server.

@piot84zet
Copy link
Author

just upgraded to 12.0.51.08_202403081746 and started from beginning.
On standard y623_0.3.2.tgz on "high" profile in Onvife can't get motion records in nvr. after selectin "low" in "profile Onvife" nvr cant connect with cam.
Tried to change for ONVIF Network Interface to "Ethernet" but nvr cant connect with cam.

@roleoroleo
Copy link
Owner

Please, update with this beta:
y623_0.3.2.tgz

@piot84zet
Copy link
Author

upgraded from sd.
still cant start move detection with this cam in my nvr.
tried to change Configurations->[ONVIF configuration]-> ONVIF profile -> both/low
after this I get "error of parametr" when trying to connect from nvr.
tried to change HTTPD Port to 4520, but still get "error of paramter".
After go back to 80 port, still "error of parametr".
So Im going to factory reset it now.

@piot84zet
Copy link
Author

after factory reset still "error of paramtr" for this cam and cannt add to nvr. Everty time I do any chagne in opiotns in cam, I delete from nvr and add freshly. everytime get error.

i dont know what is going now.... will try to reformat sd and try again from the beginning.

@roleoroleo
Copy link
Owner

Is there a log in the NVR to understand which parameter is not correct?

@piot84zet
Copy link
Author

Well, after hard work to find any log, can say it has just main logs on nvr's lokal website like starting recording from movement, disconected or smth like that.
Find option to log on usb drive, will tray soon, and will be back with this log.
Probably it will be better to turn off others cam to have clear logs, am I right?

@roleoroleo
Copy link
Owner

Probably it will be better to turn off others cam to have clear logs, am I right?

You could also capture network traffic with wireshark or tcpdump.

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

No branches or pull requests

2 participants