Git Product home page Git Product logo

hikvision-addons's Introduction

Home Assistant Hikvision Add-ons

Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.

Supports amd64 Architecture Supports aarch64 Architecture Supports i386 Architecture

This repository can be added to an Home Assistant OS installation. It provides the following add-ons:

Connect to you Hikvision IP doorbells to receive events (motion detection, incoming call, etc..) and relay back commands (reject call, open doors, etc...).

To quickly get started, click the following button: Open your Home Assistant instance and show the dashboard of a Supervisor add-on.

This program can run as a standalone Docker container, for all other type of installations. (Openhab, Home Assistant Container, ...)

NOTE: This is not an add-on, just an alternate way to setup Asterisk without setting up SIP on the devices!

NOTE: This is not an add-on, just an alternate way to answers calls using Home Assistant with Two Way Audio ISAPI support!

Donations

Like my work? You can always send me a donation.

hikvision-addons's People

Contributors

mion00 avatar pergolafabio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hikvision-addons's Issues

Подскажите как правильно подключить?

Добрый день. У меня Hikvision DS-KV6113WTE1. Homeassistant установлен на Oracle VM VirtualBox по инструкции. Я пытаюсь установить Hikvision-SDK-Addon по вашей инструкции и у меня не получается.

  1. Подскажите пожалуйста мне нужно отдельно поставить на компьютер какие-то файлы Hikvision-SDK? Если да то какие?
  2. Какой ip адрес должен быть в строке "http://localhost:8123/api/states/",? Спасибо.

hikvision_door entity stopped working

Hey Fabio, you have any idea to why my hikvision_door entity stopped working?
I think it started after an (auto) update to the latest version, I saw in your description that a user id and time are presented as well now
But where do this extra attributes come from if the template sensor is declared as bool? (on/off), could it be that, that is where the problem lies?

error 7

hello,

addon worked good but after latest ha update i have this error:

07/14/2022, 19:42:10 Hikvision SDK Add-on started! Listening for events...
loop[2] find 10 mac and 16 ip
NET_DVR_Login_V30 failed, error code = 7

ho to fix it?

hikvision sensors won't work.

Hi, i've installed the plugin as told, added the sensors in conf;
Logbook from Hikvision-SDK says:

"Hikvision SDK Add-on started! Listening for events...
loop[2] find 8 mac and 16 ip"

but i cannot see any change to the sensors when calling doorphone.

Running hass on vm on vm-ware macmini

sdk container exits without alert

The log shows:
08/17/2022, 12:01:31 Hikvision SDK Add-on started! Listening for events...
loop[2] find 2 mac and 0 ip

No clue what the last line implies

How to use the SDK as docker container iso add-on

Hi pergolafabio,

Your add-on is great, I think. Using the intercom without the cloud is exactly what I am trying to achieve.
But I'm running HA in a docker container inside Truenas Scale (it is a Kubernetes pod really, but use it as a docker container). I'm therefor managing my addons myself as containers, because supervisor is not available. I created the docker image for hikvision SDK with the Dockerfile in this repo. In the repository also a file config.json is present, but in hik.py there is a /data/options.json needed. May I assume, that this is the same file?
Further only hik.py and hcnetsdk.py are copied to the image. What is the purpose of the other .py files?
Thanks in advance for your help!

Help

After installation, 4 sensors appear

  1. sensor.hikvision_motion State changes every 2 seconds And then it turns off What is this sensor? That is how it should be?
  2. sensor.hikvision_callstatus Off state
  3. sensor.hikvision_door Off state
  4. sensor.hikvision_motion_2 Off state
    As I understand there should be 3 sensors

1

Support for more than one door station

Hi, thanks for this add on, very useful. I have one main door station and a couple of substations (property gate and service door). Can I configure more than one door station?
I’m planing on integrating this with Frigate NVR which gives me the camera feed and test it as an alternative to Hikconnect which is buggy.

docker use.

How can I run this addon with a docker container? I saw issy #23, but I didn't understand how to repeat that :(.

