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

Adjust camera motion threshold and contour area with mqtt #3154

Merged
merged 1 commit into from
Jul 5, 2022
Merged

Adjust camera motion threshold and contour area with mqtt #3154

merged 1 commit into from
Jul 5, 2022

Conversation

hawkeye217
Copy link
Collaborator

I've been able to get much better detection performance on my cameras at night by setting up Home Assistant automations to dynamically adjust improve_contrast as well as motion threshold and contour_area. This effectively allows me to have a "day" and a "night" profile for my cameras that has worked flawlessly for me over the past couple of weeks.

This PR builds upon #3011 and follows the same conventions we worked through there. The only main difference is a try/except block for ensuring the mqtt payload is an integer.

On a related note, I am not sure it would be worthwhile to add these controls to the HA integration as it may make it more complex and possibly problematic for new users of HA and Frigate. Power users can easily add it to HA with an mqtt entity as I did.

@stale
Copy link

stale bot commented Jun 19, 2022

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.

@stale stale bot added the stale label Jun 19, 2022
@NickM-27
Copy link
Sponsor Collaborator

ping

@hawkeye217
Copy link
Collaborator Author

ping

Thanks!

I think the failing test from the end of April had something to do with frontend issues at the time. It wasn't code that I modified. I bet it would pass now if rerun.

@stale stale bot removed the stale label Jun 19, 2022
@NickM-27
Copy link
Sponsor Collaborator

I don't have the powers to rerun

That being said we're seeing a different check fail now so might as well wait anyway

@NickM-27
Copy link
Sponsor Collaborator

@hawkeye217 Okay if you sync with release-0.11.0 this should start passing

@blakeblackshear blakeblackshear merged commit 7845995 into blakeblackshear:release-0.11.0 Jul 5, 2022
@hawkeye217 hawkeye217 deleted the threshold_contour_mqtt branch July 5, 2022 14:16
@NickM-27
Copy link
Sponsor Collaborator

I tried to get this to work but no luck. Is there something that needs to be done to force the changes to be read into Frigate?

If I publish a new value using MQTT to

frigate/../motion_threshold/state
frigate/../motion_contour_area/state

I can verify the new value in MQTT using MQTT explorer however if I look at the config using Frigate web ui debug I see the start-up values, not the new published values. It also seems that changing the values has no effect on the image processing - is there a way to verify the changes are being applied?

Please read the docs. The /state topic is read only, you need to publish to /set

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.

None yet

3 participants