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 Service #1296

Closed
wants to merge 4 commits into from
Closed

Onvif Service #1296

wants to merge 4 commits into from

Conversation

Sian-Lee-SA
Copy link

Created an Onvif service that allows PTZ Control (including presets), Resolution Changes, FPS changes Stream URI and Snapshot URI.

Currently auto discovery hasn't been implemented as of yet but can be added easily by using the port (default: 8080) and ip of the camera.

A startup script has been added which can start and stop the service via the web interface. This has been tested on Synology Surveillance Station and works quite well. Listening port can be changed by using the --port flag.

@jmtatsch
Copy link
Collaborator

jmtatsch commented Mar 1, 2020

Amazing!
Many people have been hoping for onvif support for a long time.
Unfortunately, for security reasons, we do not accept binary pull requests.
Could you please also contribute the source code and a build script for onvif_srvd at https://github.com/Dafang-Hacks/Main ?

Copy link
Collaborator

@jmtatsch jmtatsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this file be renamed to something more meaningful like camera_position_presets.conf

@Sian-Lee-SA
Copy link
Author

Could this file be renamed to something more meaningful like camera_position_presets.conf

I was thinking this at the moment I committed. But I will update the file name. Was thinking ptz_presets.conf?

Not going to lie, the whole process has been a head scratcher considering the lack of documentations and examples involving onvif code. In the end I learnt a lot and as I was browsing the issues, I had noticed the request for ptz support and figured this service would help those out who wish to use ptz via onvif.

With that said, the code is still a bit premature and maybe a little tailored for my own environment but I had a sudden urge to offer this function based on high demand...

I just forked https://github.com/Dafang-Hacks/Main and will commit the source code after I clean somethings up then will initiate a pull request.

@sedony23
Copy link

This is extraordinary. Thanks Sian! It would be great, if this could be integrated in the official tree!

@Sian-Lee-SA
Copy link
Author

Sian-Lee-SA commented Mar 20, 2020

This has been merged in the Main repo Dafang-Hacks/Main#41

This was referenced Mar 20, 2020
@jmtatsch
Copy link
Collaborator

Defaults credentials seem to be root/password on port 8080

@mitchoklemen
Copy link

Sian Thak you very much!!

@LiloBzH
Copy link

LiloBzH commented Mar 20, 2020

Thank you ! :)

@Benouzao
Copy link

This is great, super excited about this one!
Is there plan to add configuration capability to change pwd and port?
Could not check yet, but can anyone confirm audio is working?
Thanks

@uski
Copy link

uski commented Apr 2, 2020

This is great. Any plan for motion detection through onvif ? I believe the camera can notify the NVR when motion is detected, so that the NVR can do recording only during motion detection.
At least the notification could be implemented, but it would also be possible to change the motion detection settings in the camera through ONVIF, as a future stage.

@throttlenerd
Copy link

This is sooo great! Thank you guys!!!!

@throttlenerd
Copy link

Hey guys, just in case it could be helpful: I toggled Autorun on for onvif-srvd.sh, but even though camera stream via ONVIF works on my Synology NAS, PTZ controls, if I reboot the camera, do not. If, after the camera boots up, I manually stop onvif-srvd.sh and then start it again -- PTZ works.

Xiaomi Dafang with latest soft from Elias
Synology DS218j, all apps/OS up-to-date

@dave-code-ruiz
Copy link

Great job! Amazing result on my nvr, Any plan for motion detection through onvif ? I believe the camera can notify the NVR when motion is detected, so that the NVR can do recording only during motion detection

@xDYR0
Copy link

xDYR0 commented Sep 23, 2020

Hi, which settings are needed to get it working? https://i.imgur.com/m5k6aFi.png
image

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

Successfully merging this pull request may close these issues.

None yet

10 participants