0x2142 / frigate-notify

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

ntfy notification does not work when there is an underscore in the topic #128

Closed aureliensoria closed 2 months ago

aureliensoria commented 2 months ago

Describe the bug When configuring frigate-notify to work with ntfy, when the topic contains an underscore, the notification never appears on ntfy side. Example: frigate_alert The frigate-notify logs indicates that the notification has been sent.

When configuring frigate-notify to use webhooks instead and to target https://YOUR_NTFY_SERVER/frigate_alert, the notification appears on ntfy side.

Expected behavior A notification appears on ntfy.

Versions:

Frigate-Notify Config:

  ntfy:
    enabled: true
    server: https://YOUR_NTFY_SERVER.COM
    topic: frigate_alert
    ignoressl: false
    headers:
    template:

Frigate-Notify Logs:

2024/08/26 12:32:53 +0200 DBG events/api.go:39 > Checking for new events...
2024/08/26 12:32:53 +0200 DBG events/api.go:53 > Found 0 new events
2024/08/26 12:32:58 +0200 DBG events/api.go:39 > Checking for new events...
2024/08/26 12:32:58 +0200 DBG events/api.go:53 > Found 1 new events
2024/08/26 12:32:58 +0200 INF events/api.go:78 > Event Detected camera=MYCAMERA event_id=1724668373.677634-qmo30j label=person zones=
2024/08/26 12:32:58 +0200 DBG events/api.go:81 > Event start time: 2024-08-26 12:32:48 +0200 CEST event_id=1724668373.677634-qmo30j
2024/08/26 12:32:58 +0200 INF notifier/nfty.go:92 > Alert sent event_id=1724668373.677634-qmo30j provider=Ntfy
2024/08/26 12:33:03 +0200 DBG events/api.go:39 > Checking for new events...
2024/08/26 12:33:03 +0200 DBG events/api.go:53 > Found 0 new events
0x2142 commented 2 months ago

Thanks for reporting this. Unfortunately, so far I haven't been able to replicate it. I tried both with the public version & self-hosted Ntfy - and both worked with the config you shared.

Are you using the public or self-hosted version? Any change if you wrap the topic in quotes? Like "frigate_alert"

aureliensoria commented 2 months ago

I'm unable to reproduce anymore neither. If I'm able to reproduce the issue again, I will open a new ticket. Sorry for the trouble, and thank you for this nice software !