Hikvision Doorbell / Videointercom integration

Not sure, I have the same indoor device as you, I send the reject command to the indoor (9510) when it’s ringing, and it aborts the call…

Nope, you need the SDK… You can use my addon as a docker container

I have no indoor station. So when I block internet access to the outdoor station after some time the bell stops working as it can’t connect to hikvision cloud. I have a feeling using this apex thingy, it mocks the indoor station and I can run the outdoor camera fully local. But it seems a roundabout way for something very easy. Are there any alternatives?

I want to block internet access to the camera while still let it ring or take calls locally. But my main objective/mvp now is that it still rings.

Why not use SIP, that’s local?

Might there be any specific instructions (script?) available on how to install this as a docker container on RaspberryPi that is already running Homebridge?
I see this, Hikvision-Addons/docs/docker.md at 43f3185ad535e754338c20e8d5234cdfef1e3297 · pergolafabio/Hikvision-Addons · GitHub, but it is a bit over my head.

Nor sure how I can provide more info? Everything is there , even screenshots for portainer/Synology ? Try to learn basics for docker?

I got it installed using Portainer on RasPi4. The devices appear on MQTT, however, actual control is not working.
Seeing this in the log:

2024-12-14 04:09:32.782 | INFO     | __main__:main:85 - Shutting down

[2024-12-14 04:09:32.786][ERR] Interim_UnRigisterTimerProxy, pProxy == NULL, iProxyID[4]

[2024-12-14 04:09:32.811][ERR] Interim_UnRigisterTimerProxy, pProxy == NULL, iProxyID[4]

[2024-12-14 04:09:32.906][DBG] CUserMgr::UnRegisterHeartProxy[0]

[2024-12-14 04:09:32.944][DBG] CUserMgr::UnRegisterHeartProxy[1]

2024-12-14 04:09:37.831 | INFO     | sdk.utils:loadSDK:44 - Using OS: Linux with architecture: aarch64

hpr tls index{3}

loop[2] find 2 mac and 1 ip

[2024-12-14 04:09:37.865][DBG] CCoreGlobalCtrlBase::LoadDSo, HPR_LoadDSo Succ, Path[/lib/aarch64-linux-gnu/libz.so.1.2.11], hHandleRet[1687966448]

[2024-12-14 04:09:37.867][DBG] CCoreGlobalCtrlBase::LoadDSo, HPR_LoadDSo Succ, Path[/app/lib-aarch64/libcrypto.so], hHandleRet[1692267536]

[2024-12-14 04:09:37.868][DBG] CCoreGlobalCtrlBase::LoadDSo, HPR_LoadDSo Succ, Path[/app/lib-aarch64/libssl.so], hHandleRet[1692268800]

2024-12-14 04:09:38.155 | INFO     | doorbell:authenticate:82 - Connected to doorbell: DoorStation

2024-12-14 04:09:38.164 | INFO     | doorbell:authenticate:82 - Connected to doorbell: IndoorScreen

2024-12-14 04:09:38.165 | INFO     | event:__init__:87 - Setting up event handler: Console stdout

2024-12-14 04:09:38.165 | INFO     | mqtt:__init__:114 - Setting up event handler: MQTT

[2024-12-14 04:09:38.170][DBG] CComBase::Load, Load szDllPath[/app/lib-aarch64/HCNetSDKCom/libHCVoiceTalk.so] SUCC

[2024-12-14 04:09:38.171][DBG] AbilityAnalyze---Init-- over, DeviceList path [/app/lib-aarch64/HCNetSDKCom/LocalXml/DeviceList.xml], load result[0]

[2024-12-14 04:09:38.172][DBG] CComBase::Load, Load szDllPath[/app/lib-aarch64/HCNetSDKCom/libHCGeneralCfgMgr.so] SUCC

[2024-12-14 04:09:38.173][DBG] CComBase::Load, Load szDllPath[/app/lib-aarch64/HCNetSDKCom/libHCPlayBack.so] SUCC

[2024-12-14 04:09:38.175][DBG] CComBase::Load, Load szDllPath[/app/lib-aarch64/HCNetSDKCom/libHCIndustry.so] SUCC

[2024-12-14 04:09:38.175][DBG] CComBase::Load, Load szDllPath[/app/lib-aarch64/HCNetSDKCom/libHCDisplay.so] SUCC

[2024-12-14 04:09:38.176][DBG] CComBase::Load, Load szDllPath[/app/lib-aarch64/HCNetSDKCom/libHCPreview.so] SUCC

