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

MQTT: Birdseye enabled/disabled and mode change support #8291

Merged

Conversation

sberryman
Copy link
Contributor

Added two new MQTT topics for adjusting the enabled/disabled state per camera as well as the mode.

This is in draft as there are a few things I'm not a big fan of. This is most likely due to my lack of python experience.

  1. BirdseyeModeEnum is a string and camera metrics are using multiprocessing ctypes to sync data between processes. I hacked in an integer based index for support. You probably have a better idea of how this should be done.
  2. When testing this out I noticed that disabling birdseye for a previously enabled camera that has had a last_active_frame wouldn't get cleared. So there is some logic to zero out the last active frame which works... But is this how it should be done? https://github.com/blakeblackshear/frigate/compare/dev...sberryman:frigate:sberryman/mqtt-birdseye-mode?expand=1#diff-032726a7034bcbf31b308cd4452c695b71839494197d463764e5389604af23efR590-R596
  3. Topics: Does this match the standard you are using right now? I tried to copy it but could have made a few mistakes.

This is a solution for issue #3244

@netlify
Copy link

netlify bot commented Oct 24, 2023

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 5c77e18
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/65385fc064c9fc0008014fbe

frigate/comms/mqtt.py Show resolved Hide resolved
docs/docs/integrations/mqtt.md Outdated Show resolved Hide resolved
frigate/output.py Outdated Show resolved Hide resolved
@sberryman sberryman marked this pull request as ready for review October 24, 2023 14:23
@NickM-27 NickM-27 linked an issue Oct 25, 2023 that may be closed by this pull request
@sberryman
Copy link
Contributor Author

@NickM-27 I know you just approved this so I want to give you a heads up. There were two lines that were commented out in dispatcher that shouldn't have been in there.

@blakeblackshear blakeblackshear merged commit 36c1e00 into blakeblackshear:dev Oct 26, 2023
10 checks passed
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

Successfully merging this pull request may close these issues.

Ability to toggle birdseye mode via MQTT
3 participants