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

[Support]: MQTT message docs. #8397

Closed
KpjComp opened this issue Oct 31, 2023 · 7 comments
Closed

[Support]: MQTT message docs. #8397

KpjComp opened this issue Oct 31, 2023 · 7 comments
Labels
question Further information is requested stale

Comments

@KpjComp
Copy link

KpjComp commented Oct 31, 2023

Describe the problem you are having

Firstly, fantastic project.

Running on an old laptop, and not even using a coral, just hwaccel_args: preset-vaapi, (intel cpu) , works a treat on a 3 camera, person only detector. CPU usage fine, idle about 3%, ramps up during detection or course but that's fine, and that's before I've even tried to optimise with zones & min/max boxes etc. Night time detection on b/w mode maybe not as good as day time, but still amazing really, I have not tried any contrast changes so that might even improve yet. Did try to use the laptops GPU GTX790, but Nividia driver support on Linux is just a big joke, so gave up, if I need more power, I would rather invest in a USB coral. Birdseye is a really nice feature too... :)

I'm using the MQTT via node-red and that's working a treat, got it then sending a notification to phones with image preview etc.

Now one issue I did have is that sometimes I'll get a notification on my phone, even with image preview. But when I then go to events there is nothing there.

What I'm currently doing in node-red is listening for the "type": "new", and this is the trigger for the notification. Should I be listening for "type":"update" , or is it the "false_positive": false, also needs checking?. Unfortunately I didn't have the MQTT logging at the time to catch and prove this is the case. :(

ps: I did read -> https://docs.frigate.video/guides/ha_notifications, but I'm not seeing any form of filtering, wouldn't this at least end up doing 3 notifications for one object detect -> new / update / end ???

Version

0.12.1-367D724

Frigate config file

n/a

Relevant log output

n/a

FFprobe output from your camera

m/a

Frigate stats

No response

Operating system

HassOS

Install method

HassOS Addon

Coral version

USB

Network connection

Wired

Camera make and model

hikvision

Any other information that may be helpful

No response

@NickM-27 NickM-27 added question Further information is requested and removed support triage labels Oct 31, 2023
@NickM-27
Copy link
Sponsor Collaborator

You can't use new for viewing a clip because the clip is not ready yet, it takes time for the segments to be moved over from cache to the storage. I generally send a snapshot on new and then send the clip on end

@KpjComp
Copy link
Author

KpjComp commented Oct 31, 2023

@NickM-27 Yeah, sorry, should have made it more clear, it doesn't appear in the Events, after 10 mins, an Hour etc. It's like new is fired, even get the snapshot of somebody. But when you go to the Event section there is no corresponding video. My gut feeling was that new is fired on "false_positive": true, and we still can have the snapshot, but the events only get saved on "false_positive": false, So I was thinking should I be listening for false_positive: false, and not worry about type, and just use a debounce to prevent rapid notifications..

ps: This has only happened about 3 or 4 times that I've noticed. So if my assumption above is wrong, then I'm at a loss on how I get a notification for an Event that's never recorded.

ps, my Events config is just ->

record:
  enabled: True
  events:
    retain:
      default: 14
      mode: active_objects

@NickM-27
Copy link
Sponsor Collaborator

The MQTT message will not be sent until the object is confirmed to be a true positive, so this is not the case.

Frigate has logic to clean up duplicate events that occur at the same time (like 2 people walking to door at same time), this may be what's happening

@KpjComp
Copy link
Author

KpjComp commented Oct 31, 2023

Cheers @NickM-27 , I thought there was no events recorded at all during this time period, but I could be mistaken.

I'll keep an eye out and see if that's what's happening. I've enabled the logging of the MQTT events on node-red too and I can then double check how they line up with Events in Frigate. Hopefully it's just like you say, and I'm just seeing the notification snapshot on my mobile, and it's just not corresponding with what's in events snapshot making me feel like it's not recorded.

Thanks for your input, much appreciated.

@NickM-27
Copy link
Sponsor Collaborator

The thing is that even if a snapshot was saved there would be an event in the events list, so if you called the same URL for a snapshot later when the event was missing then odds are it would fail also

@KpjComp
Copy link
Author

KpjComp commented Oct 31, 2023

@NickM-27 Not sure, all I can tell you is what happened.. :( Basically I got a notification on my mobile, camera front, and a picture of a lady walking a dog, clear as anything. But for the life of me could not find the same video of this lady in the Events in Frigate. Because of testing purposes I had been deleting old events on a regular basis, so there wasn't many events to check, and it should have been at the top anyway as it was the latest event.

Basically most of the time 95% maybe, when I get a notification, I would look in the events page, and there it is. But even refreshing the page, flipping between menu items, she did not appear. Another idea, could it be a caching issue, maybe your correct and I'm getting into events page too quick for the save, but once I've done that the events list believes it's cache list is complete and the video then doesn't appear regardless of refresh. Just an idea and might be totally of base.. Regardless, I'll keep an eye out, and just make sure it's not me been confused...

Copy link

github-actions bot commented Dec 1, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 1, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested stale
Projects
None yet
Development

No branches or pull requests

2 participants