Getting Plate Recognizer to work with Blue Iris

Feb 25, 2020
13
1
Portland
I can't seem to get Plate Recognizer to run with Blue Iris 5.5. Plate Recognizer still shows 0 API calls and nothing on the dashboard.

This is what I did the set it up:

  • Settings -> AI -> Plate Recognizer -> "Enabled" (checked), and "Cloud API with Token" selected with my API key entered
  • Camera Settings -> Trigger -> Artificial Intelligence -> "Plate Recognizer for ALPR" (checked).
Is there anything else I need to do just to get it running? It doesn't seem to be sending any images to Plate Recognizer yet.
 
Do you have motion detection selected for the camera and is it triggering alerts?

You will find it is tricky to get the motion zones correct so that it is sending an image to Plate Recognizer with the plate in the picture, but it can be done, but first we need to get your camera to trigger.
 
When there is motion, it triggers it to record video, and that is working (videos get recorded when cars drive by). I'm not currently using "alerts", just triggering.
 
Ok, I enabled alerts for the camera, and now it's sending images. Ok, apparently the plate recognition is tied to the alerts feature. It's weird then that the settings for it are on the "Trigger" page in the camera settings. Ok, I'll keep on working with it.
 
What does the setting "only for confirmed vehicle alerts" do?

I sure do with this stuff was better documented. That option and many other settings don't even appear in the Blue Iris documentation at all. :confused:
 
What does the setting "only for confirmed vehicle alerts" do?

I sure do with this stuff was better documented. That option and many other settings don't even appear in the Blue Iris documentation at all. :confused:

The only for confirmed vehicle alerts is if you are using DeepStack to identify a car so that you don't have it sending pictures to Plate Recognizer of a person or sun coming in and out of the clouds. i was playing with this feature just today and I have found that feature to be spotty so I would rather send some pics that aren't cars than missing clearly a car. Here are 5 cars that sent without using Deepstack (had a clone camera going for testing), but it only sent one using DeepStack and confirmined for vehicle alerts. YMMV.

1632779594746.png
 
  • Like
Reactions: questioning
So you would have to run simple motion detection for the camera in this scenario, but even then that can be tricky, so you need to run Blue Iris motion detection instead of camera IVS.

I found this to be the setup that worked best for me. This one zone approach at this location allowed me to catch the front plate of the cars going right to left and the back plate of the cars going left to right. Occasionally I would get a large truck or a very fast vehicle that was missed, but I also run this continuous motion in the event that happens or it missed the motion. And then at night I simply make the object size box a lot smaller like the size of the plate. As you can see from the alert clips to the left that it captures all the cars in the middle of the frame. My nighttime is the same as well. If you are running a 1/2000 shutter then it should take out a lot of the headlight bounce that would come from the street and cause it to trigger early.

If you are only interested in the back plate, then make another zone that is to the left of this and tell it to only trigger for motion from the zones going left to right.

1632795852923.png

Post your settings for day and night and the zones you have and we can help you out.

But it does take some trial and error to get this down.
 
There are rumblings of an internet connection coming for the Condo Association. Initially for a Key Fob system, but I told the Prop Mgmt Co, that we've had 3 catalytic converters cut off, and that off site monitoring might help me see what going on. would like to do something with LPR eventually....also I could put a camera on the Boiler gauges and Pipe that into my phone or home PC. Wouldn't that be cool.
 
  • Like
Reactions: Hina Chow
Dang you would think one of the condo owners would allow you to tap into their internet for that service!
 
  • Like
Reactions: Hina Chow
Selfish smallminded Curmudgeons they are. Not a one of them is smart enough In Geekdom to understand what I'd be proposing. Share? who me? No Way!
 
I'd like to resurrect the topic, maybe someone can help me out a bit.. I finally gave the plate recognition job from Home Asisstant to Blue Iris directly, because snapping high res images on a timely manner to catch a readable license plate was a struggle fro HA for some reason. Now I get proper plate reading directly in Blue Iris, but how on earth am I passing this information to HA? Preferably via MQTT. I already have a vehicle object detection sensor set up between Blue Iris and HA, so I'll figure out MQTT setup part, what I cannot figure out is how to extract the information from Blue Iris and embed it into the MQTT message. What I'd like to achieve: individual message for each recognized plate with the actual plate numbers as the payload. Many thanks in advance!
 
