frigate-hass-integration icon indicating copy to clipboard operation
frigate-hass-integration copied to clipboard

Add sensors for audio level

Open tpjanssen opened this issue 1 year ago • 8 comments

Is your feature request related to a problem? Please describe. Create a sensor for audio sensors dBFS and rms.

Describe the solution you'd like Readings are present in the posted MQTT data, so values exist outside Frigate.

Describe alternatives you've considered Reading the MQTT topic manually.

Additional context image

tpjanssen avatar Oct 05 '23 11:10 tpjanssen

I was just about to request the same thing.. I have had very limited success troubleshooting audio detection DIRECTLY in MQTT.. Being able to leverage the data as sensors in HA would make it so much easier.

bagobones avatar Oct 29 '23 05:10 bagobones

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[bot] avatar Nov 29 '23 04:11 github-actions[bot]

This would be a simple yet pretty useful feature, the issue should be reopened IMHO.

chatziko avatar Jan 31 '24 15:01 chatziko

+1

starsoccer avatar Jan 31 '24 19:01 starsoccer

I gave up on tuning my audio detection so I hop this gets added to the debug UI in frigate or as a sensor in the HA plugin.

bagobones avatar Jan 31 '24 19:01 bagobones

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[bot] avatar Mar 02 '24 04:03 github-actions[bot]

I have been wanting something like this for awhile.

You can add a mqtt sensors like the following to enable this now:

mqtt:
  sensor:
    - name: "camera_rms"
      state_topic: "frigate/camera_name/audio/rms"
    - name: "camera_dbfs"
      state_topic: "frigate/camera_name/audio/dBFS"

terranjp avatar Mar 04 '24 13:03 terranjp

I have been wanting something like this for awhile.

You can add a mqtt sensors like the following to enable this now:

mqtt:
  sensor:
    - name: "camera_rms"
      state_topic: "frigate/camera_name/audio/rms"
    - name: "camera_dbfs"
      state_topic: "frigate/camera_name/audio/dBFS"

I have been thinking about doing that for my doorbell and making a visual dashboard but it is a bit cumbersome to do manually for many cameras.

I am hoping that something gets officially added to debug view in the frigate UI that shows the current threshold value so it is obvious to tune against the live data without having to flip back and forth

bagobones avatar Mar 04 '24 19:03 bagobones

I see this was implemented in https://github.com/blakeblackshear/frigate-hass-integration/pull/644 but how do you add the sensor into home assistant?

stplatt avatar Mar 25 '24 19:03 stplatt

update the integration to 5.1.0 and it will be there automatically

NickM-27 avatar Mar 25 '24 19:03 NickM-27

I'm on 5.1.0 but I'm not seeing it? Screenshot 2024-03-25 155309

stplatt avatar Mar 25 '24 19:03 stplatt

you may need to reload the integration, it also shows your camera as unavailable so that might be part of the issue as well

NickM-27 avatar Mar 25 '24 19:03 NickM-27

Yeah I've tried to reload the integration. The camera always shows as unavailable, not sure why, but all of the other occupancy and audio sensors are working fine. (as you can tell from this screenshot)

What is the audio sensor named?

Screenshot 2024-03-25 160322

stplatt avatar Mar 25 '24 20:03 stplatt

Reboot HA if you haven't , reloading the integration didn't work for me, I think it has to be a reboot as new entities are added.

bagobones avatar Mar 26 '24 18:03 bagobones