Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Documentation on Debugging, how to bypass Zone already Alerted and configure its timeout #61

Open
sn3ak opened this issue May 16, 2024 · 4 comments

Comments

@sn3ak
Copy link

sn3ak commented May 16, 2024

First, let me say thank you for creating this. While I am a HA user, I don't want frigate integrated to HA for reasons. This is something that was sorely missing from frigate and I'm really happy that you created and shared this.

 Please add documentation on how to debug this.
Is there a log file that can be accessed somewhere?

as a newb, I setup everything (config below), and when I got home expected to get notified that a person was detected. I got nothing. I used docker compose attach to see the log files, but the only thing I can see is:

2024/05/16 01:56:15 Event ID 1715824522.190759-8cy0nu - Camera LivingRoom detected person in zone(s): []
2024/05/16 01:56:15 Event ID 1715824522.190759-8cy0nu - Start time: 2024-05-16 01:55:22 +0000 UTC
2024/05/16 01:56:15 Event ID 1715824522.190759-8cy0nu - Zone already alerted, skipping...

Figuring I set things up wrong, I changed the config file. Noticed there was a new release, pulled and started the container
Once again, I get a screen filled with Zone already alerted, skipping....

I don't see any configuration to change the duration of an alerted zone. How long does it take to reset? How can I change it to be shorter? How can I reset the zone so I can hopefully see what's wrong and why the alerts didn't go out?

frigate:
  server: nope:5000
  ignoressl: true

  webapi:
    enabled: false
    interval: 30

  mqtt:
    enabled: true
    server: nope
    username: nope
    password: nope

  alerts:
    general:
      timeformat: Mon, 02 Jan 2006 15:04:05 PST
    labels:
      allow:
        - person
    zones:
      unzoned: allow

    pushover:
      enabled: true
      token: nope
      userkey: nope

    smtp:
      enabled: true
      server: mail.nope.net
      port: 587
      tls: true
      user: nope@nope.net
      password: nope
      recipient: me@nope.net
@sn3ak
Copy link
Author

sn3ak commented May 16, 2024

alright, I've figured out my own way to try and troubleshoot this by using docker compose run -lt and then stopping and starting the frigate container. that forces it to generate a new event.

I still can't make alerts work though. I stripped out a lot of the config and still no joy.

frigate:
  server: http://nope:5000
  ignoressl: true
  mqtt:
    enabled: true
    server: nope
    username: nope
    password: nope
  alerts:
    pushover:
      enabled: true
      token: nope
      userkey: nope

I've ran the test with the same yaml in this comment, but removed all of pushover: and put in the smtp: block from above.

@sn3ak
Copy link
Author

sn3ak commented May 16, 2024

and I just figured out what the problem was. I didn't notice that alerts were not supposed to be indented.
Could some kind of config file validator be added?

@freefd
Copy link
Contributor

freefd commented May 16, 2024

The message Zone already alerted, skipping.... means the event has already been caught in this zone and currently only the same (or very similar) messages with "type": "update" continue to be received by your frigate-notify instance.

You can find more information about the MQTT model structure here: https://docs.frigate.video/integrations/mqtt/#frigateevents

Side question: could it be that you have a lot of events in that area, but the objects that appear on those events - are they different?

@0x2142
Copy link
Owner

0x2142 commented May 16, 2024

Hi there & Thanks for using this app!

In the docs, there is a section that explains the zone behavior here, under the "A note about how this works" section. Short story, with MQTT Frigate may send a lot of "update" events whenever something changes - which could create a large number of notifications. Therefore, I only have notifications generated on whenever a new zone was entered. This is tied to that specific Frigate event - so as soon as that event ends & another begins, this is reset.

If it would be helpful, I could add an option to disable this & alert on every single update notification from Frigate. Let me know if that's something you would be interested in.

On the config file piece, there are some example config files here & here that have the correct indentation. These can be copied & edited to fit your situation. However, I can also certainly improve how the config file is validated - so I'll see what I can do there as well!

Thanks again for using this & I appreciate the feedback!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants