Hi , I am very new to HA and its configurations . I am trying to set this up with my Dahua IP Camera ( With Smart Vehicle Motion detection). I am trying to open my Garage Door once my vehicle detected on my driveway.
Problem :-1 Dahua Camera started detecting vehicle motion and it process the image scan first , in this place my number plate is being recognized by the Plate Recognizer API . Where I can see that the confidence is 88% or some time 81%.
However due to the nature of my camera while entering to my garage another instance of vehicle motion is detected and at this stage in the picture no number plate is detected and is being sent to Plate Recognizer API . I Have added a condition that if the motion is detected in last one min then the subsequent motion image should not be scanned and its working now.
Problem :-2 After detecting my number need to trigger the garage door opening but I am not able to figure out this part . I am using the state = true for opening my garage door of the number plate sensor. I have defined 2 possible sensor . however the state is not getting true as the confidence level is 80-88% approx
looks like I need to change this but not sure what condition should I use in my automation . May be something from the platerecognizer_driveway_cam_main while using the attribute confidence .
configuration.yaml entry :
#Number Plate Recognizer
image_processing:
- platform: platerecognizer
api_token: !secret plate_recognizer_token
regions:
- au #replace with your region
watched_plates:
#- !secret number_plate
- ABCD
- EFGH
save_file_folder: /config/www/plate_recognizer #replace with your location if you have a different one
save_timestamped_file: true
always_save_latest_file: true
source:
- entity_id: camera.driveway_cam_main #replace entity id
I have defined the api_token in the secret.yaml
plate_recognizer_token: XXXXXXXXXXXX #replace token
I have created 2 sensor in the configuration.yaml
- platform: template
sensors:
plate_recognizer:
friendly_name: "ABCD"
value_template: "{{ state_attr('image_processing.platerecognizer_driveway_cam_main', 'watched_plates').ABCD }}"
plate_recognizer_1:
friendly_name: "EFGH"
value_template: "{{ state_attr('image_processing.platerecognizer_driveway_cam_main', 'watched_plates').EFGH }}"
My automation scripts looks like this : -
alias: GarageDoorImage-Open
description: ""
trigger:
- type: motion
platform: device
device_id: DriveWayCam
entity_id: DriveWayCamSmartVechileMotion
domain: binary_sensor
condition:
- condition: device
device_id: GarageDoor
domain: cover
entity_id: GarageDoor
type: is_closed
- condition: not
conditions:
- type: is_motion
condition: device
device_id: DriveWayCam
entity_id: DriveWayCamSmartVechileMotion
domain: binary_sensor
for:
hours: 0
minutes: 1
seconds: 0
action:
- sequence:
- action: image_processing.scan
target:
entity_id: image_processing.platerecognizer_driveway_cam_main
data: {}
- if:
- condition: state
entity_id: sensor.plate_recognizer
state: "true"
then:
- device_id: GarageDoor
domain: cover
entity_id: GarageDoorCover
type: open
else:
- if:
- condition: state
entity_id: sensor.plate_recognizer_1
state: "true"
then:
- device_id: GarageDoor
domain: cover
entity_id: GarageDoorCover
type: open
The issues are non of the number place sensor status is getting true even through I can check in the Sign In - License Plate Recognition API the number are detected with 80-88% confidence.