question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Support]: Question about MQTT messages and best practices

See original GitHub issue

Describe the problem you are having

I’m pretty new to Frigate so I am trying to understand the behavior of zones, object filtering and how that information comes through in MQTT.

I am running Frigate in a docker container and although I did end up adding the custom component to HA core, I plan on building my automations in AppDaemon using MQTT directly.

I am doing the typical “notification of car entering driveway” type scenario. I don’t particularly care to record or take action on vehicles that are passing by on the street but obviously need to start the process of object detection in that area or at least the entrance of the driveway.

What is the recommended way to allow the zone data to be passed through MQTT but ignore recording? It seems like if I use the record/snapshot options with required_zones, I still see MQTT data but the “entered_zones” and “required_zones” data is not passed through.

If I am understanding correctly, I should be able to check for an MQTT event where current_zone=[“driveway”] and entered_zones=[“driveway_entry”, “driveway”] but again, don’t want to record a vehicle in the driveway or street.

Is there any documentation that explains some of the expected behaviors of MQTT or perhaps some examples of data to look at for various scenarios?

Any suggestions would be helpful, thank you!

Version

0.10.0-BFECEE9

Frigate config file

front_south:
  ffmpeg:
    inputs:
      - path: REDACTED
        roles:
          - detect
          - rtmp
      - path: REDACTED
        roles:
          - record
  detect:
    width: 640
    height: 480
  
  best_image_timeout: 5

  motion:
    mask:
      - 467,206,521,328,640,384,640,0,401,0 # FRONT YARD TREE
      - 133,0,138,92,36,118,0,0 # SOUTH NEIGHBOR TREE

  zones:
    entire_frame:
      coordinates: 640,0,640,480,0,480,0,0
      objects:
        - person
        - dog
    driveway_entry:
      coordinates: 473,382,510,313,276,153,192,167
      objects:
        - car
    front_yard:
      coordinates: 539,319,640,401,640,480,0,480,0,225,204,125
      objects:
        - person
        - dog

  record:
    events:
      required_zones:
        - entire_frame
        - driveway_entry
        - front_yard

  snapshots:
    required_zones:
        - entire_frame
        - driveway_entry
        - front_yard

Relevant log output

NA

FFprobe output from your camera

NA

Frigate stats

No response

Operating system

Other Linux

Install method

Docker Compose

Coral version

USB

Network connection

Wired

Camera make and model

Amcrest

Any other information that may be helpful

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Justiharcommented, Mar 1, 2022

Ok, fair enough, I’ll work with that. Thank you @NickM-27 and @blakeblackshear for the help.

1reaction
blakeblackshearcommented, Mar 1, 2022

Frigate doesn’t have a concept of an “ignored zone” and configuration of required_zones for recordings and snapshots have no effect on the mqtt events topic.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MQTT design best practices - AWS Documentation
Based on this MQTT topic, you can design a system that captures any data related to the entire application using the identifier, hv100...
Read more >
MQTT Topics, Wildcards, & Best Practices - HiveMQ
A ten-part blog series on the core features and concepts of the MQTT protocol. In this post, we focus on MQTT topics and...
Read more >
MQTT Topic Tree Design best practices, tips & examples
Consider building in topics which will aid discoverability of services and capabilities of your devices, e.g. by using retained messages.
Read more >
MQTT Q&A: MQTT Security and Best Practices with HiveMQ
In today's video we discuss the question of MQTT security. Is MQTT secure? In short: yes, it is. What makes MQTT so secure?...
Read more >
Understanding MQTT Topics - Steve's internet Guide
Case sensitive; use UTF-8 strings. Must consist of at least one character to be valid. Except for the $SYS topic there is no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found