This is a python module aiming to expose common API events from a Hikvision IP camera or nvr. Most rebadged models work as well with full functionality.
Code is licensed under the MIT license.
If internal callback methods are used no external libraries are required, otherwise:
- [pyDispatcher] 2.0.5
pip install pyhik
import pyhik.hikvision
camera = pyhik.hikvision.HikCamera('http://X.X.X.X', port=80, user='admin', pass='1234')
- add_update_callback(callback, msg) - used to register an update callback function. ** msg should take the form: cam_id.event_type.channel
- get_id - returns unique camera/nvr id
- get_name - returns camera/nvr name
- current_event_states - returns the event state dictionary
- start_stream - initialzes the event stream processing thread
- disconnect - closes the http stream session and stops the processing thread
- Support motion detection status and ability to turn on/off
- Support IR day/night status and ability to switch between day/night/auto