https://github.com/mezz64/pyhik
Python wrapper for Hikvision camera event stream
https://github.com/mezz64/pyhik
hacktoberfest hikvision hikvision-camera python
Last synced: about 1 year ago
JSON representation
Python wrapper for Hikvision camera event stream
- Host: GitHub
- URL: https://github.com/mezz64/pyhik
- Owner: mezz64
- License: mit
- Created: 2016-12-02T03:11:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-12-02T18:38:40.000Z (over 1 year ago)
- Last Synced: 2025-04-06T06:01:34.343Z (about 1 year ago)
- Topics: hacktoberfest, hikvision, hikvision-camera, python
- Language: Python
- Homepage:
- Size: 75.2 KB
- Stars: 189
- Watchers: 12
- Forks: 54
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://pypi.python.org/pypi/pyHik)
# Introduction
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.
# Requirements
If internal callback methods are used no external libraries are required, otherwise:
* [pyDispatcher] 2.0.5
# Installation
```pip install pyhik```
# Usage
```python
import pyhik.hikvision
camera = pyhik.hikvision.HikCamera('http://X.X.X.X', port=80, usr='admin', pwd='1234')
```
# Available Methods
### Callbacks
* add_update_callback(callback, msg) - used to register an update callback function.
** msg should take the form: cam_id.event_type.channel
### Properties
* get_id - returns unique camera/nvr id
* get_name - returns camera/nvr name
* current_event_states - returns the event state dictionary
### Functions
* start_stream - initialzes the event stream processing thread
* disconnect - closes the http stream session and stops the processing thread
# TODO
* Support motion detection status and ability to turn on/off
* Support IR day/night status and ability to switch between day/night/auto