Hi All,
I have configure this number plate recognition , However it;s not working for me as expected . I must be missing something.
After initial config , I did ran a trail and it worked.
After the initial config the status of the of the image processor is unknown
Once the number plate detected on my drive way its became 1 and the number plate sensor became True from state False.
Problem 1- Every reboot of HA make the image processor status unknown. At some point after the reboot now its not changing the state from unknown. While checking the https://platerecognizer.com/
I found that for every instance the number plate scan happened and state was true. Even the Image processor is not updating the API Calls count . It getting the updated if I reboot the HA.Its also not storing the snapshot (PIC) which was uploaded to the API during the image scan.
Problem 2 - Once the number plate sensor state change from True from False my automation triggers . However the sensor state are not getting back to false . How can I get it reset automatically after a certain time such as , if the state change from False to True then remain true for 30sec or 2 min then became False . so that next time when the image scan happen it may change to true bases on the number plate.
my configuration are as below :
#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: xxxxxxxxxxxxxxxxx
Sensors :
- 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-1 looks like this : - it will trigger once there is a vechile motion detected on my drive way.
alias: Number Plate Scan
description: Scan the number plate when there is vehicle motion detected on diveway
trigger:
- type: motion
platform: device
device_id: 8e61e2afb7f7b978d561184a04a6f205
entity_id: 2df8477fd76faf731eae3c218dae48d1
domain: binary_sensor
condition:
- condition: not
conditions:
- type: is_motion
condition: device
device_id: 8e61e2afb7f7b978d561184a04a6f205
entity_id: 2df8477fd76faf731eae3c218dae48d1
domain: binary_sensor
for:
hours: 0
minutes: 1
seconds: 0
action:
- action: image_processing.scan
metadata: {}
data: {}
target:
entity_id: image_processing.platerecognizer_driveway_cam_main
mode: single
My automation-2 looks like this : - it will open the garage door once the number plate sensor status change from false to true.
alias: RegoSensorOPENGararage
description: Garage Door will be open once the Rego is detected
trigger:
- platform: state
entity_id:
- sensor.plate_recognizer
- sensor.plate_recognizer_1
to: "true"
from: "false"
condition:
- condition: device
device_id: 9a02c9bb3454b78fdb35c68b4eec7521
domain: cover
entity_id: 1867f92c91fc70e41d684d4f35b84080
type: is_closed
action:
- device_id: 9a02c9bb3454b78fdb35c68b4eec7521
domain: cover
entity_id: 1867f92c91fc70e41d684d4f35b84080
type: open
mode: single