The client for HIKVISION cameras, DVR
Project description
Simple and easy to use library for working with video equipment companies Hikvision
Install
pip install hikvisionapi
Examples
There are two formats for receiving a response:
1. Dict(default):
from hikvision import Client api = Client('http://192.168.0.2', 'admin', 'admin') response = api.System.deviceInfo(method='get') response = {u'DeviceInfo': {u'@version': u'2.0', u'@xmlns': u'http://www.hikvision.com/ver20/XMLSchema', u'bootReleasedDate': u'100316', u'bootVersion': u'V1.3.4', '...':'...' }
2. Text
response = api.System.deviceInfo(method='get', present='text')
response = '<?xml version="1.0" encoding="UTF-8" ?> <DeviceInfo version="1.0" xmlns="http://www.hikvision.com/ver20/XMLSchema"> <deviceName>HIKVISION</deviceName> </DeviceInfo>'
Hints:
Channel info
api.System.Video.inputs.channels[1].motionDetection(method='get')
Send data to device:
xml = api.System.deviceInfo(method='get', present='text') api.System.deviceInfo(method='put', data=xml)
- Get events(motion, etc..)
client = Client('http://192.168.0.2', 'admin', 'Password') client.count_events = 2 # The number of events that need to(default = 1) response = client.Event.notification.alertStream(method='get') response = [{u'EventNotificationAlert': {u'@version': u'2.0', u'@xmlns': u'http://www.hikvision.com/ver20/XMLSchema', u'activePostCount': u'0', u'channelID': u'1', u'dateTime': u'2018-03-21T15:49:02+08:00', u'eventDescription': u'videoloss alarm', u'eventState': u'inactive', u'eventType': u'videoloss' } }]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hikvisionapi-0.1.8.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for hikvisionapi-0.1.8-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7e4f5ed1d415967a80c70ce7330d1d8cee3063d17502aa6860c8c573b9b65e4 |
|
MD5 | 8dc083380866782af254e173d01a3d1b |
|
BLAKE2b-256 | 98d08ca87642c7c09fbffa595818aadeb84cb1889ca0685f099973a5546c6228 |