I have a boolean input feed that represents a pump on/off. It is possible to some way calculate the kwh usage based on that boolean value, assuming a constant pump wattage.
It is possible to to see the daily on/off total times.
Sorry to ask but i have not found the answer.
You can multiply the fixed pump wattage by the boolean and log that to a feed “pump_power” (Watts), then use a usual power to kwh feed for “pump_energy” (kWh).
If your boolean input only updates on a change of state then you can add the above processing on the endo of a more frequently updated input’s processlist.
EDIT - regards running time are you wanting total time run per day? You could try just logging the boolean x 1000 to a power to kWh feed, the value it should then be tracking will effectively be hours.
On my existing system I used Input on-time process.
Checking it I just realized it seems it is not available for adding anymore on hosted emoncms, not sure
The hosted emoncms (emoncms.org) only has a fairly limited subset of the available processors. It’s done to try and maintain an efficient server workload/speed and they are aiming for less complexity with a shorter list of processors.
Although the input-on-time process is still found in the full version of emoncms, that processor uses the same type of code as the “dailies” such as power to kWh/d and kWh to kWh/d etc, There has been a consistent trend towards reducing the use of “daily” type processes and feeds in favor of using the delta of a accumulating total.
The “delta” method works better with timezones and once we have a “total-so-far-this-current-period” feed api and/or a similar feedvalue widget the “daily” methods days will be numbered and probably removed from the processlist creation menus so as to provide backwards compatibility without being available to users moving forward.
These are just 2 of many good examples of why a move to more generic processors would be a good idea, those generic processors could always be wrapped in more specific purpose processors, this will be easier to maintain (single set of core processors) and easier to implement specific processors by reusing the core processing.