I keep a log of when I load updates and my HIKVision cameras support Line Crossing. I have a few automation’s that are triggered by this binary object and the last time they were triggered was about the time I loaded 118.4 and have not triggered since. I use these as part of my home surveillance.
I use this to turn on a light when I drive my car into the parking space or if someone crossed the line in the B to A direction. There are other automations and all have stopped.
Any ideas as I have changed nothing apart from loading the 118.4.
What version were you running before 0.118.4? Can you please show an example of one of the automations that are not working anymore?
Hi @Burningstone,
Thank you for the reply.
From my log
|24/11/20|06:00|Update to 118.3|
|27/11/90|06:00|Update to 118.4
Ran Config Checker – All OK no errors found|
This is an example of one of my automation’s. It purpose is to turn on a LED LAMP when I drive my car into the car park or when someone crosses the logical line in the B to A direction
Line 1
Line 2
- id: '1571383564478'
alias: Car Parking and Front Door Night Light
description: 'Turn on Front Door LED LAMP when Line crossed '
trigger:
- entity_id: binary_sensor.ip_dome_line_crossing
from: 'off'
platform: state
to: 'on'
condition:
- condition: or
conditions:
- after: sunset
condition: sun
- before: sunrise
condition: sun
- condition: and
conditions:
- condition: state
entity_id: switch.aeon_cpa_switch_switch_3
state: 'off'
action:
- entity_id: switch.aeon_cpa_switch_switch_3
service: switch.turn_on
- delay: 0:10:00
- entity_id: switch.aeon_cpa_switch_switch_3
service: switch.turn_off
I hope that makes sense
This afternoon I set up HIKVision iVMS-4200 client software for the HIKVision Devices on my Desktop W10 PC.
This allowed me to see where the line crossing lines were and get an audible alarm when one was crossed as well as a motion detection audible alarm so I know the cameras are working.
For example in the case of motion detection a green square tracked the motion and when the line was crossed it went red and a sound was heard on my speakers.
So it’s pointing to HA.
Does the binary sensor reflect the state correctly? Is the binary sensor coming dirwctly from the cam or is this a template binary sensor?
As Far as I know it’s coming directly from the camera.
This is my Configuration.yaml as per the HIKVision integration doco
## Camera binary sensors entry
#
#Front DoorCam
binary_sensor:
- platform: hikvision
host: 192.168.0.123
username: UN1
password: !secret operator_cam_password
#
#ShedCam
- platform: hikvision
host: 192.168.0.456
username: UN1
password: !secret operator_cam_password
#
#BackDoorCam
- platform: hikvision
host: 192.168.0.789
username: UN1
password: !secret operator_cam_password
#
#BalconyCam
- platform: hikvision
host: 192.168.0.234
username: UN1
password: !secret operator_cam_password2
I have changed the Cameras Username & IP addresses above… (just for security).
Ok, but do they still work correctly? Meaning do you see the binary sensors change state?
No, they don’t change state. That’s the problem. If they were changing state then my automation’s would work.
However, just tonight I was reading a forum where one guy said he got his to work by disabling the motion detection in the Event area and enabling only the Line Crossing detection and region detection.
So I reconfigured the cameras to not detect motion but detect the line crossing and region entry detection in sth smart area.
I then restarted HA. This was about 18:30 ish
Since then there seems to be some activity.
Weird
I will monitor it for a day or so and get back to you.
Thanks again for you interest and assistance.
What I have I done so far and what are the results.
What I said about disabling the Motion detection and only enabling smart events seems to have had some effect.
This is interesting because it seems to indicate that You can’t have both which is annoying.
I would like to be able to detect motion for recording purposes but send alerts if lines are crossed.
Maybe this is a bit utopian but if someone can educate my thinking I would be grateful.
Anyway…
I decided that I needed to start from scratch.
This means checking firmware and configuring the cameras.
The firmware on all cameras was out of date so I updated to the latest.
This was done this afternoon (16:00 ish) so will see how it pans out.
Configuration.
I will detail one camera as the others will be similar
This is for a DS-2DE3304-DE. It is a 3MP dome PTZ
In The Basic Event, I have disabled the motion detection.
In The Smart Event I have enabled Line Crossing
I have 2 lines
#1
#2
Lets’s see what this does before I go further.
It’s been a few days now and the removal of motion detection from the cameras seems to have worked.
I cannot explain this as it did work at some time.
The HiKVision integration does not seem to have changed.
So rather than try and work with something I have no control over I decided to separate what I wanted to do.
I will let HA detect line crossings as that is what I needed in HA for my automation’s.
However I am running Surveillance Station on my Synology NAS so I have looked deeper into what that could do for me and it can detect smart events like motion, line crossing etc and also give push notifications. I was using this to record my video footage anyway.
Now that SS can utilise HTML5 it is quite a neat package and works really well in Chrome.