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.
Dependencies
- This component requires an ESP32 device.
- ESPHome 2022.4.0 or higher.
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.
- Add
esp32_ble_tracker
to your ESPHome device configesp32_ble_tracker:
- Install to ESP32 device
- Open log of your ESP32 device
- Turn on Bluetooth of your sound meter
- 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