I’m working on a Node-RED flow to generate the send a push notification with the previous day’s kWh usage and the current day’s weather information. This is mostly working but there’s a data issue on power usage. While I have both a kWh accumulator and a kWh/day feed setup, the daily feed and standard node-red-emoncms
node doesn’t quite fit my needs as I’m triggering the flow at mid-morning (local time, UTC-0700) at which point the current value is already a partial read for the current day (instead of the total value for the last day).
I could write a custom function in Node-Red, but then I have to deal with credential storage which is a bit more work than I was hoping to do. An alternative solution would be to extend the node-red-emoncms
node to take msg.timestamp
, though the emonCMS APIs don’t appear to have a super-straightforward way of getting an arbitrary historical entry from a feed (ranges look to be required).
Both approaches are doable, but I’d appreciate any insight from folks that may have tackled this before. Surely someone else is getting a discrete (non-graph based) report of kWh used per day for these sort of updates!