#Help with BlueIris MQTT or Webhook for PlateRecognizer

1 messages · Page 1 of 1 (latest)

junior imp
#

So i have BlueIris Installed and working to send images from my camera to the platerecognizer API

I am looking to setup either an MQTT trigger or Webhook from BI (BlueIris) to my HA server to trigger a gate opener if the plate is recognised

The issue im having is the JSON payload of the plate from BI through to HA and getting this to be used as a variable to check if its a valid plate.

Has anyone used this and havs a working JSON payload and MQTT trigger.

  - trigger: mqtt
    topic: blue_iris
    payload: "{\"plate\":\"&PLATE\"}"
  - webhook_id: blueiris_plate_trigger
    allowed_methods:
      - POST
      - PUT
      - GET
      - HEAD
    local_only: false
    trigger: webhook
conditions: []
actions:
  - variables:
      plate: >-
        {% if trigger is defined and trigger.payload_json is defined and
        trigger.payload_json.plate is defined %}
          {{ trigger.payload_json.plate }}
        {% elif trigger is defined and trigger.payload_json is defined and
        trigger.payload_json['&PLATE'] is defined %}
          {{ trigger.payload_json['&PLATE'] }}
        {% else %}
          ''
        {% endif %}
  - data:
      message: "Webhook received plate: {{ plate }}"
      level: info
    action: system_log.write
  - choose:
      - conditions:
          - condition: template
            value_template: |
              {{ plate in ['S15MFY', 'WG15LLX'] }}
        sequence:
          - data:
              title: Plate Detected
              message: Vehicle with plate {{ plate }} arrived.
            action: notify.mobile_app_Scottsphone
      - conditions:
          - condition: template
            value_template: |
              {{ plate != '' and plate not in ['S15MFY', 'WG15LLX'] }}
        sequence:
          - data:
              title: Vehicle [Opt 2]
              message: Vehicle {{ plate }} on camera.
            action: notify.mobile_app_Scottsphone
mode: single
#

Help with BlueIris MQTT or Webhook for PlateRecognizer

cyan stirrupBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

junior imp
#

Ive also looked at a webhook which does trigger in HA, but cant get the validation on the plate json and it always defaults to the option where no plate is recognised

junior imp
#

Anyone?