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

What hardware are you using? It’s not supported on RPI

I have told you. The MariaDB and the Hikvion-opensips is on RPi (HASSOS) and the SDK is on a PC.
I have also added the extension on the iVMS.

I follow you instructions on github.

Indeed , opensips doesn’t work on RPI
SDK addont is a total different thing, not needed at all for opensips

Sorry. I am lost. I am missing something in the architecture here.
The basic problem is the lack of functions in the ISAPI of the 8003.
You either use the custom firmware which for me is not OK as it does not have Hebrew.
If I use the SDK, what else is needed.
As for the opensips re-thinking - opensips goes hand in hand with linphone and that’s it?
Both are in one link to github at the 1st page.

There is no relationship between the 2 add-ons, they are totally different …

The SDK addon is for events like call sensor, door opening, for devices that lack indeed ISAPi

The opensips addon is a bonus, just for call forwarding to asterisk based in private hik protocol, if you don’t want to setup SIP itself on devices…

Both DON’T run on RPI hardware, only x64

Got it but still some piece is missing here.
When using the SDK on a PC, do I need the HA to run on the same PC or it can run on RPi?

Nog sure what you mean, if you run the addon, the SDK library is already included, in the .py file there is a pointer to the SDK folder…

The SDK library that’s included in the addon, is for Linux, not Windows, if you want to run on Windows you need to change the addon yourself

I will try to put it differently. Something looks trivial to you but to me it is not clear.
I have the HA running on RPi.
I got the BI and the iVMS running on a PC. Both run 24/7.
What are my options?
I understand that the SDK itself is a x86 code. Got it installed.
I understand that the SDK is the code that enables all missing function (call status, door status etc.).
I understand Linphone runs on my phone/tablet.
The rest is unclear.

Linphone is a sofphone, in order to use it like any other softphone client, you need to install a PBX server… Opensips is not a PBX, it’s just the proxy to register…

SDK is just the library, it doesnt do anything, you need to run the hik.py script, that script creates sensors…

The addon is to make it easy , so you don’t need to install anything, but only runs on x64 linux hardware, not RPI…

Fabio.

I understand that Softphone and and the SDK are 2 different solutions for the ISAPI problem of the 8003.
You are doing a great job here but the readme info is missing the base hardware configuration and connectivity.
So to put my understandings all in one top level solution definition for each of the options to hook to the Hikvision IP Intercom system without the Hik-Connect:

For the Softphone solution:

  • Installing PBX Server on any supported hardware (PC, RPi etc.).
  • Installing MariaDB and Opensips - on which system?
  • Adding an extension through iVMS to enable sip connection to the PBX server using opensips.

Please correct my understandings above.

For the SDK:
The addon with the SDK is expected to be used under x86 Linux and on the same machine that runs HA which means HA is also running on x86 Linux. If this is the idea it means both HA and SDK must run on the same x86 machine.
Correct me if I am wrong.

Hey, opensips can only run on Debian hardware , mariadb doesn’t mather , if you do a manual install of opensips, then make sure you change the cfg file …

SDK library can only run on x86/64 Linux or windows, it’s compiled like that by hikvision, no RPI support

The 2 add-ons only run on x64 hardware (Linux), no RPI , no windows, and it needs to be HassOS…

If you want to run on other systems, just grab the scrips manually and change like your needs

Just look at the dockerfiles, all commands are there

OK. I think I got it.
To run the Opensips based solution I need a x64 machine running Debian OS.
On top I run MariaDB, Opensips and PBX server. Besides this I also add a SIP extension to the master Indoor station.
The result is a Softphone running on my Android phone or tablet.
The SDK cased solution runs on a x64 Windows or Linux and contains Pyton, the SDK and the Hik.py script that uses the lib folder of the SDK.
The only question here is does the SDK, Hik.py and HA must run on the same x64 machine or the HA can run on a separate RPi machine.

Both of your addons are designed to run on Linux.

Yes, bot of the add-ons are designed to run on HassOS, and … If you run the addon, it’s a container, the container is based on Debian and uses the kernel of HassOS…

The addon is to make it easy, no extra stuff needed for the SDK, but it’s just important that the hardware needs to be x64 , no RPI…
If you run the SDK addon, everything is included, no need to install extra stuff…

If you want to run on Windows you need to install it manually and change also the scripts

For opensips, you don’t need it, it’s just a bonus…
You can also use the SIP options on the device itself, but you loose them some advantages like early video on indoor station

Forget RPI, it just doesn’t work, both opensips and SDK don’t run on it

The SDK lib must be present on same hardware / container where you launch the py script

Thanks for your patience.
For me the problem is (was) the big picture and not the small details.
I also think this must be stated on the 1st page in more details.

The last thing not clear to me is the relation between the SDK with the Hil.py and HA.
Does the SDK and Hik.py pair generate sensors and switches on the network that are detectable by HA or I must put the SDK and Hik.py along with HA on the same machine / same container or that the pair enables me to use all the standard curl shell commands that using the SDK become available.

No, you need to create the sensors manually as template sensors… The hik.py uses a JSON dump (curl) to turn sensor on/off …

So the hik.py can be indeed on another network

OK. I will see how good is my understanding of the setup.
The Opensips is no option to me as I do not have any available 7/24 HW I can run Debian etc.
Thanks for the effort. Hope other will benefit from this as well.

Hi, I receive this in LOG ?

Jul 23 16:48:13 [53] WARNING:core:fm_malloc: not enough contiguous free shm memory (3052264 bytes left, need 159112), attempting defragmentation… please increase the “-m” command line parameter!
Jul 23 16:48:13 [53] ERROR:core:fm_malloc: not enough free shm memory (3052936 bytes left, need 159112), please increase the “-m” command line parameter!
Jul 23 16:48:13 [53] ERROR:tm:sip_msg_cloner: no more share memory
Jul 23 16:48:13 [53] ERROR:tm:new_t: out of mem
Jul 23 16:48:13 [53] ERROR:tm:t_newtran: new_t failed

In the log of what? Seems you are missing memory? Maybe on your hardware?