FlowMeasurement Cluster
Cluster ID: 0x0404 |
Endpoint: Typically on Endpoint 1+ (application endpoint)
FlowMeasurement measures the flow rate of liquids or gases. It is a read-only sensor Cluster — it has only 4 Attributes and no Commands. The device acts as a Server, passively reporting flow data, while the App (Client) simply reads or subscribes. Commonly found on water flow sensors, gas flow meters, and HVAC airflow detection devices.
All flow rate Attribute values are in units of 0.1 m³/h (cubic meters per hour). A device returning 150 means an actual flow rate of 15.0 m³/h;
returning 23 means 2.3 m³/h.
You must divide by 10 before displaying, otherwise users will see an absurd value of "150 cubic meters per hour".
MeasuredValue, MinMeasuredValue, and MaxMeasuredValue are all Nullable.
A null return means the data is currently invalid or the sensor has not yet completed a measurement. The App should display "--" rather than 0.
Attribute Overview
FlowMeasurement has only four Attributes, of which MeasuredValue is the most commonly used. Click an Attribute ID to jump to its detailed description.
| ID | Name | Type | Access | Description |
|---|---|---|---|---|
0x00 |
MeasuredValue | uint16 | Read-only | Current flow rate (unit: 0.1 m³/h), Nullable |
0x01 |
MinMeasuredValue | uint16 | Read-only | Minimum measurable flow rate, Nullable |
0x02 |
MaxMeasuredValue | uint16 | Read-only | Maximum measurable flow rate, Nullable |
0x03 |
Tolerance | uint16 | Read-only | Measurement tolerance (unit: 0.1 m³/h) |
Attributes
MeasuredValue (Current Measured Flow Rate)
The most recently measured flow rate from the sensor, in units of 0.1 m³/h. This is the most important Attribute of the entire Cluster.
- Type: uint16 (unsigned)
- Range: 0 to 65534
- Nullable:
nullindicates the sensor data is invalid or the first measurement has not yet completed - Conversion:
Actual flow rate = MeasuredValue / 10(unit: m³/h)
0 = 0.0 m³/h |
50 = 5.0 m³/h |
150 = 15.0 m³/h |
1000 = 100.0 m³/h |
5000 = 500.0 m³/h
MinMeasuredValue (Minimum Measurable Flow Rate)
The lowest flow rate the sensor can measure, in units of 0.1 m³/h. The App can use this to set the lower bound of the flow rate display range, or to determine whether the current reading has reached the minimum.
- Type: uint16, Nullable
- Range: 0 to MaxMeasuredValue - 1
- Nullable:
nullindicates the device has not defined a lower limit
MaxMeasuredValue (Maximum Measurable Flow Rate)
The highest flow rate the sensor can measure, in units of 0.1 m³/h. When MeasuredValue approaches this upper limit, it may indicate the flow has exceeded the sensor's normal operating range.
- Type: uint16, Nullable
- Range: MinMeasuredValue + 1 to 65534
- Nullable:
nullindicates the device has not defined an upper limit
Tolerance (Measurement Tolerance)
The measurement tolerance of the sensor, in units of 0.1 m³/h. For example, a value of 10 means a measurement accuracy of ±1.0 m³/h.
This Attribute is optional and not all devices report it.
- Type: uint16 (unsigned, tolerance cannot be negative)
- Range: 0 to 2048 (i.e., 0 to ±204.8 m³/h)
If the sensor reports MeasuredValue = 150 (15.0 m³/h) and Tolerance = 10 (±1.0 m³/h),
the actual flow rate is between 14.0 m³/h and 16.0 m³/h. When setting up flow rate threshold automations, you should factor in the tolerance to avoid frequent alarm triggering near the threshold.
Commands
FlowMeasurement is a read-only Server Cluster with no Commands. The device is responsible for collecting flow data and updating Attributes; the App only needs to Read or Subscribe to obtain data.
Example Data
Reading the FlowMeasurement Cluster Attributes from a water flow sensor:
{
// --- FlowMeasurement Cluster (Endpoint 1) ---
"0x0": 150, // MeasuredValue = 150 → actual 15.0 m³/h
"0x1": 0, // MinMeasuredValue = 0 → actual 0.0 m³/h
"0x2": 5000, // MaxMeasuredValue = 5000 → actual 500.0 m³/h
"0x3": 10 // Tolerance = 10 → actual ±1.0 m³/h
}
Read request example — retrieve all Cluster Attributes at once:
{
// Read all Attributes of the flow sensor
"readRequests": [{
"attributePath": {
"endpointId": 1,
"clusterId": "0x0404"
// No attributeId specified → read all Attributes of this Cluster
}
}]
}
Subscribe to flow rate changes — track flow updates in real time:
{
// Subscribe to flow rate changes (report every 10 seconds to 2 minutes)
"subscribeRequests": [{
"attributePath": {
"endpointId": 1,
"clusterId": "0x0404",
"attributeId": "0x00" // MeasuredValue
},
"minIntervalFloor": 10, // Report at least every 10 seconds
"maxIntervalCeiling": 120 // Report at most every 2 minutes
}]
}
Key logic for processing device return values:
{`// Device returns MeasuredValue = 150
val rawValue: Int? = 150 // Nullable, may be null
val flowRate = rawValue?.let { it / 10.0 } // → 15.0 m³/h
val flowLiterPerMin = flowRate?.let { it * 1000.0 / 60.0 } // → 250.0 L/min
// Handle null when displaying
val display = flowRate?.let { String.format("%.1f m³/h", it) } ?: "--"`}
Common Scenarios
Scenario 1: Home Water Flow Monitoring
- Subscribe to
MeasuredValue (0x00)with a reasonable reporting interval (e.g., 10 seconds to 2 minutes) - Divide the received value by 10 to get the actual flow rate:
150 → 15.0 m³/h - Handle
nullvalues — display "--" or "Sensor offline", do not show 0 - Set abnormal flow thresholds — e.g., if continuous flow greater than 0 is detected during the early morning hours, a leak may be present; trigger an alarm notification
- Optional: Cumulative flow statistics — periodically read
MeasuredValueand estimate water consumption by time-based integration
Scenario 2: HVAC Airflow Detection
- Subscribe to
MeasuredValue (0x00)to continuously monitor gas flow changes in the duct - Read
MinMeasuredValue/MaxMeasuredValueto confirm the sensor range and determine whether the current airflow is within the normal operating range - Factor in
Tolerance— if the tolerance is ±1.0 m³/h, leave sufficient margin when setting thresholds to avoid frequent triggering at boundary values - Combine with FanControl Cluster (0x0202) for closed-loop control: the flow sensor reports the actual airflow, the fan controller adjusts speed to maintain the target airflow