@tom: we are working on updating the firmware API document to get it up-to-date with firmware 2.1.6. As a quick note, when flow sensor is enabled,
- The /jc (controller variables) page outputs variables flcrt and flwrt, referring to real-time flow count and window (https://github.com/OpenSprinkler/OpenSprinkler-Firmware/blob/master/server.cpp#L832). It basically means ‘flcrt’ number of clicks are detected during the past ‘flwrt’ seconds.
- The /jo (options) page outputs two variables fpr0 and fpr1. To use them: fpr = ((fpr1*256)+fpr0)/100.0 is the actual flow pulse rate (i.e. volume per click). This can be set through the app/UI. So if you multiply flow count with fpr, that gives you the actual volume.
- At the end of each program run, the total flow count during the program run will be recorded in the log file. The log record’s format is: [flow_count, “fl”, duration, end_time], meaning flow_count number of clicks are received during the past duration seconds, and the time stamp of this record is end_time.
The firmware uses interrupts to handle flow sensor reading, so it’s relatively efficient. I have a test flow sensor that’s 0.1 gal per click (I think this is the 0.1 gal resolution you are referring to). I did check a number of other types of flow sensors, and found various pulse ratings, such as 0.25, 0.5, 1.0 etc. That’s why the fpr variable described above has a precision of 0.01, to accommodate a variety of different flow sensors.