[2024-12-14 04:09:38.177][DBG] CComBase::Load, Load szDllPath[/app/lib-aarch64/HCNetSDKCom/libHCAlarm.so] SUCC

[2024-12-14 04:09:38.182][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/System/deviceInfo], input size[0], max segment length[262144]

[2024-12-14 04:09:38.182][ERR] StructureMime BOUNDARY DATA ERROR!

[2024-12-14 04:09:38.240][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/System/deviceInfo], input size[0], max segment length[262144]

[2024-12-14 04:09:38.240][ERR] StructureMime BOUNDARY DATA ERROR!

[2024-12-14 04:09:38.245][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/AccessControl/RemoteControl/door/capabilities], input size[0], max segment length[262144]

[2024-12-14 04:09:38.245][ERR] StructureMime BOUNDARY DATA ERROR!

[2024-12-14 04:09:38.251][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/System/deviceInfo], input size[0], max segment length[262144]

[2024-12-14 04:09:38.251][ERR] StructureMime BOUNDARY DATA ERROR!

[2024-12-14 04:09:38.265][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/System/deviceInfo], input size[0], max segment length[262144]

[2024-12-14 04:09:38.265][ERR] StructureMime BOUNDARY DATA ERROR!

[2024-12-14 04:09:38.292][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/System/deviceInfo], input size[0], max segment length[262144]

[2024-12-14 04:09:38.292][ERR] StructureMime BOUNDARY DATA ERROR!

Exception in callback BaseSelectorEventLoop._add_reader(0, <bound method...rt fd=0 idle>>)

handle: <Handle BaseSelectorEventLoop._add_reader(0, <bound method...rt fd=0 idle>>)>

Traceback (most recent call last):

  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 256, in _add_reader

    key = self._selector.get_key(fd)

  File "/usr/local/lib/python3.10/selectors.py", line 193, in get_key

    raise KeyError("{!r} is not registered".format(fileobj)) from None

KeyError: '0 is not registered'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run

    self._context.run(self._callback, *self._args)

  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 258, in _add_reader

    self._selector.register(fd, selectors.EVENT_READ,

  File "/usr/local/lib/python3.10/selectors.py", line 360, in register

    self._selector.register(key.fd, poller_events)

PermissionError: [Errno 1] Operation not permitted

[2024-12-14 04:10:13.842][DBG] Alarm chan [0] recv timeout[2]!

any ideas?

Here also is the Portainer container details

Send it to main topic , like example here:

I have DS-KIS604-P(C) kit and one gate that reports status over a dry contact.
I can’t see that state over MQTT.
I need help! What I’m doing wrong?!
I follow all tutorials I can get see over net…

you can check the addon log if you see something when you open the door

mqtt:handle_device_trigger:487 - Invoking device trigger automation{'name': 'motion_detection', 'type': 'Motion detected', 'subtype': ''} 2024-12-14 10:10:22.978 | INFO | event:video_intercom_alarm:120 - Video intercom alarm from Portao 2024-12-14 10:10:22.978 | INFO | mqtt:video_intercom_alarm:424 - Alarm <sdk.hcnetsdk.NET_DVR_VIDEO_INTERCOM_ALARM_INFO_UNION object at 0x7f3d2065b0c0> detected on door 0 2024-12-14 10:10:22.978 | INFO | mqtt:handle_device_trigger:487 - Invoking device trigger automation{'name': 'door_not_closed_0', 'type': 'not closed', 'subtype': 'Door 1'} 2024-12-14 10:10:44.950 | INFO |

I only have this logs…

The “door-not-closed” is a device trigger, you can build an automation on that event

I tried that. I don’t think that’s the issue. Did you see the log about some python ‘not registered’ notice?
When an mqtt command is sent, the container log does not indicate that anything was ever received. However, the log does show events when the door statiion calls and mqtt message does update. On the other hand, the indoor station does show any log info. For example when COM1 relay is cycled directly from the screen, nothing is registered in the log or mqtt.

If nothing is visible in the container log, then I think you are still sending it wrong…

Correct, indoor device is limited, turning on/off com ports is indeed not visible, it’s not an event for some reason, indoor stations don’t publish events that I know off

Door not closed event don’t retain state, if the door is still opened…
It’s possible pass the status of relay to a device instead a trigger event?

Maybe you can poll it with an Isapi command, I have that input text avaible, if you know the command to poll it…

If am simply trying control the COM1 relay on the indoor station, would this not be the correct command?:

No, the com relay on the indoor doesn’t open the door, it’s a separate relay