sr99622 / libonvif

Onvif library with GUI implementation and built in YOLOX
GNU Lesser General Public License v2.1
175 stars 45 forks source link

Script time setting on camera? #61

Open Itsisme opened 1 year ago

Itsisme commented 1 year ago

Hello,

Is there a way to script the time setting from bash/shell ?

It works great logging in to the CAM and use : time_sync However I am looking to script the time so that when switching on the cam remotely the time can be set correct before further usage ?

Cheers P.

sr99622 commented 1 year ago

Thank you for your inquiry,

I added a time sync flag to the command line so that the onvif-util program could be used to sync the time from a script. To use the flag, you could write a script such as

onvif-util -u admin -p admin123 -t 192.168.1.6

the -t flag tells the program to sync the time for the camera at the ip address specified. This will work better if the camera has a fixed ip address, as a DHCP configuration could change over time and cause the script to fail.

Best Regards

Itsisme commented 1 year ago

Thanks this works great now I have a way to remote start and sync a cam.... It indeed is static assigned.

Again many thanks...