Comments (9)
I have now tested this with the basic_usage.py script.
Here is some an xml message for your viewing pleasure
--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 460
<EventNotificationAlert version="1.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.2.6</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>c4:2f:90:95:30:17</macAddress>
<dateTime>2019-09-25T17:45:57+10:00</dateTime>
<activePostCount>2</activePostCount>
<eventType>IO</eventType>
<eventState>active</eventState>
<eventDescription>IO alarm</eventDescription>
<inputIOPortID>16</inputIOPortID>
</EventNotificationAlert>
--boundary
My python and git knowledge are fairly limited, I'm currently trying to figure it all out to give you a pull request.
from pyhik.
I also noticed previous issues raised relating to this, and it appears it was implemented for the discovery but not for the alertStream parsing.
from pyhik.
Thanks for the report. I'm a little tied up with other things right now, but will try to take a look soon.
from pyhik.
I have now put a custom component into home assistant which is a copy of the hikvision one which is importing my modified pyhik and it appears to have inputs working correctly.
from pyhik.
Please grab the updated hikvision.py from the new id_fix branch (https://github.com/mezz64/pyHik/tree/id_fix) and test it please. This should fix your issue and make it easier to add other fields in the future.
If it works for you i'll merge to master and release a new version.
from pyhik.
Will do in a couple of days as I'm away for work.
from pyhik.
I have put the new hikvision.py in and it appears to be working as expected.
from pyhik.
Thanks for the update. I'll try to get this moving this week.
from pyhik.
Released 0.2.4 with this fix to pypi and submitted a PR to bump the version in HASS.
from pyhik.
Related Issues (20)
- There was a problem: 'NoneType' object has no attribute 'text' HOT 6
- Track events not shown in triggers XML endpoint HOT 7
- hikvision.py reference api document HOT 2
- Control PTZ
- Accessing Alarm trigger of camera in python code HOT 1
- /ISAPI/Event/triggers returning device error HOT 1
- Multiple detection stopped working in HA
- HomeAssistant 'Problem finding attribute: 'duration'' in logging HOT 3
- Request: Features for video Intercom HOT 1
- faceSnap sensor support HOT 11
- TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' HOT 20
- Delay is receiving Events HOT 2
- Only usable with `admin` username HOT 1
- What about streaming through the NVR HOT 1
- Home Assistant 2022.12.0B0 HOT 16
- Trigger Light strobe / Alarm. Is it possible? HOT 1
- ANPR DS-2CD4A26FWD-IZS HOT 10
- binary sensor not created HOT 2
- etchannel_num = int(etchannel.text) - TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType' HOT 21
- Video Tampering Detection event not properly detected because of XML namespace problem
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyhik.