Skip to content

daweizhangau/esphome_uni_trend_sound_meter

Repository files navigation

ESPHome Component: Uni-T (Uni Trend) Mini Sound Level Meter

This is a bridge for a Uni-T Mini Sound Level Meter UT353BT and an ESP32 device.

After this integration, the sound meter can work with Home Assitant. Every time the meter is powered on and its Bluetooth is enabled, ESP32 device can connect to it automatically and start to collect the measurement dBA. Home Assistant Sound Meter

Dependencies

Installation

You can install this component with ESPHome external components feature like this:

external_components:
  - source: github://daweizhangau/esphome_uni_trend_sound_meter@main

Configuration

You need the following components. For full configuration example, please reference to esphome_config_sample.yaml.

Find MAC Address

esp32_ble_tracker component should be able to detect it when you turn on Bluetooth on your sound meter, and print it in the log.

  1. Add esp32_ble_tracker to your ESPHome device config
    esp32_ble_tracker:
  2. Install to ESP32 device
  3. Open log of your ESP32 device
  4. Turn on Bluetooth of your sound meter
  5. Look for
    [...][D][esp32_ble_tracker:726]: Found device 00:00:00:00:00:00 RSSI=-29
    [...][D][esp32_ble_tracker:747]:   Address Type: PUBLIC
    [...][D][esp32_ble_tracker:749]:   Name: 'UT353BT'
    

00:00:00:00:00:00 above is MAC address of your sound meter.

BLE Client

Then configure ESPHome BLE Client (check the documentation for more information):

ble_client:
  - mac_address: "00:00:00:00:00:00" # Replace with your sound meter bluetooth mac address
    id: sound_meter_ble_client

Sound Meter

Then you need to enable this component with the id of the ble_client component.

uni_trend_sound_meter:
    # [Required] Name or ID is required.
    name: "Sound Level"
    # [Optional] Enhance entity with icon and unit.
    icon: 'mdi:microphone'
    # [Optional] Defaut value is dBA
    unit_of_measurement: 'dBA'
    # [Required] Reference to the ble_client.id set above
    ble_client_id: sound_meter_ble_client
    # [Optional] Reference to
    update_interval: 1s

References