Search code examples
onvifpython-onvif

Set date and time in Hikvision camera from bash or REST?


How can I set date and time in a hikvision camera from linux command line? Or from some language, like Python, PHP, etc... I have a computer connected to cameras, and I want to change date and time in cameras without access to browser, only from terminal. Thanks


Solution

  • You might use the document HIKVISION ISAPI . as you know, interface depends on camera firmware version. For setting date and time for camera. you needs HTTP PUT method with URL

    http://hikvision_camera_ipaddress[:http_port]/ISAPI/System/time.

    On general, An IP camera has 3 types of time mode; NTP, manual, sync(timecorrect for HIKVISION).

    It would be better for getting date and time of the camera through GET method first with the same above url. After that you will get a hint for HTTP body for setting date and time via PUT method.

    For more detail you could refer the document 8.1.9