Hikvision line detection binary sensor not detected

hey i need your help to understand why i can’t see the binary sensor line detection of my hikvision camera, while the binary sensor motion is working properly

  - platform: hikvision 
    name: Camera 
    host: 192.168.9.4
    port: 80
    ssl: false
    username: xxx
    password: xxx
    customize:
      motion:
        delay: 1
      line_crossing:
        ignored: false

Please help me!
I can’t find a solution

I think you need to enable it in HIKvision camera dashboard, instead of in HA. I have it working with that setup, and I do get notifications if line sensor is triggered via HA.

it is already configured in the hikvision dashboard, like the motion sensor. tested and working on hikvision as it activates the sound alarm. however I activated it after integrating it into the home assistant, maybe I should reconfigure the integration?

I am just using this blueprint

and this is how it was setup

Thanks yousaf465! Very usefull , but the problema Is that i can’t have the line crossing sensor from the camera integration. Any solution about this?

Did you tick Notify Surveillance Center under Linkage Method?

Yes sure!. It’s linked

I don’t have either, it was created by HA itself.
What I have hidden is the name of the camera in Hikvision and these all sensors were created by HA itself when I added the camera through generic camera integration.
image

@yousaf465 The generic camera integration didn’t create these. Extra sensors must be from something else e.g. onvif or camera specific integration such as hikvision.

I’ve tried also deleting all hikvision entity in the entity.registry, thinking HA will recreate all binary sensors, but nothing.

how do I find which integration created these sensors then? Interesting reverse-engineering.

Yes, I did install ONVIF once upon a time, but I am no longer using it and it is deleted but these sensors are still present.

I could try to integrate them with onvif to see if it finds the line detection sensor

If you have access to your homeassistant installation directory, you could type

cat .homeassistant/.storage/core.config_entries

If you want to know if any entities are configured from onvif type

cat .homeassistant/.storage/core.entity_registry

or to narrow down a bit

cat .homeassistant/.storage/core.entity_registry | grep onvif -A4 -B20

You will then get a list of all the configuration entries that have onvif in them.

For example I get several that look a bit like this:

            {
                "area_id": null,
                "capabilities": {},
                "config_entry_id": "373196f1f6ffddd64b7fc723975e35ea",
                "device_class": null,
                "device_id": "f7e2d8d11ca80e1862f54f560ebf4ac0",
                "disabled_by": null,
                "entity_category": null,
                "entity_id": "binary_sensor.videosource_1_motion_alarm",
                "hidden_by": null,
                "icon": null,
                "id": "3e3f8898ebd440fa70c163d2dcd5e7c1",
                "name": null,
                "options": {},
                "original_device_class": "motion",
                "original_icon": null,
                "original_name": "VideoSource_1 Motion Alarm",
                "platform": "onvif",
                "supported_features": 0,
                "unique_id": "d8:eb:97:cd:8e:40_tns1:VideoSource/MotionAlarm_VideoSource_1",
                "unit_of_measurement": null
            },

You could use the same technique to search for a specific entity_id to find find out which ‘domain’ was responsible for creating it.

If you configured onvif and removed it but sensors were left behind, I’m pretty sure that indicates a bug in the onvif integration at some point.

Hi,
I was fighting with this problem too many hours.

To use hikvision addon in homeassistant first you must enable on camera web page option to send notification to ivms4500 other way hikvision addon wont detect motion etc.

1 Like