Flow rate reported value in Zigbee_Pressure_Flow_Sensor.ino #11493
-
Hi all, I have been setting up an project to read a flow sensor for water usage tracking. And I am quite happy how easy this library works for users who rarely programming in C! I am using an XIAO ESP32C6 an the following example: libraries/Zigbee/examples/Zigbee_Pressure_Flow_Sensor/Zigbee_Pressure_Flow_Sensor.ino In this example it is always stated that the reported value is in 0,1m3/h which is unclear for me, why this conversion is made. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Beta Was this translation helpful? Give feedback.
-
Hi @jacksonwill0, Also the value must be in m3/h. You can later in HA select other unit of measurement. That conversion is done in HA directly. ![]() |
Beta Was this translation helpful? Give feedback.
-
so this means, that using smaller sensors which are sensing less flow are not compatible. Thanks for the response! |
Beta Was this translation helpful? Give feedback.
-
@jacksonwill0 In that case I will suggest you to use the Analog cluster adding an analog Input :) You can set the application type to to some FLOW type, which uses Liters per Second /** @brief Values for 'Flow in Liters per Second' type of Analog Input cluster */
typedef enum {
ESP_ZB_ZCL_AI_FLOW_CHILLED_WATER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_FLOW, 0x0000), /*!< Chilled water */
ESP_ZB_ZCL_AI_FLOW_CHILLER_CHILLED_WATER, /*!< Chiller chilled water */
ESP_ZB_ZCL_AI_FLOW_CHILLER_CONDENSER_WATER, /*!< Chiller condenser water */
ESP_ZB_ZCL_AI_FLOW_COLD_DECK, /*!< Cold deck */
ESP_ZB_ZCL_AI_FLOW_DECOUPLE_LOOP, /*!< Decouple loop */
ESP_ZB_ZCL_AI_FLOW_DISCHARGE, /*!< Discharge */
ESP_ZB_ZCL_AI_FLOW_EXHAUST_FAN, /*!< Exhaust fan */
ESP_ZB_ZCL_AI_FLOW_EXHAUST, /*!< Exhaust */
ESP_ZB_ZCL_AI_FLOW_FAN, /*!< Fan */
ESP_ZB_ZCL_AI_FLOW_HOT_DECK, /*!< Flow hot deck */
ESP_ZB_ZCL_AI_FLOW_HOT_WATER, /*!< Hot water */
ESP_ZB_ZCL_AI_FLOW_MIN_OUTDOOR_AIR_FAN, /*!< Min outdoor air fan */
ESP_ZB_ZCL_AI_FLOW_MIN_OUTDOOR_AIR, /*!< Min outdoor Air */
ESP_ZB_ZCL_AI_FLOW_OUTDOOR_AIR, /*!< Outdoor air */
ESP_ZB_ZCL_AI_FLOW_PRIMARY_CHILLED_WATER, /*!< Primary chilled water */
ESP_ZB_ZCL_AI_FLOW_RELIEF_FAN, /*!< Relief fan */
ESP_ZB_ZCL_AI_FLOW_RELIEF, /*!< Relief */
ESP_ZB_ZCL_AI_FLOW_RETURN_FAN, /*!< Return fan */
ESP_ZB_ZCL_AI_FLOW_RETURN, /*!< Return */
ESP_ZB_ZCL_AI_FLOW_SECONDARY_CHILLED_WATER_FLOW, /*!< Secondary chilled water flow */
ESP_ZB_ZCL_AI_FLOW_SUPPLY_FAN, /*!< Supply fan */
ESP_ZB_ZCL_AI_FLOW_TOWER_FAN, /*!< Tower fan */
/* 0x0200 to 0xfffe are Vendor defined */
ESP_ZB_ZCL_AI_FLOW_OTHER = ESP_ZB_ZCL_AI_SET_APP_TYPE_WITH_ID(ESP_ZB_ZCL_AI_APP_TYPE_FLOW, 0xffff), /*!< Other */
} esp_zb_zcl_ai_flow_in_liters_per_second_t; So it can look like this: // Set up analog input
zbAnalogDevice.addAnalogInput();
zbAnalogDevice.setAnalogInputApplication(ESP_ZB_ZCL_AI_FLOW_PRIMARY_CHILLED_WATER);
zbAnalogDevice.setAnalogInputDescription("Water flow (L/s)");
zbAnalogDevice.setAnalogInputResolution(0.001); |
Beta Was this translation helpful? Give feedback.
@jacksonwill0 In that case I will suggest you to use the Analog cluster adding an analog Input :)
You can check the example in our repo.
You can set the application type to to some FLOW type, which uses Liters per Second