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

Not sure what you mean? I shared my working script, i use the same?

1 Like

Is there is indeed an issue with the ā€œset attributeā€ function, use your curl command instead? You can use that too in python with an OS.commandā€¦
You now put in some state with curl, the word yoo-hoo, but you can also use a turn on service, so you can turn on a script or automationā€¦ Then is no sensor needed

Also try the same script on Linux, i think itā€™s related to windows, i had issues too when I was testingā€¦ Just install Linux with virtualbox or VW workstation

1 Like

Have you found the cause why the files are not found?

With Linux on a Virtualbox, it is installed and working. I am getting door open attributes delivered to my sensor! Hooray!!!

How can I create a door ringing sensor?

motionā€™?

Good :slight_smile:

I donā€™t know if your model supports door ringing, check the logs

in putty, I am able to see the distinct door ring alert, as well as door unlock and motion. however, the sensor in HA doesnā€™t seem to change.

Do you still get sensor updating failed in Linux?

it is working now - i am getting sensor updated, it is good!!!

However, the HA sensor is not usable- it is a value template sensor with no device class, therefore it is very hard to integrate within homekit or other systems.

i am trying to figure out what is best to do with the json data.

so far the only attribute received is door status (unlock).

I am trying to add this as a button or a sensor entity but it doesnt seem to work.

I then tried to query the sensor from hubitat, but it cannot be visible.

this is strange.

Change the script so that you change the state instead of an attribute? Normally you can customize all entities with device class

can I have multiple sensors created in Home Assistant from this?

What do you suggest that I modify?

also, is the way to define a device_class, through the customization.yaml?

Offcourse ,just create a template sensor for each type of eventā€¦
Look in the hik.py, the place where I do the set attribute with the 1 sec sleep, just change there the name of the sensorā€¦
Instead of changing an attribute, just change the state, like you tested with the curl command

Any idea on how to change the state? I keep getting errors.

Iā€™ve tried different ways of writing the python script for hours now.

Do you know how I can make the sensors useable ? Current they show up as sensors that have no state- just attributes. HA does not allow automations to be built with attributes as far as I can tell. It also blocks attributes from being displayed through HomeKit.

Is there a better way?

??? offcourse you can check attributes in automations? something like

but if you want states? what did yoiu try? you can change the payload verry easy?

  trigger:
    - platform: state
      entity_id: sensor.hikvision
      from: 'off'
      to: 'on'
      attribute: 'callstatus'

or


  condition:
    - condition: template
      value_template: "{{ is_state_attr('sensor.hikvision', 'callstatus', 'on') }}"

try something like:

                data = json.dumps({'state': 'on'})
                response = requests.post(url_states + sensor_name_callstatus, headers=headers, data=data)
                time.sleep(1)
                data = json.dumps({'state': 'off'})
                response = requests.post(url_states + sensor_name_callstatus, headers=headers, data=data)

I now have one sensor with three attributes in Hassio:

Attributes: Doorbell ring, motion detection and door unlock.

I would like to find a way to have these sensors appear in Home kit, they do not work out of the box. Has anyone tried a different way?

Isnā€™t it possible to expose sensor to homekit? I donā€™t use itā€¦ Why not create switch instead? Or something thatā€™s possible to expose to homekit?

Quick update ā€¦ sensors created this way cannot be seen by HAP (Homekit Accessory Protocol)ā€¦BUT we can make it work using an integration called ā€œVirtual Sensorsā€ and the use of automations to trigger the virtual sensors!

I have a Door Unlock command capture sensor, a motion sensor, a doorbell rining sensor and a door bell call dismissed sensor.

They are all working -

Homebridge has a plugin for generic videodoorbells that bundles a grouping of virtual sensors witha a video camera, so if a doorbell event is triggered, it initiates the Homekit built in ā€œdoorbell pressedā€ event sequence, with proper notification and a chime on you apple homepod.

Cool, glad that you have it working :slight_smile:
Are you using the add-on now?

Unrelated questionā€¦

Has anyone figured out how to open up the DS-KV8123-WME1(B) in order to label the buttons? I cannot for the life of me figure out how to change the button labels now that I have everything working in HA.

I am using the add-on now - next step is to figure out a way to get Homekit Secure Video to work on this.

1 Like

I havenā€™t tested personally yet, but you can create a HKSV camera through scrypted