Frigate Notification with image sent to Signal Messenger

Slowly going insane here, wondering if anyone can help.

Currently i have setup Signal Messenger api with Homeassistant, that works fine…i am able to send send a notification to my signal group for a motion detection.

However, i am trying to include the picture/snapshot in the Signal Group with Frigate.
Frigate works fine, Signal works fine…just not sure why the image isnt getting sent to the Signal group.

Here’s what iv got currently


I was struggling with the same problem for a couple of days, I managed to get it working. Here is my config:
There are two lines where it says YOUR_CAM_NAME - change that to match your frigate camera name. Of course if your signal notifier is not called notify.signal you will need to change that to match your config.

alias: Frigate notification - Signal
description: ''
trigger:
  - platform: mqtt
    topic: frigate/events
condition:
  - condition: template
    value_template: '{{ trigger.payload_json["type"] == "end" }}'
  - condition: template
    value_template: '{{ trigger.payload_json["after"]["camera"] == "YOUR_CAM_NAME"  }}'
action:
  - service: notify.signal
    data:
      message: |
        {{ now().strftime('%H:%M %A %d %B %Y') }}

        {{ trigger.payload_json["after"]["label"] | title }} Detected on {{
        trigger.payload_json["after"]["camera"] | title }} camera
      data:
        attachments:
          - >-
            /media/frigate/clips/YOUR_CAM_NAME-{{
            trigger.payload_json["after"]["id"]}}.jpg
mode: single

This is per camera notification so you will have to do that individually for all your cams

1 Like

Hi,

I am trying to set this up, got signal to work, used your signal automation code but get:

Executed: February 15, 2022, 17:28:10

Error: Error rendering data template: UndefinedError: ‘dict object’ has no attribute ‘payload_json’

Possibly I am missing some config somewhere, if you have any tips let me know!
Thanks,

alias: 500 - Frigate notification - Signal
description: ''
trigger:
  - platform: mqtt
    topic: frigate/events
condition:
  - condition: template
    value_template: '{{ trigger.payload_json["type"] == "end" }}'
  - condition: template
    value_template: '{{ trigger.payload_json["after"]["camera"] == "voordeur"  }}'
action:
  - service: notify.signal
    data:
      message: |
        {{ now().strftime('%H:%M %A %d %B %Y') }}

        {{ trigger.payload_json["after"]["label"] | title }} Detected on {{
        trigger.payload_json["after"]["camera"] | title }} camera
      data:
        attachments:
          - >-
            /media/frigate/clips/voordeur-{{
            trigger.payload_json["after"]["id"]}}.jpg
mode: single

Anyone have a fairly easy way to do this? I’ve tried the above yaml and it errors out same as the person above me

Got this working.

Used this blueprint

And did the following:

  1. Make sure you have signal notify service setup and tested to make sure it sends notifications. I have a group chat with myself called “Frigate” in signal messenger, and the group ID of that chat (look up signal-cli on github for docs) is what I send my messages to. My config.yaml looks like this
notify:
  - name: signal
    platform: signal_messenger
    url: "http://ip:port" # the URL where the Signal Messenger REST API is listening (docker service for me)
    number: "+COUNTRYCODE PHONENUMBER" # the sender number
    recipients:
      - "group.XXXXX
  1. Edit configuration.yaml to and add (RESTART AFTER YOU DO THIS)
homeassistant:
  allowlist_external_urls:
    - "http://IP:PORT" # Replace with home assistant ip:port

When you are creating your automation blueprint, add that same http://IP:PORT under Base URL (Optional) field

  1. During blueprint setup
    a. When you are creating your automation blueprint, add that same http://IP:PORT under Base URL (Optional) field
    b. Under blueprint Custom Action (Auto Trigger) field add this
action: notify.signal # (or whatever you named signal service in config.yaml)
metadata: {}
data:
  title: "{{title}}"
  message: "{{message}}"
  data:
    verify_ssl: false
    urls:
      - >-
        {{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{attachment}}

Do this for each camera cheers!