Server crashes after put UAC registrant data

Hi.

I have successfully installed your integration in a seperate docker container and successfully linked it to the mariadb container. Opensips works but when I put UAC Registrant data based on your documentation server just crashed. After restart it work for about 1 minute and crashed again.

I installed it on my other machine with HassOS virtual machine and situation is the same.

Here are my logs:
Apr 22 00:04:06 [51] CRITICAL:core:sig_usr: segfault in process pid: 51, id: 5 Apr 22 00:04:07 [45] INFO:core:handle_sigs: child process 51 exited by a signal 11 Apr 22 00:04:07 [45] INFO:core:handle_sigs: core was generated Apr 22 00:04:07 [45] INFO:core:handle_sigs: terminating due to SIGCHLD Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 9(55) [TCP receiver] terminated, still waiting for 16 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 10(56) [TCP receiver] terminated, still waiting for 15 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 18(64) [TCP main] terminated, still waiting for 14 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 14(60) [TCP receiver] terminated, still waiting for 13 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 17(63) [Timer handler] terminated, still waiting for 12 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 15(61) [TCP receiver] terminated, still waiting for 11 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 12(58) [TCP receiver] terminated, still waiting for 10 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 13(59) [TCP receiver] terminated, still waiting for 9 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 16(62) [TCP receiver] terminated, still waiting for 8 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 1(47) [HTTPD INADDR_ANY:8888] terminated, still waiting for 7 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 11(57) [TCP receiver] terminated, still waiting for 6 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 2(48) [MI FIFO] terminated, still waiting for 5 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 6(52) [SIP receiver udp:192.168.30.50:5060] terminated, still waiting for 4 more Apr 22 00:04:07 [50] INFO:core:sig_usr: signal 15 received Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 4(50) [timer] terminated, still waiting for 3 more Apr 22 00:04:07 [49] INFO:core:sig_usr: signal 15 received Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 3(49) [time_keeper] terminated, still waiting for 2 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 8(54) [SIP receiver udp:192.168.30.50:5060] terminated, still waiting for 1 more Apr 22 00:04:07 [45] INFO:core:shutdown_opensips: process 7(53) [SIP receiver udp:192.168.30.50:5060] terminated, still waiting for 0 more Apr 22 00:04:07 [45] INFO:core:cleanup: cleanup Apr 22 00:04:07 [45] NOTICE:presence:destroy: destroy module ... Thank you for running opensips

A windows question rather then an Issue

Hi,
I'm trying to implement the door intercom solution on my system.
I have two questions:

  1. the "sensor" section is preaty much clear. in my case the is an include line in configuration.yaml so I added it in the sensors.yaml file.
    But, to which files do I add the service section?
    also, I installed the add on (or, I think I did LOL) But i don't see its configuration and I guess that the ip\username\password.... section should be there, right? any idea what am I missing?
    ** EDIT ** for the ones to run into the same issue - after adding the repository it is "only" in the store. it seems I forgot to actually install it :)

  2. My current HASS is on an Oracle vmbox - inside a windows machine. would it be ok for the SDK or must I reinstall it as a hyperV machine? (any other option?)

many thanks
Gil

Recognize indoor or outdoor unit automatically

The struct NET_DVR_DEVICEINFO_V30 contains the field wDevType, with a code representing the type of unit.
The following example output shows the value of this field with two of the units I have available: the first outdoor, the other indoor.

Maybe it could be used to automatically recognize the indoor unit and use it as the target for the callsignal API?

2023-02-15 07:59:16.089 | DEBUG    | doorbell:__init__:20 - Setting up doorbell: outdoor
2023-02-15 07:59:16.090 | DEBUG    | doorbell:authenticate:27 - Logging into doorbell
2023-02-15 07:59:16.317 | DEBUG    | doorbell:authenticate:40 - Login returned user ID: 0
2023-02-15 07:59:16.317 | DEBUG    | doorbell:authenticate:41 - Doorbell serial number: <REDACTED>, device type: 603
2023-02-15 07:59:16.318 | INFO     | doorbell:authenticate:43 - Connected to doorbell: outdoor
2023-02-15 07:59:16.318 | DEBUG    | doorbell:__init__:20 - Setting up doorbell: indoor
2023-02-15 07:59:16.319 | DEBUG    | doorbell:authenticate:27 - Logging into doorbell
2023-02-15 07:59:16.408 | DEBUG    | doorbell:authenticate:40 - Login returned user ID: 1
2023-02-15 07:59:16.408 | DEBUG    | doorbell:authenticate:41 - Doorbell serial number:  <REDACTED>, device type: 602
2023-02-15 07:59:16.409 | INFO     | doorbell:authenticate:43 - Connected to doorbell: indoor

Provide more useful messages for Hikvision error codes

Right now in case of error we output directly the code provided by the SDK HCNetSDK.NET_DVR_GetLastError().
What if we parse this error and provide a more user-friendly version in output? For instance code 7 (IMO) means device is not reachable, so we could write that in the log to inform the user, instructing it to check for instance the ip configuration option.

I don't know if there are any Python libraries that already provide this information for us, without having to manually build a map from sdk_error_code => user_message.

New command for call dismiss, maybe?

Hi there,

Congrats on your work. I have a DS-KV8113-WME1 (V2.2.53 220713) paired with a DS-KH6320-WTE1 and this addon is the only one which works with the KV. I only got one annoying thing going on and was thinking if it would be too hard to get rid of it. Since I have the indoor station as well it keeps on ringing after I open the door using the addon. I see on logs that it finds the "Call dismissed" event thus I was wondering if you could add a command for it, which should do the job of canceling the ringing.

All the best.

hassio.addon_stdin removed

First thanks for building this addon!

Hassio.addon_stdin was removed in v10.
https://github.com/hassio-addons/repository/blob/9d08973517f1e7cb2808e79a8518cefad859a463/ssh/CHANGELOG.md

so this example for controlling a relays does not work anymore in HA

    service: hassio.addon_stdin
    data:
      addon: a53439b8_hikvision_sdk
      input: unlock1

