Skip to content

Expose an ambient noise level (one dB number, no audio) to Home Assistant and plugins #910

Closed

Description

@YipYipYAML

Describe the feature

A single number for how loud the room is, in dB, available as:

  1. An ESPHome sensor on the kiosk's device, for example Ambient noise level, dBFS, state_class: measurement, diagnostic, off by default.
  2. The plugin host API, as a host.read command such as getNoiseLevel, and a slow host.subscribe event such as audio.noise.

Privacy: a level, not the microphone

I don't want plugins or Home Assistant to get any audio, and I'd suggest:

  • One loudness figure only. No audio, no spectrum, no speech detection.
  • Coarse and slow. Rounded to whole dB, averaged over about 5 seconds, updated no more than every 5 seconds or on a change of about 2 dB.
  • Not during voice turns. Hold the last value while Voice Satellite is listening or answering, so speech can't be inferred from it.
  • Not its own sound. Hold the value, or flag it, while the kiosk plays sound itself (answers, chimes, media), so it doesn't measure itself.
  • No extra recording. Use the level the app already computes for the wake-word tester and noise gate. Report nothing when wake word detection is off, rather than opening the microphone.
  • Off by default, with a switch under Microphone settings, and a plugin capability so users can see which plugins read it.

Suggested shapes (adjust as you see fit)

  • getNoiseLevel → { available, dbfs, floorDbfs, held, updated }
    • held is true while a voice turn or the kiosk's own playback is freezing the value.
  • Event ks.audio.noise → { dbfs, held }

Use case

To change volume with the room. Quieter answers and chimes when the house is silent at night, louder when the TV is on.

Plugins can already call setVolume and know when voice is active through voice.state and wakeword.detected. The missing piece is how loud the room is.

esphome-adaptive-volume does this on ESP32 voice boards, scaling speech volume between a quiet threshold (-55 dBFS) and a loud one (-38 dBFS). The same idea would work on kiosks. #858 did the same kind of thing for ambient light.

Devices this matters on

Echo Show 8 (1st gen) on LineageOS 18.1, using vsWakeWord. Two of them in the same home.

For reference, the remote admin's mic meter reads about 0.002 RMS (about -54 dBFS) in a quiet bedroom. That sits right at the adaptive-volume project's "quiet" point, so its defaults look about right for these devices.

Activity

  1. jxlarrea commented on Oct 8, 2026

    @jxlarrea
    Owner

    This is a great idea, I'll add it to the next release.

  2. jxlarrea commented on Oct 8, 2026

    @jxlarrea
    Owner

    Home Assistant: every kiosk's ESPHome device now has an Ambient noise sensor in dBFS (state_class: measurement). It's on by default rather than disabled. If you don't want it, add it to Settings > ESPHome > Excluded entities and it stays out of Home Assistant. A real change reaches Home Assistant right away. A level that keeps moving, like a TV playing all evening, is held to one update every 30 seconds so it can't flood the recorder.

    Plugins: a new noise capability, declared alongside host.read, unlocks:

    • getNoiseLevel → { available, dbfs, held, updated }
    • audio.noise event → { available, dbfs, held }

    A plugin without noise in its manifest can't read it.

    How it follows your privacy points:

    • One loudness figure only. No audio, spectrum or speech detection is exposed.
    • Coarse and slow. It's the average over 5 seconds, rounded to a whole dB. The sensor and the event only update when it moves by 2 dB or more.
    • No extra recording. It's read from the capture the wake word engine already has open, so it never opens the microphone. With wake word detection off or the satellite muted, available is false and the sensor reads unknown.
    • Not during voice turns. The value holds through voice turns, announcements, timers, alarms, media playback and intercom calls.
    • Not its own sound. Any 5 seconds in which the kiosk played its own sound are thrown away, echo included. held stays true until a clean reading replaces the value.

    I left out floorDbfs. Fixed thresholds like the adaptive-volume project's -55 and -38 dBFS don't need it.

    The reading moves with Microphone gain, so set the gain first, then watch the sensor for a day to find your room's quiet and loud levels before picking thresholds. Sound from dashboard web pages and the DLNA video player can't be told apart from the room, so it counts as noise.

  3. pawelkw commented on Oct 11, 2026

    @pawelkw

    On a Poco Pad M1 the Ambient noise sensor in HA always reports "Unknown". The "Microphone level" in "Microphone settings" readout in the Kiosk app itself is working however and shows correct values.

    App version
    [2026.10.20 (318)]
    Build
    release
    Package
    me.jxl.kiosk_satellite

    Please fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions