0x2142 / frigate-notify

Event notifications for a standalone Frigate NVR instance
https://frigate-notify.0x2142.com/
MIT License
109 stars 9 forks source link

Http GET Notifier #127

Closed pcaro closed 1 month ago

pcaro commented 3 months ago

In services like TextMeBot or CAllMeBot the notifications are simple GET calls. I would like a simple http GET notificator which: accept a list of templated pararms. Configuration example (for a Telegram call using CallMeBot):

webcall:
  enabled: true
  server: "http://api.callmebot.com/start.php
  params:
    text=Looks like {{ .Camera }} spotted a {{ .Label }}
    user: @telegram_user
     source:frigate-notify
     rpt:5
     cc:yes
     lang:"es-ES-Standard-A"
  headers:
    - Authorization: Basic {{ env "FN_AUTH_BASIC" }}

This would call:

GET "http://api.callmebot.com/start.php?user=@telegram_user&source=frigate-notify&rpt=5&cc=yes&text=Looks like camera1 spotted a person&lang=es-ES-Standard-A"

PD: We have webhook notifications, but in that case is a POST, server url is fixed (we have no query pararms), etc. Maybe you could also set a method and json_data_params and integrate this on webhook notifier.

0x2142 commented 3 months ago

Hi there, Thanks for the suggestion! I'm okay with adding this - but I think I would probably just modify the existing webhook notifier to accommodate the additional config items, like you mentioned.

I'll add this to my list for the next release👍

0x2142 commented 1 month ago

This has been added to the webhook notifier & released in v0.3.5, see docs.