Any idea on a work around?
I would think to use the shell_command services.
But i`m not 100% sure on what to run to exec stdin to the container.

Use addon as docker container

As was already requested in #23 #35, it could be useful to use this the addon as a standalone docker container, for installations without the HA supervisor.
This issues provides an overview to track the implementation changes. There are some initial requirements:

  • Read configuration from environment variables (or via a user-mounted file?)
  • Communicate to HA from a external container to the main instance
    • Need to configure url to reach instance

Rpi4 - non 64 bit

Hi, I would like to try the Hikvision SDK for Door Intercoms but I user 32 bit respbian on rpi4. Do you have it for non-64 bit ARM as well?
Thanks in advance

ds-kv8113-wme1 doesnt end call

Hello,
I have a ds-kv8113-wme1 calling a Dahua VTH via SIP, when i try to end the call like documentation the log return me this
Trying reject the call... Stdin message: reject
Inputbuffer: {"CallSignal":{"cmdType":"reject"}}
Response buffer:
Response output: {
"requestURL": "/ISAPI/VideoIntercom/callSignal",
"statusCode": 1,
"statusString": "OK",
"subStatusCode": "ok"
}
but the call doesn't stop.

This is my configuration
ip: 192.168.2.233
ip_indoor: 192.168.2.233
username: admin
password: *********
sensor_door: hikvision_door
sensor_callstatus: hikvision_callstatus
sensor_motion: hikvision_motion
sensor_tamper: hikvision_tamper
sensor_dismiss: hikvision_dismiss

and this is the service called to stop the call

service: hassio.addon_stdin
data:
addon: aff2db71_hikvision_sdk
input: reject

the addon field is correct
HA running in a virtualmachine in a server
Addon Hikvision-SDK
The addon works detecting whenever someone calls

DS-KH6320-WTE1

Good afternoon. Please tell me if this integration supports DS-KH6320-WTE1 monitor? Will the eight alarm sensors built into it and the two switches be displayed? Will it be possible to switch the alarm scenes and is it possible to supply the alarm? Thank you.

Добрый день. Скажите пожалуйста поддерживает ли эта интеграция монитор DS-KH6320-WTE1? Будут ли отображаться восемь тревожных датчиков встроенных в нее и два переключателя? Появится ли возможность переключать сцены сигнализации и возможна ли поставка на сигнализацию? Спасибо.

Roadmap ... Ideas ...

  • Define multiple doorstations
  • Create camera entity based on isapi or rtsp url
  • Two way audio maybe with webrtc card => #50
  • More events based on input/output relays
  • use stdin service to send ISAPI commands, like reboot
  • Key/badge management, like temp access for specific people allow door access

Cannot build aarch64 image

Hi, I saw you uploaded an aarch64 image and wanted to try it out, however it's failing to build. The output is

rock64:hikvision-sdk-aarch64:% docker build .                                                                                                                                                                                        <main>
Sending build context to Docker daemon  29.31MB
Step 1/7 : FROM openeuler/openeuler
 ---> ca894bc0249e
Step 2/7 : RUN yum -y install python-pip
 ---> Running in 23b8acea0492
OS                                              2.4 kB/s | 2.2 MB     16:07
Errors during downloading metadata for repository 'OS':
  - Curl error (28): Timeout was reached for http://repo.openeuler.org/openEuler-22.09/OS/aarch64/repodata/45ae80d99816da5dfd71e925f5c92204420897b4b57d648a1ff8c6a9e85f0287-primary.xml.gz [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]
  - Curl error (28): Timeout was reached for http://repo.openeuler.org/openEuler-22.09/OS/aarch64/repodata/bcdd920214ddabc90024f4636668569fd8b3990dafe897d8686d456c5bfa6581-filelists.xml.gz [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]
  - Curl error (18): Transferred a partial file for http://repo.openeuler.org/openEuler-22.09/OS/aarch64/repodata/bcdd920214ddabc90024f4636668569fd8b3990dafe897d8686d456c5bfa6581-filelists.xml.gz [transfer closed with 1162825 bytes remaining to read]
Error: Failed to download metadata for repo 'OS': Yum repo downloading error: Downloading error(s): repodata/bcdd920214ddabc90024f4636668569fd8b3990dafe897d8686d456c5bfa6581-filelists.xml.gz - Cannot download, all mirrors were already tried without success
The command '/bin/sh -c yum -y install python-pip' returned a non-zero code: 1

Thanks

Backlog of events can be a physical security risk

Currently it seems that if any events occur on the doorbell whilst the SDK->HA bridge is not running, they are buffered up and sent when it comes back online. This is a minor annoyance for things like the call/bell button, but in the case where you may have automations to trigger a separate smart door latch, this may lead to unexpected door openings.

Is there anyway to ignore any backlogged events or pass a timestamp (when it originally occurred) along with each action, so that this can be compared to the current time?

Ghost call on KD8003

Hi there, My intercom is Hik kd8003, I installed the add on today and instantly it start "receiving call", the call status change to "on" every 10-15 seconds, but no one has pressed the call button on KD8003.

Logs attached

Hikvision SDK Add-on started! Listening for events...
loop[2] find 10 mac and 16 ip
Doorbell ringing, trying to update: sensor.hikvision_callstatus
Call dismissed
Doorbell ringing, trying to update: sensor.hikvision_callstatus
Call dismissed
Doorbell ringing, trying to update: sensor.hikvision_callstatus
Call dismissed
Doorbell ringing, trying to update: sensor.hikvision_callstatus
Call dismissed
Doorbell ringing, trying to update: sensor.hikvision_callstatus
Call dismissed
Doorbell ringing, trying to update: sensor.hikvision_callstatus
Call dismissed
Doorbell ringing, trying to update: sensor.hikvision_callstatus
Call dismissed
Doorbell ringing, trying to update: sensor.hikvision_callstatus
Call dismissed
Doorbell ringing, trying to update: sensor.hikvision_callstatus
Call dismissed
Doorbell ringing, trying to update: sensor.hikvision_callstatus
Call dismissed
Doorbell ringing, trying to update: sensor.hikvision_callstatus
Call dismissed
Doorbell ringing, trying to update: sensor.hikvision_callstatus
Call dismissed

Error when installing addon

Hi, I have a Hikvision DS-KV8202 intercom with KH8301 indoor stations. Now I am interested in connecting this intercom to HA, but I can't manage to run the installation with an error in printscreen. Can you please advise me what is wrong? Thank you

hik_error_msg

General question

Hi,

I'm quite new, so sorry in advance if I ask some stupid questions.

I'm trying to understand how everything fits together:
Up until now, I used my own asterisk server to let my hikvision doorbell make a sip call to my cellphone using linphone-app, this works but unfortunately there is no video feed in the call itself (I accessed the rtsp stream seperately in zoneminder).

This amazing add-on (Hikvision-Baresip) looks like it can solve my issues and immediately integrate the rtsp stream into the sip call?
I'm just a bit confused how it works, is the Hikvision-Baresip add-on a seperate client that 'joins' the call from doorbell to cellphone or does it take the existing doorbell sip client and integrates the stream with it?

I added the add-on to my HA and it runs, but I'm not sure how to configure it:

  • the sip entry in the 'accounts' file, do you define here a new client for asterisk or is this the sip-address of the doorbell?
  • I edited the rtsp stream in the 'config' file, but do I need to set the address of the asterisk server somewhere?

Much thanks in advance!

With kind regards

HiWatch DS-D100IPF

Tell me, is there support for HiWatch DS-D100IPF and DS-D100IMWF? Thank you.

multiple outdoor stations

Hi Fabio, is it possible to run multiple instances of the SDK? I have more then one outdoorstation that i would like to have status updates on

error code = 153

I have a ds-kv6113-wpe1(c) with V2.2.57 build230110 firmware. When I try to start your add-on, it run out to this error:
I have only the door unit, so I just set up the ip, and I leave ip_indoor blank. The IP address and user/passw are correct, checked many times.

Using OS: Linux with architecture: x86_64
01/30/2023, 20:51:10 Hikvision SDK Add-on started! Listening for events...
loop[2] find 8 mac and 16 ip
NET_DVR_Login_V30 failed, error code = 153

Any idea?

Thanks!

Two Way Audio without SIP

Found a usefull reference to play with two way audio, would be great if we could this without the use of SIP

I have synology diskstation with Surveillance system, added the camera there, and i can talk to the person outside from the "DS Cam" feature... is sniffed that, and it was also using ISAPI

So for instance, user pressed the doorbutton, we already have the "callsignal" feature to reject/answer the call, afterwards we open the audio part ...

usefull commands:

curl -i --digest -u admin:xxx -X PUT http://192.168.0.x/ISAPI/System/TwoWayAudio/channels/1/open
curl -i --digest -u admin:xxx http://192.168.0.x/ISAPI/System/TwoWayAudio/channels/1/audioData
curl -i --digest -u admin:xxx -X PUT -d '' http://192.168.0.x/ISAPI/System/TwoWayAudio/channels/1/audioData
curl -i --digest -u admin:xxx -X PUT  http://192.168.0.x/ISAPI/System/TwoWayAudio/channels/1/close

reference with example:
spbroot/sipdoorbell#2
and
https://github.com/koush/scrypted/blob/main/plugins/hikvision/src/main.ts
and
https://github.com/magicbear/py-hikevent/blob/master/hikrtmp.cpp

Installation problem

Hi!
I am trying to install the addon, but get an error, what can it be?

The command '/bin/sh -c apt-get -y update -qq && apt-get -y install opensips opensips-cli opensips-mysql-module opensips-postgres-module opensips-unixodbc-module opensips-jabber-module opensips-cpl-module opensips-radius-modules opensips-presence-modules opensips-xmlrpc-module opensips-perl-modules opensips-snmpstats-module opensips-xmpp-module opensips-carrierroute-module opensips-berkeley-module opensips-ldap-modules opensips-geoip-module opensips-regex-module opensips-identity-module opensips-b2bua-module opensips-dbhttp-module opensips-dialplan-module opensips-http-modules opensips-tls-module opensips-cgrates-module' returned a non-zero code: 100

unable to connect 2 KD8003

Hi,
I have 2 KD8003, but it is possible to connect only 1.
Is it possible to connect both?
It also doesn't read tamper contact, how do you read with SDK?

Error

VirtualBox_HAS_28_03_2022_23_29_58

Tell me what am I doing wrong? After running hikvison-opensips, an error appears and homeassistant stops working. Please help?

Running on Home Assistant Container

Hi @pergolafabio .

Thank your fot his awesome work.
I have a question about MariaDB. As I want to run your integration on Home Assistant Container I need to known where you put database config because I have a MariaDB on seperate container.

https - not update sensor

Hi, i use https because i need SmartThings implemetation.
If I use HTTP works perfectly:

Door unlocked, trying to update: sensor.hikvision_door
Unlocked by: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Door not closed

If I use HTTPS does not work:

Door unlocked, trying to update: sensor.hikvision_door
Sensor updating failed
Unlocked by: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

I change the 'url_states' to http or https.
I don't use both for HA.

No callstatus, just motion

Hi!

I am using a hikvision DS-KB6003-WIP. I have installed the repostiory, then the HikVision SDK Addon, I made all the configurations, motion it is working, but not the call status. And... this is the only reason for which I tried the addon, I need the callstatus status :-).

This is the log:

Hikvision SDK Add-on started! Listening for events...
loop[2] find 8 mac and 16 ip
Motion detected, trying to update: sensor.hikvision_motion
Motion detected, trying to update: sensor.hikvision_motion
Motion detected, trying to update: sensor.hikvision_motion
Motion detected, trying to update: sensor.hikvision_motion
Motion detected, trying to update: sensor.hikvision_motion
Motion detected, trying to update: sensor.hikvision_motion
Motion detected, trying to update: sensor.hikvision_motion
Motion detected, trying to update: sensor.hikvision_motion

Any idea how to make it work?
Thank you in advance!

Edit:

I have tried this:

curl -i --digest -u admin:xxxx http://192.168.0.70/ISAPI/VideoIntercom/callStatus?format=json&channelType=tripartitePlatform
for other models:
curl -i --digest -u admin:xxx http://192.168.x.x/ISAPI/VideoIntercom/callStatus?format=json
Should give as output : “idle” , “ring” , “onCall”

But I get "Can't locate the url#" every time....

Addon exits without an error message

Hi there,

Thank you for the work on this addon. I've installed the addon in homeassistant but it does not stay running (similar to the issue raised here in issue #24 - sdk container exits without alert). The sensor states have never updated so it looks like it's failing before querying the device.

The logs show:
Using OS: Linux with architecture: x86_64 02/06/2023, 06:56:27 Hikvision SDK Add-on started! Listening for events... loop[2] find 10 mac and 16 ip

Any assistance would be appreciated!

Thank you

Use Python logging instead of "echo" messages

If we use the standard logging module from Python, we can define various log levels (ERROR, WARNING, INFO, DEBUG). This could be useful for a user to debug a problem they encounter. By default the addons could output only logs at WARNING level or higher (as does Home Assistant), to inform user of problematic situations.
If there is the need for more detailed information (to help troubleshooting), we can instruct the user to set the log level to DEBUG, and to share the resulting logs, that will contain more fine grained information for us developers to understand the root cause.

I already did some preliminary work in #39. If it is ok, I can extend it to the rest of the addon.

Just an idea: new sensors

Hi
Thank you for fantastic work. Any chance you could add another sensors?
Like tamper alarm, or what ID unlocked door.
m

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.