Hikvision Doorbell / Videointercom integration

I have a strange new Problem. I had to reinstall the Plugin but now i get these strange Error:

2023-03-15 15:44:45.788 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /addons/aff2db71_hikvision_doorbell_beta/install - Can't install ghcr.io/pergolafabio/hikvision-doorbell:3.0.0-beta.13: 500 Server Error for http+docker://localhost/v1.41/images/create?tag=3.0.0-beta.13&fromImage=ghcr.io%2Fpergolafabio%2Fhikvision-doorbell&platform=linux%2Famd64: Internal Server Error ("Head "https://ghcr.io/v2/pergolafabio/hikvision-doorbell/manifests/3.0.0-beta.13": received unexpected HTTP status: 503 Service Unavailable")

Вот что показывает журнал если замкнутый третий тревожный выход.

This is what the log shows if the third alarm output is closed

[2023-03-15 18:30:53.016][DBG] Alarm chan [0] recv timeout[2]!
2023-03-15 18:31:21.714 | DEBUG | event:_handle_callback:192 - Callback invoked from SDK
2023-03-15 18:31:21.715 | DEBUG | event:_invoke_handlers:166 - Invoking 2 handlers
2023-03-15 18:31:21.716 | INFO | event:video_intercom_alarm:109 - Video intercom alarm from DoorStation
Task exception was never retrieved
future: <Task finished name=‘MQTT’ coro=<MQTTHandler.video_intercom_alarm() done, defined at /app/mqtt.py:216> exception=KeyError(<doorbell.Doorbell object at 0x7f0f3cca6860>)>
Traceback (most recent call last):
File “/app/mqtt.py”, line 225, in video_intercom_alarm
call_sensor = cast(Sensor, self._sensors[doorbell][‘call’])
KeyError: <doorbell.Doorbell object at 0x7f0f3cca6860>
[2023-03-15 18:31:21.714][INF] Alarm[1] IP[10.0.0.10] data_len[568] alarm_len[568] status[430]
[2023-03-15 18:31:23.050][DBG] Alarm chan [0] recv timeout[2]!

Вот что показывает журнал если замкнутый третий тревожный выход.

This is what the log shows if the third alarm output is closed

[2023-03-15 18:30:53.016][DBG] Alarm chan [0] recv timeout[2]!
2023-03-15 18:31:21.714 | DEBUG | event:_handle_callback:192 - Callback invoked from SDK
2023-03-15 18:31:21.715 | DEBUG | event:_invoke_handlers:166 - Invoking 2 handlers
2023-03-15 18:31:21.716 | INFO | event:video_intercom_alarm:109 - Video intercom alarm from DoorStation
Task exception was never retrieved
future: <Task finished name=‘MQTT’ coro=<MQTTHandler.video_intercom_alarm() done, defined at /app/mqtt.py:216> exception=KeyError(<doorbell.Doorbell object at 0x7f0f3cca6860>)>
Traceback (most recent call last):
File “/app/mqtt.py”, line 225, in video_intercom_alarm
call_sensor = cast(Sensor, self._sensors[doorbell][‘call’])
KeyError: <doorbell.Doorbell object at 0x7f0f3cca6860>
[2023-03-15 18:31:21.714][INF] Alarm[1] IP[10.0.0.10] data_len[568] alarm_len[568] status[430]
[2023-03-15 18:31:23.050][DBG] Alarm chan [0] recv timeout[2]!

Помогите понять как создать датчики?

Help to understand how to create sensors?

Hi, it it only alarm input 3 and … That’s giving issues?

Can you try to setup manual output_relays?

There is something strange going on in the code handling the video intercom alarm. Can you please open an issue in our Github page to better diagnose the problem?

Hi , seems GitHub is having issues , see here… I think you can just maybe try again later…

1 Like

that dosnt work here:

023-03-15 22:59:48.385 | DEBUG    | config:mqtt_config_from_supervisor:36 - Requesting MQTT service configuration to supervisor
2023-03-15 22:59:48.390 | ERROR    | config:mqtt_config_from_supervisor:40 - MQTT service not available
Traceback (most recent call last):
  File "/app/main.py", line 91, in <module>
    asyncio.run(main())
  File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/app/main.py", line 21, in main
    config.load()
  File "/usr/local/lib/python3.10/site-packages/goodconf/__init__.py", line 144, in load
    super().__init__()
  File "pydantic/env_settings.py", line 39, in pydantic.env_settings.BaseSettings.__init__
  File "pydantic/main.py", line 340, in pydantic.main.BaseModel.__init__
  File "pydantic/main.py", line 1067, in pydantic.main.validate_model
  File "pydantic/fields.py", line 439, in pydantic.fields.ModelField.get_default
  File "/app/config.py", line 41, in mqtt_config_from_supervisor
    raise RuntimeError("This addon need the mosquitto broker to work correctly. Please see the Documentation tab for details.")
RuntimeError: This addon need the mosquitto broker to work correctly. Please see the Documentation tab for details.

yeah, seems its not used for now, will be fixed soon!

1 Like

Guys, fantastic NEWS, users using my Baresip addon, its NOT needed anymore
I finally found a way to replace the black video with an RTSP stream AND , i now can send EARLY VIDEO to group calls!! This is a feature thats Asterisk on any other PBX cant do!!

Stay tuned , but looks verry promising!! no more fancy hacks needed :slight_smile:

2 Likes

Fantastic news. Is it possible to use your code without having to install HA ? I’m an OpenHab user and I just need the MQTT part.

yes, for now look in “dev” branch, here are instructions

Keep us posted how it goes!!

For users that want to play with Asterisk and forward the incoming call to HA or Sofphone , here is my setup! No need to configure SIP on your devices, no need to worry :slight_smile:

Hi folks. I tried to run it, but every time when I start it and back to plugin it’s stopped! What’s happening?

Hi, can you check the logs in the addon and show us?

2023-03-17 07:20:47.518 | DEBUG | config:mqtt_config_from_supervisor:36 - Requesting MQTT service configuration to supervisor
2023-03-17 07:20:47.559 | INFO | sdk.utils:loadSDK:44 - Using OS: Linux with architecture: aarch64
hpr tls index{3}
loop[2] find 2 mac and 0 ip
2023-03-17 07:20:51.123 | ERROR | main::96 - Error while logging into Doorbell: Failed to connect to the device. The device is off-line, or connection timeout caused by network. Error code:7

Yeah, that means HA/Addon is not able to reach the intercom? are they on same network? Same ip range? can you show us the config of the addon?

**NET_DVR_NETWORK_FAIL_CONNECT** 7 Failed to connect to the device. The device is off-line, or connection timeout caused by network.

Oh I got it. It ins’t at the same home, but at the same CgNat, so I thought it would work. I’ll try at the same network.

Hehe , ok…

Well, should work also remotely, it runs on port 8000, so you need to open it in firewall

1 Like

Thanks! I took my RPi to same network as Hikvision doorbell and now it’s connected.

However look what’s being showed at doorbells’ page. Do you know how to fix that?

Hey , how to fix what?? :slight_smile:
How do you get to that page anyway? All entities being created are in the MQTT integration, there is the doorbell created