OpenSprinkler Forums OpenSprinkler Unified Firmware Announcing OpenSprinkler Unified Firmware 2.1.9(4) Reply To: Announcing OpenSprinkler Unified Firmware 2.1.9(4)



Well, by ‘slow-varying’ sensors I mean those whose statuses don’t change more than once per few hours. Flow sensor certainly does not fall into this classification.

If you are looking to publish to MQTT every time flow sensor clicks, and you are sure your flow sensor clicks slowly, it may be feasible. You probably want to insert code into the flow_poll function instead of binarysensor_status function, because as I said binarysensor_status is meant for rain and soil sensors, and they are affected by the sensor on/off delays which you don’t want to apply to flow sensor. Another consideration is that while publishing to MQTT is ok, don’t log flow events to the controller’s log file because that will generate too much log data. If you have OSPi this is probably ok, but microcontroller-based OpenSprinkler does not have much flash memory space, logging raw flow events will quickly fill up the space.

‘flcrt’ is always available, regardless of whether a zone is running or not. So checking flcrt is a good way to detect, for example, water leaks or water usage at any time. If you want to log the total click count, that’s also fine — flcrt is just the rate of change of total click count. But keep in mind that the total click count is volatile — once the controller reboots it will reset to 0.