Has anyone got the integration with Plate Recognizer?

I have been trying to configure ALPR Cloud, but have found they offer 1000 credits per month. So looking further and being into cloud solutions and not local installations, I have come across platerecognizer.com.
They seem to be really good nowadays and they offer 2500 image recognitions per month for free.

I wonder, if someone has already configured/created custom integration to support this source?

I’m sure @robmarkcole could whip something up pretty quickly. To fetch some JSON from the Plate Recognizer API is pretty simple:

import requests

apikey = "MY_PLATE_RECOGNIZER_API_TOKEN"
url = 'https://api.platerecognizer.com/v1'

with open ('license_plate.jpg', 'rb') as fp:
        try:
                response = requests.post(
                url+'/plate-reader/',
                files=dict(upload=fp),
                headers={'Authorization': 'Token ' + apikey})
        except requests.exceptions.RequestException as e: 
                response = {'error': 'Plate recognizer rejected the upload. You either have a bad API key or a bad image', 'results': []}
                print ('Plate recognizer rejected the upload. You either have a bad API key or a bad image')
        else:
                response = response.json()
                print ('ALPR JSON: {}'.format(response))

It returns JSON like this:

ALPR JSON: {u'processing_time': 189.618, u'timestamp': u'2019-09-25T20:34:43.992011Z', u'results': [{u'box': {u'xmin': 284, u'ymin': 405, u'ymax': 471, u'xmax': 391}, u'plate': u'abc1234', u'score': 0.904, u'dscore': 0.939}], u'filename': u'license_plate.jpg', u'version': 1, u'camera_id': None}

Nope, that’s definitely a bowl …

Sorry, I couldn’t resist. :rofl:

Yes you can easily edit the code here. I created a feature request License Plate Recognition API with platerecognizer.com

Anyone have this working in HOME ASSISTANT yet? I could really use it.

Jeff

I have got this working… finally

BlueIris installed on my windows PC
Platerecognizer api in BlueIris Settings
Webhook created on platerecogniser website
Webhook trigger in Home Assistant
Logic to check Json payload from webhook and identify plate
If plate recognised it opens my remootio gate