DS-KD8003 - DS-KV8113 - DS-KV8213 - DS-KV6113 - DS-KV8413 and .... integration Hikvision HikConnect Video intercom doorbell

Guys, I need to find a python programmer with SIP knowledge… I have found an easy method to register as an extension on the indoor station, like an secundair station does… I can already succesfull register, so I can forward a call to asterisk, also intercept a ring event…

No opensips needed anymore,

2 only things remaining is to open a door based on sip and make a call to outdoor based on sip…
So no ISAPI/SDK is needed anymore

Ok. I did some digging.

As I have said before I suggest to add some more info in the 1st page. This i will save some questions.
To my understanding the overall picture which is:

  1. The 2 addons are two different solutions to the lack of proper ISAPI of the 8003. Its not so clear at 1st time.
  2. I think you need to add in the 1st page the limitations of these addons as you explained in post 1850. Its not that clear. Only after I have did some digging into the code I fully understood my situation.

As for my situation, the HA runs on RPi so it needs a Windows PC or Linux for the SDK.
The sensors are added in the HA.
The part explaining the service: hassio.addon_stdin is not clear as the addon does not run on the HA machine.
The current problem is that the dockfile is made for HASSOS under x86/amd64. I do not know how to convert it to a container over Windows. Docker is installed already in my PC.
BTW, the addon contains both Linux and Windows SDK folders.
I understand that if I run HASSOS as a container I can run the dockfile but is it the only solution?

sorry the addons are only maded for HassOS that run on linux hardware 64 bit, if you are running other hardware , you are on your own … i dont have the knowledge/time to make it multi arch

This sounds great, especially interesting for us using a raspberry pi hardware :slight_smile:

Thanks.

After re-thinking, I had an idea to run the HASSOS both on the RPi and on the BI PC as a VM (or container). This way I will have an active active system. Since they both powered by my UPS, things will be OK even under power outage.
Do you see any problem in this?

No , not really…

But if a call sensor is important, you can also use the hikconnect cloud integration, open door works also there… No seperate addon needed…

As for opensips, I have new script ready for sip purposes, no need for opensips anymore

Guys, last days i was testing a new sript, this is this time based on SIP! No more OpenSIps addon needed :slight_smile:

Advantage:
NO ISAPI needed (older devices that lack support)
NO SDK needed amymore, means it runs on every architecture now…
NO access is needed to the outdoor station (people living in appartement with no admin acces to outdoor)
Disadvantage:
The script simulates an register like a second indoor extension, so it registers on the primary indoor…, so an indoor panel is needed (maybe it also works by registering directly on outdoor, but i dont have a device without indoor)

The script is far from finished, but already working

@tomasbedrich , can you help me with this? Maybe make a custom integration? I can also help with wireshark traces, it should be quite simple to also open a door based on SIP, its the same method, but instead of an register command, its a message command

Anyway, here is the script:

First of all, login on your primary indoor panel, add an extension, use this SN: Q12345678, give it NR: 5

First run this command:
python3 hikvision_register.py --ip 192.168.0.17 --domain 192.168.0.71 --username 10000000005 --extension 10000000005 --name Asterisk --password xxx --debug
In my case, 0.17 is HA, 0.71 is my primary indoor…

Check if it registers OK, you can also see it with “sngrep”

if that works, what i do, i run the script on startup of HA, with this automation, so script runs in background:

- alias: Hikvision SIP
  initial_state: 'on'
  trigger:
    - platform: homeassistant
      event: start
  action:
    - service: shell_command.hikvision_sip

This is the shell command i use:

hikvision_sip: nohup python3 /python_scripts/hikvision_register.py --ip 192.168.0.17 --domain 192.168.0.71 --username 10000000005 --extension 10000000005 --name Asterisk --password XXX $1 > /dev/null 2>&1 &

@tomasbedrich , the script already receives an incoming call, so its qiute easy to make a callsensor…
The only thing missing is the open door command, or maybe even possible to make a call to outdoor and to see live video…

Now the fun part, i’m using the asterisk Addon

This addon also gives the possiblities to make a lovelace SIP card and lots of sensors…
So what i do, i setup a trunk based on IP auth, for incoming call, so when someone calls , the indoor panel is calling the extension, in this case Asterisk:

[hikvision]
type=aor
contact=sip:[email protected]:5060

[hikvision]
type=endpoint
context=default
disallow=all
allow=ulaw,alaw
allow=h264,vp8
aors=hikvision

[hikvision]
type=identify
endpoint=hikvision
match=192.168.0.71

Then for test an verry easy dialplan, this calls your softphone extension 6000

exten => 10000000005,1,NoOp()
 same => n,Dial(PJSIP/6000)

Still no video though, same issue as Opensips, but already asked on asterisk comunity, not sure where to look…

creds to @grimpy

3 Likes

I assume Asterisk is still needed on some platform. This is what is defined in the readme page of the add-on. Am I correct?

no, you can use whatever PBX you want, the script is just to make an extension register as an secundary indoor

Hi @pergola.fabio , sorry if I’m asking dumb questions but I’m not so expert and I need help.
This is what I have and what I’d like to obtain.
I have:

  • DS-KV8113
  • Fritzbox
  • Home assistant

I configured DS-KV8113 with sip to work through fritzbox internal PBX (I can receive doorbell calls on my DECT for example).

I would like to have:
A home assistant card able to receive the call from door bell, answer to it with two way audio (video is not so important, I could use a secon card for it as a camera I suppose).

If I look what is available around I see card and integrations working with asterisk (in my case I would like to stay with fritzbox PBX) but every card needs a wss url that I do not have.

Can you give me some hint to search in the right direction? I could even decide to understand what’s behind and modify something (unless you tell me it’s impossible).
Many thanks anyway!!

1 Like

Yes, the lovelace SIP card does need indeed a WSS connection
if you want to use fritzbox, why nog setup an outgoing trunk to asterisk? you need to have asterisk for the sip card

Or just drop your fritsbox? why do you want to use the SIP service on frtitz?

There’s no actual reason to use fritzbox, just because it’s already configured!-)
I was curious about this possibility!
Anyway I think I will go in the asterisk direction…

goodluck :slight_smile:
btw, out of interest, i dont have the 8113 , but if you enable SIP on it , do you loose hikconnect ??

on my 8003 , before when i enabled SIP on it, hikconnect doesnt work anymore, thats why i do it the other way around now

Never used hikconnect, I can check anyway…

BTW for someone with more coding skills than me, do you think this can be of some interest?
https://www.doubango.org/sipml5/
perhaps some kind of integration in home assistant?

indeed, can be usefull, but i dont have enough experiance to make an intergration
creating scrips is another thing :slight_smile:

btw, if you dont use hikconnect, how do you receive then an incoming call if no SIP is setup ?

btw, the SIP client is already working, you can use the lovelace SIP card for that, runs perfect

I was just testing it, I can answer from any DECT (no video) thanks to fritzbox and it’s enough by now.

What sip card are you referring to?

this one, but again, asterisk is needed:

ah ok, so you need somekind of SIP server, i though the 8113 was a standalone device that can be used with hikconnect

yes, I need something doing webrtc - SIP as far as I understand this is why
https://www.doubango.org/sipml5/
could be useful.
Maybe @TECHFox could do something with that?