Skip to content

UFM-01 Flow Meter

The ufm01 component allows you to integrate the UFM-01 flow meter (datasheet, manufacturer page) into your ESPHome device. This component reads accumulated flow (volume), current flow rate, and water temperature from the UFM-01 device via UART. It also provides several diagnostic binary sensors to monitor the device's status.

The UFM-01 flow meter communicates using a specific UART protocol at 2400 baud with even parity and 1 stop bit.

UFM-01 ultrasonic flow meter
UFM-01 flow meter

The ufm01 component requires a UART bus to be configured. Ensure your UART bus is set up with baud_rate: 2400, parity: EVEN, and stop_bits: 1.

# Example UART configuration
uart:
- id: uart_bus
tx_pin: GPIOXX
rx_pin: GPIOXX
baud_rate: 2400
parity: EVEN
stop_bits: 1

To use the UFM-01 component, add the following to your configuration:

# Basic UFM-01 configuration
ufm01:
- id: ufm01_component
uart_id: uart_bus # The ID of your UART bus
  • id (Optional, ID): The ID to use for the UFM-01 component.
  • uart_id (Optional, ID): The ID of the UART bus to use.

The ufm01 sensor platform allows you to read accumulated flow, current flow rate, and water temperature from the UFM-01 device.

# Sensor configuration
sensor:
- platform: ufm01
ufm01_id: ufm01_component # The ID of your UFM-01 component
accumulated_flow:
name: "UFM01 Accumulated Flow"
flow:
name: "UFM01 Flow Rate"
temperature:
name: "UFM01 Water Temperature"
  • platform: ufm01

  • ufm01_id (Optional, ID): The ID of the ufm01 component this sensor belongs to.

  • accumulated_flow (Optional): The accumulated flow (volume) sensor.

  • flow (Optional): The current flow rate sensor.

  • temperature (Optional): The water temperature sensor.

When empty_tube is active, flow and temperature are published as unknown (NaN). accumulated_flow continues to update.

The UFM-01 component also exposes several diagnostic binary sensors to report the device's status.

# Binary sensor configuration
binary_sensor:
- platform: ufm01
ufm01_id: ufm01_component # The ID of your UFM-01 component
ufc_chip_error:
name: "UFM01 UFC Chip Error"
flow_direction_wrong:
name: "UFM01 Flow Direction Wrong"
empty_tube:
name: "UFM01 Empty Tube"
flow_rate_out_of_range:
name: "UFM01 Flow Rate Out of Range"
  • platform: ufm01

  • ufm01_id (Optional, ID): The ID of the ufm01 component this binary sensor belongs to.

  • ufc_chip_error (Optional): Reports if there is an error with the UFC chip (ultrasonic flow converter; datasheet ST2 bit 5).

  • flow_direction_wrong (Optional): Reports if the flow direction is incorrect.

  • empty_tube (Optional): Reports if the tube is empty.

  • flow_rate_out_of_range (Optional): Reports if the flow rate is out of the measurable range.

uart:
- id: uart_bus
tx_pin: GPIOXX
rx_pin: GPIOXX
baud_rate: 2400
parity: EVEN
stop_bits: 1
ufm01:
- id: ufm01_component
uart_id: uart_bus
sensor:
- platform: ufm01
ufm01_id: ufm01_component
accumulated_flow:
name: "UFM01 Accumulated Flow"
flow:
name: "UFM01 Flow Rate"
temperature:
name: "UFM01 Water Temperature"
binary_sensor:
- platform: ufm01
ufm01_id: ufm01_component
ufc_chip_error:
name: "UFM01 UFC Chip Error"
flow_direction_wrong:
name: "UFM01 Flow Direction Wrong"
empty_tube:
name: "UFM01 Empty Tube"
flow_rate_out_of_range:
name: "UFM01 Flow Rate Out of Range"