-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-Branded Hik - Different URL #5
Comments
What type of http response do you receive when you query the To the second part, you are saying that for your cams when you check I just want to make sure that adding in the alternate options won't cause unintended behavior on the branded Hikvision cameras. |
When attempting to access Chrome:
IE11:
For the second part this is the complete contents of
|
Ah something interesting. On my genuine USA Hikvision Same camera (USA Hikvision):
Changing from |
Your triggers XML is very similar to what gets returned for NVR's, but with the center/HTTP variation and unfortunately yet another naming scheme for the channel id. Since you get a 404 on fetching the existing url it should be easy enough to catch it and switch to the other one. Adding in the HTTP shouldn't be an issue. Only thing I need to put some thought into is detecting the difference between this camera and an NVR so the channels get processed correctly. I'll post back once i've got something for you to test. |
Fantastic thanks! |
I made the changes that should get things working for you. Easiest way to test it out is download the "altcam" branch of pyhik from github and copy the pyhik folder to your hass Then comment out the Let me know how things work out. |
I copied the altcam branch and commented out the
XML located at http://192.168.1.41/event/triggers:
|
Problem is it seems like you have no ISAPI endpoint at all so all the default API urls won't work. I pushed another update that tries your variant when it can't get the first for deviceinfo, triggers, and the event stream. Give it a shot. |
Getting closer (I hope!)
|
Your logs are indicating that unexpected data is getting returned during the initial device info stage. I've pushed a new commit with some more debugging statements that should lend some more insight. Can you also verify that this URL is accessible on your cameras and post the output here?
|
Tested. Relevant logs:
deviceInfo:
|
Ok, something doesn't make sense here. The first trigger response you posted listed a std-cgi.com namespace yet the device info shows a hikvision.com namespace. Are you testing with the same camera? In any case I adding handling for the error you posted, give it another shot. |
Oops yes your right I mixed up which camera I was testing on from the previous night. Regardless it looks like your new commits were successful! There still appears that there may be an issue based on an error in the log and I don't see the sensor appear on my HA states web ui.
|
Looks like you aren't using the latest hikvision.py currently in the HASS dev branch. Please test with that version. Make sure to comment out the REQUIREMENTS line. |
That did it! Works perfectly now with all my various re-branded Hikvision cameras! Thank you for all your help getting this working. Ever since installing my cameras a couple years ago I always wanted to integrate motion events my HA system. Now to start playing with them! |
Once your multiple cam issue gets fixed and I verify everything still works as expected with normal hik cams and nvrs I'll make a release for the changes and get the updates merged into HASS. |
Updated version has been merged into HASS dev. Closing this issue. |
I have several re-branded Hikvision cameras as well which aren't working. Looks like the triggers.xml has a different path on those models. To access the triggers.xml the URL is:
http://XXX.XXX.XXX.XXX/Event/triggers
Based on the code here at GitHub you have the URL hardcoded. Looks like we need to add a second URL possibility to check so that these re-branded models will be detected.
Additionally these cameras have a different
<notificationMethod>
. Instead of center they use:(Originally posted to: https://community.home-assistant.io/t/hikvision-event-stream-sensors/6789/71)
The text was updated successfully, but these errors were encountered: