I think you are using the hikconnect cloud integration, not the addon
still any clue why your addon is crashing? What can I check
no id, try to install addon and reinstall again,
can you show me the addon log ? there were some updates lately
did unistall, reboot, install
loop[2] find 10 mac and 16 ip
NET_DVR_Login_V30 failed, error code = 7
strange, you are using correct admin password and ip ?
try rebooting the outdoor device, maybe you are not possible to connect anymore
i tried with a wrong password, then i get : NET_DVR_Login_V30 failed, error code = 1
so i think it must be a network related issue on your side
when i enter a wrong IP, i also get error 7
I do have to change only line 73 correct? the subnet somewhere?
file path is
addons/hikvision/hik.py ?
user_id = HCNetSDK.NET_DVR_Login_V30( "192.168.1.74".encode('utf-8'), 8000, "admin".encode('utf-8'), "mypassword".encode('utf-8'), device_info)
and line 97
url_states = "http://192.168.1.12:8123/api/states/"
sensor_name = "sensor.hikvision_test"
headers = {
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI2xxxxx',
'content-type': 'application/json',
}
Donāt think you are using the correct addon, it is version 2.9.4ā¦ you donāt need to change anything in the files, you donāt see themā¦
All config is done in the addon config
ahhh ok, I deleted the local addon (hikconnect)
So now I have
Hikvision-SDK 2.9.5 from addon store
Hik-connect from HACS as custom repository
Which is the door unlock entity if Hikvision-SDK?
The unlock service is new since last week, look at the readme of the addon
Also you donāt need the hikconnect cloud integration anymore, you can use the addon now for the most stuff
is it this?
service: hassio.addon_stdin
data:
addon: a53439b8_hikvision_sdk
input: unlock1
to make it a command in an automation or lock (or better BUTTON) , what would this be?
Itās a serviceā¦ You can use it everywhere you want, just like any other service
GUYS , i have some VERY good NEWS to tell you!!! A nice project is comingā¦
With the help of @grimpy, we succeeded to connect HA to the doorbell for callingā¦
Some background firstā¦ what was always the problem if you setup the outdoor/indoor stuff to an PBX like asteriskā¦
=> if asterisk goes down => no calls anymore
=> if you use asterisk => no more hikconnect , it doesnt work together
=> also no video before pickup anymore on the indoor panels, so you dont see who is calling
So we traced some shit, and we finally were able to register a PBX on the indoor panel as an extension, by customizing the headersā¦ What does this mean:
=> if PBX/HA goes down=> we still have calls!!! since its just the extension on the indoor
=> for some guys that live in appartement, that dont have access to outdoor => it will also work, we dont need to have access to outdoor station, this is special for you @tomasbedrich
=> Still video and early video on the indoor panels!
=> Hikconnect still works, but offcourse i disable it, its just for backup
=> you can use whatever softphone app on your android/iphone
=> NO MORE hikconnect cloud needed anymore, all local
=> You can use this nice lovelace sip card : GitHub - TECH7Fox/sip-hass-card: A SIP client inside home assistant!
=> Opening door works by sending this ā#ā on the softphone or from HA app
1 disadvantage, but iām still investigating why, i dont have video on my softphone, i have an app though that can display RTSP stream before pickup , but no video then while calling ā¦ but if you want to use HA Companion app as a call app, it doesnt mather anyway, you can use the camera entity cardā¦
Todo
- Investigating why there is no video on the softphoneā¦
- We are going to dockerize this stuff, so it can be used as an add-on, for easy setup
- Documenting
- In theory it should also work, to call the outdoor station from HA, to grab video, this is not on my priority list
What i need:
=> Some help, people who have experience with SIP and especially writing docker/add-ons to make a nice package for HA
For the tech guys:
Hi everybody,
IĀ“m new on this forum and have a DS-KV8113. I have a strange problem which I find a hard nut to crack.
I will send a simple cURL command to my outdoor Station when someone opens the door, so the ringing just stops. But I canāt figure out howā¦
I use a app on my iPhone called SOAP-o-Matic. With the code in the first Post I can send the commands for open the door and for āhangUpā. They both working very well. But with cURL inside php they donāt (and I try cURL in different script languages tooā¦).
The request tells me every time:
/ISAPI/AccessControl/RemoteControl/door/1 4 Invalid Operation invalidOperation 1073741830 invalid operation
Here is my php cURL Code, thank you in advance for your help.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://192.168.178.32/ISAPI/AccessControl/RemoteControl/door/1');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, '"<RemoteControlDoor><cmd>open</cmd></RemoteControlDoor>"');
curl_setopt($ch, CURLOPT_USERPWD, 'admin' . ':' . 'xxxxx');
$headers = array();
$headers[] = 'Content-Type: application/xml';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
By the way, itās a very nice forum I read very often.
Thanks, Timo
What command do you use for the callsignal ? That doesnāt work for me on 8003ā¦
Is your curl script sending digest authentication? Try sending it directly from a terminal, to see if that works, look at first post
Wow, thank you for your quick answer.
Do you mean hungUp? Itās
http://admin:[email protected]/ISAPI/VideoIntercom/callSignal?format=json
and the Body:
{āCallSignalā:{ācmdTypeā:āhangUpā}}
Itās a PUT request.
Thatās working fine with the App SOAP-o-Matic.
I get the callstatus with the simple GET request http://admin:[email protected]/ISAPI/VideoIntercom/callStatus?format=json
Without a body payload. Working fine too.
Yeah, that callsignal I tried it too , but doesnāt work on 8003 models
Itās fine with cURL in my terminal on my raspi.
The whole Request with Response is:
$ curl -i --digest -u admin:xxx -X PUT -d '<RemoteControlDoor><cmd>open</cmd></RemoteControlDoor>' http://192.168.178.32/ISAPI/AccessControl/RemoteControl/door/1
HTTP/1.1 401 Unauthorized
Date: Sat, 19 Mar 2022 10:09:54 GMT
Server: webs
Content-Length: 235
Connection: close
X-Frame-Options: SAMEORIGIN
Cache-Control: no-store
Pragma: no-cache
WWW-Authenticate: Digest qop="auth", realm="DS-023FC831", nonce="ZDdkMTZkNmVjZWY3YmRhMGIwOWQ5Y2EwZDVjZjY1ODk=", stale="false", opaque="", domain="::"
Content-Type: application/xml
HTTP/1.1 200 OK
Date: Sat, 19 Mar 2022 10:09:54 GMT
Server: webs
Content-Length: 295
Connection: close
X-Frame-Options: SAMEORIGIN
Cache-Control: no-store
Pragma: no-cache
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<ResponseStatus version="1.0" xmlns="http://www.std-cgi.com/ver10/XMLSchema">
<requestURL>/ISAPI/AccessControl/RemoteControl/door/1</requestURL>
<statusCode>1</statusCode>
<statusString>OK</statusString>
<subStatusCode>ok</subStatusCode>
</ResponseStatus>
So why not working in php?
I get it!
DIGEST does the trick. This is the whole php cURL Code to open the Door on my DS-KV8113 (B):
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://192.168.178.32/ISAPI/AccessControl/RemoteControl/door/1');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, '<RemoteControlDoor><cmd>open</cmd></RemoteControlDoor>');
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
curl_setopt($ch, CURLOPT_USERPWD, 'admin:xxx');
$headers = array();
$headers[] = 'Content-Type: application/xml';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
var_dump($result);