ANPR modifiable "approved" plate list

I’ve setup ANPR with home assistant using plate recogniser to open our driveway gate when we arrive home. It’s working great and I have created sensors for both our cars that turn to true when our plates get returned as a match.

What would be really great is to have a card on my dashboard where I can input additional license plates and have that added to the “approved list” of license plates. I could then remove that plate from the list when no longer needed and manage it more easily.

Use cases would be:

  • Cleaner
  • Friends/family visiting
  • Delivery drivers

Anyone have any creative ideas on how to do this?

Jonathan

What do you use for your ANPR ?

I used Geo’s guide here - DIY Number Plate Recognition System with Home Assistant – Smart Home Makers

1 Like

Same one I use

I found you need to restart after adding other watched plates so probably not possible to add in the front end. Maybe post an issue here

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.

Could you format you post as below as hard to read like that

Thank you for your response. My bad for the formatting, now I have updated it to a readable format.

Hey

I don’t have a lot of practical knowledge as yet with Plate Recognizer, stumbled across this thread in doing research to implement this for myself.
Currently building Automations etc. in my test HA environment.

Have you looked at “Traces” from the “GarageDoorImage-Open” Automation to see which conditions are maybe not being met ?

Also something I have noticed, but not validated is the use of capitalisation across some states i.e. “True” vs “true” you can check for that under Developer Tools → States to see if the state is a capital or not, being Linux based it is case sensitive

On the confidence level - the examples provided in Github shows a confidence level of .883 which translates to 88% not sure what the tipping point would be for true vs. false on a confidence level for a watched plate match.

Hey David,

Thanks for your suggestion . I did noticed that the image processing sensor status reset to unknown when HA restart and that creating a problem for me . When I set the status to 0 or 1 manually then the hole setup is not working . In addition to that the Plate recognizer sensor status also not automatically resetting to FALSE after a TRUE event. My automation are dependent the plate recognizer status . Manually setting of the status of the plate recognizer is also breaking the hole setup .

so I have to trigger anther event of image processing at certain point where its changed the state of plate recognizer to False from True so that when the actual even occur it work,