I'd like to resurrect the topic, maybe someone can help me out a bit.. I finally gave the plate recognition job from Home Asisstant to Blue Iris directly, because snapping high res images on a timely manner to catch a readable license plate was a struggle fro HA for some reason. Now I get proper plate reading directly in Blue Iris, but how on earth am I passing this information to HA? Preferably via MQTT. I already have a vehicle object detection sensor set up between Blue Iris and HA, so I'll figure out MQTT setup part, what I cannot figure out is how to extract the information from Blue Iris and embed it into the MQTT message. What I'd like to achieve: individual message for each recognized plate with the actual plate numbers as the payload. Many thanks in advance!
Hm, I forgot to ask ChatGPT before posting here, sorry, old habits. I leave the AI solution here for future Dummies like me, who like to ask among real people first.

What I did in Blue Iris (of course besides setting up and enabling ALPR for the selected camera):
  • in the camera settings which send images for plate recognition, in the Alert section I set up a new "On alert" task, which is MQTT. You have to specify the wished MQTT topic, and in the payload I added the following string: { "state":"on", "plate":"&PLATE"} . In the actual message "&PLATE" will be replaced with the actual plate number Blue Iris received.
  • in the required "required AI objects" section I added an asterisk *, as in ANY AI acknowledgement will send the MQTT message. I was not sure what could/should be here, but it works. Maybe it will send a message without recognized plate number, and this could be eliminated, but it's beyond my knowledge, sorry :)

What I did in Home Assistant:
  • I set up a general motion sensor which turns on for 5 second whenever Blue Iris sends plate number
  • I set up simple sensor to hold the last plate number BI sent
  • I trigger my automations (mostly opening the gate for family members and announcing their arrival through HomePods via TTS and of course mobile notifications to me) with the motion sensor, and I use the last stored plate number sensor as condition, so the automation only acts on certain plate numbers, otherwise it does nothing.

Sample codes coming from ChatGPT which can and should be personalized:
This binary sensor turns on for 5 seconds whenever a new license plate is received.
YAML:
binary_sensor:
  - platform: mqtt
    name: "Plate Recognition Motion Sensor"
    state_topic: "blueiris/motion"  # Replace with your actual topic
    value_template: >
      {% if value_json.plate is defined %}
        on
      {% else %}
        off
      {% endif %}
    device_class: motion  # Optional
    off_delay: 5  # Automatically turn off after 5 seconds

UPDATED MOTION SENSOR: I had some problems with triggering the motion sensor. The plate number sensor was properly receiving the latest plate numbers, so I knew it was not a connection issue, but the notion sensor's value remained UNKNOWN. ChatGPT helped resolve that issue, too, with the following updated motion sensor value template:

YAML:
binary_sensor:
  - platform: mqtt
    name: "Plate Recognition Motion Sensor"
    state_topic: "blueiris/motion"  # Replace with your actual topic
    value_template: >
      {% set payload = value | from_json %}
      {{ 'on' if payload.plate is defined else 'off' }}
    device_class: motion
    off_delay: 5 # Automatically turn off after 5 seconds
    payload_on: "on"
    payload_off: "off"

This sensor stores the latest license plate number.
YAML:
sensor:
  - platform: mqtt
    name: "Latest Plate Number"
    state_topic: "blueiris/motion"  # Replace with your actual topic
    value_template: "{{ value_json.plate }}"

Corresponding sample automation which is triggered based on plate "motion" and uses lates received plate as condition:
YAML:
automation:
  - alias: "Gate Control Based on Plate"
    trigger:
      - platform: state
        entity_id: binary_sensor.plate_recognition_motion_sensor
        to: "on"
    condition: []
    action:
      - choose:
          - conditions:
              - condition: template
                value_template: "{{ states('sensor.latest_plate_number') == 'AAA123' }}"
            sequence:
              - service: switch.turn_on
                target:
                  entity_id: switch.gate_open
              - service: notify.notify
                data:
                  message: "Gate opened for plate AAA123."
          - conditions:
              - condition: template
                value_template: "{{ states('sensor.latest_plate_number') == 'BBB123' }}"
            sequence:
              - service: switch.turn_off
                target:
                  entity_id: switch.gate_close
              - service: notify.notify
                data:
                  message: "Gate closed for plate BBB123."
        default: []

Hope you can use it for something useful to you.
 
Last edited:
  • Like
Reactions: Mike A.
ChatGPT answered it?

What exactly did you type in ChatGPT to give you a working solution?
 
ChatGPT answered it?

What exactly did you type in ChatGPT to give you a working solution?
yep totally. basically summed up the problem in a written form: this is the json payload I'm receiveing, based on this I'd like to have 2 HA sensors, one motion to notify if there's a recognized plate, and one to store the latest plate number, and please show me any example how can I make an automation that is triggered based on this motion sensor, and the action's conditions are based on the latest stored plate number, easy peasy, just like that. And it gave a proper, working answer. Had to tweak a little bit here and there, but was done within 2 minutes.