Export/Pull Daily kWh

I was wondering if it’s possible at all to be able to directly pull/export a daily kWh value. To go with that, is there a way to pull total energy used on the current day only?

You can use the Power to kWh/d process on the input to add power values to a daily feed. That feed will be a running total of the power used each day, with one value be stored per day of the total power used. Getting the value for the previous day is an exercise left for the reader. :wink:

Hey David, thanks for the tip. I had to step away from this project for awhile. So some other follow up questions.

  1. I’m able to pull the daily value, but it’s only providing a value to the nearest integer, so I’m not getting any decimal values. So if I’m tracking the data in my bathroom, it’s returning a “0” every day but if I export via CVS, I get it to two decimal places. Any way to get the decimal value on the feed api?

  2. As for pulling historical data, I saw the API awhile ago

    https://emoncms.org/feed/data.json?id=0&start=UNIXTIME_MILLISECONDS&end=UNIXTIME_MILLISECONDS&mode=daily

I’ve tried many combinations of start and end UNIXTIME (using my CSV unixtime values) along with trying my live kWh feed and my kWh daily feed and both just return an empty list of “[ ]”.

I totally understand you’d rather teach than fish for me, and I agree with that philosophy so if you wouldn’t mind giving this student a pointer in the direct or any other help, I’d appreciate it.

EDIT: Ok, I finally dug deep into a post that was having the same problem. I found out that the unix time I was providing was in seconds, not milliseconds. For anyone that in the future searches and reads this, make sure your unix time is in milliseconds!

1 Like

Glad you got the millisecond/second issues worked out! Was that also enough to get you past the digits of precision issue you were mentioning? I’ve not seen that behavior before, outside of the display on the My Electric App, which rounds the daily kWh used to an integer value.