Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Recommended way to get hourly grid data?

This site may earn commission on affiliate links.
Trying to get my hourly grid consumption and generation. My goal is get more accurate calculations for my TOU Rate Plan comparison.
  • Downloading .csv from SCE gives me all the data but have not found a way to make it usable, so much data formulas to manipulate are quickly getting out of hand.
  • I tried tons of python, shell, github projects but cannot get anything working.
any suggestions on where to start? Is this data even available in the gateway API or the Tesla App?
 
Is there historical data available via API or is it only going forward?

Only historical. Getting future data would be quite a trick ;)

If you can use the Tesla app to see your 5 minute usage graphs grid, then you're all set if you use the API. The app can also export that data but only a day at a time. The API is also limited to a days worth of data at a time so you have to make one call per day back as far as you want. My script that pulls the data into my google sheets takes a date range and breaks it up into one call per day and then concats the days.
 
I have an Emporia Vue (https://www.amazon.com/Connects-Electric-Metering-Burlington-Mountain/dp/B084T6HGNR), and though I am on PG&E, it's advertized to work on SCE as well. What's neat about it is that it's cheap ($30), and speaks Zigbee to the actual meter, which means you get the exact same data your utility is getting, but without have to get big CT's on your main utility feed. It has a nice app that gives you 1 min, 1 hr, and 1 day stats, etc...

Since you seem to be comfortable with software (github, python references), I would suggest pairing it with Home Assistant, which is an open source home automation platform. It can run on big iron, but works well on a Raspberry Pi, and now has great integration with Vue and other energy monitoring devices, and can graph and give you lots of data about usage. If you have Solaredge or other solar inverters, you can tie that in and get a nice comparison of flows in and out. See here: Energy Management in Home Assistant

My Vue was pretty easy to pair, though required a call to PG&E. But once it was paired, works great, and speaks wifi so it can be plugged in near the meter.

Good luck!
 
  • Informative
Reactions: kairojya
I have an Emporia Vue (https://www.amazon.com/Connects-Electric-Metering-Burlington-Mountain/dp/B084T6HGNR), and though I am on PG&E, it's advertized to work on SCE as well. What's neat about it is that it's cheap ($30), and speaks Zigbee to the actual meter, which means you get the exact same data your utility is getting, but without have to get big CT's on your main utility feed. It has a nice app that gives you 1 min, 1 hr, and 1 day stats, etc...

Since you seem to be comfortable with software (github, python references), I would suggest pairing it with Home Assistant, which is an open source home automation platform. It can run on big iron, but works well on a Raspberry Pi, and now has great integration with Vue and other energy monitoring devices, and can graph and give you lots of data about usage. If you have Solaredge or other solar inverters, you can tie that in and get a nice comparison of flows in and out. See here: Energy Management in Home Assistant

My Vue was pretty easy to pair, though required a call to PG&E. But once it was paired, works great, and speaks wifi so it can be plugged in near the meter.

Good luck!

One SCE, you can actually get the Vue for free (or almost free)... SCE will give you a $25 rebate for adding a HAN device, which the Vue is one, and, on sale, you can sometimes get it for $25 (or lower)... The Vue is definitely a nice thing to add to the power arsenal...
 
I have an Emporia Vue (https://www.amazon.com/Connects-Electric-Metering-Burlington-Mountain/dp/B084T6HGNR), and though I am on PG&E, it's advertized to work on SCE as well. What's neat about it is that it's cheap ($30), and speaks Zigbee to the actual meter, which means you get the exact same data your utility is getting, but without have to get big CT's on your main utility feed. It has a nice app that gives you 1 min, 1 hr, and 1 day stats, etc...

Since you seem to be comfortable with software (github, python references), I would suggest pairing it with Home Assistant, which is an open source home automation platform. It can run on big iron, but works well on a Raspberry Pi, and now has great integration with Vue and other energy monitoring devices, and can graph and give you lots of data about usage. If you have Solaredge or other solar inverters, you can tie that in and get a nice comparison of flows in and out. See here: Energy Management in Home Assistant

My Vue was pretty easy to pair, though required a call to PG&E. But once it was paired, works great, and speaks wifi so it can be plugged in near the meter.

Good luck!

I didn't realize Emporia had released their API? Can you provide a link?
 
Only historical. Getting future data would be quite a trick ;)

If you can use the Tesla app to see your 5 minute usage graphs grid, then you're all set if you use the API. The app can also export that data but only a day at a time. The API is also limited to a days worth of data at a time so you have to make one call per day back as far as you want. My script that pulls the data into my google sheets takes a date range and breaks it up into one call per day and then concats the days.
Can you share your script for google sheets?
 
@mjptech
doubt you will get a SCE rebate for a han device. appears to be scaling down the program. Received a letter in dec2019, saying effective feb2020, no new HAN devices will be added to their system, limited supported for exisiting HAN users.
so you can just pay out of pocket for it, use it privately w/o registering with SCE.
 
@mjptech @mikesm With the Vue how close does the device need to be to the meter? Is there an easy way to export data in 1 hour increments to .csv format?

Mine is about 6 ft away from the meter, but inside the garage and the meter and panel are on the outside. If you have decent WiFi, I would find an outlet near the meter.

There are a number of ways of getting data out of the vue. My Emporia app under android has menu item called export raw data to CSV. But I haven't tried it - Home assistant does an excellent job of pulling the stats and writing to a long term database.
 
@mjptech
doubt you will get a SCE rebate for a han device. appears to be scaling down the program. Received a letter in dec2019, saying effective feb2020, no new HAN devices will be added to their system, limited supported for exisiting HAN users.
so you can just pay out of pocket for it, use it privately w/o registering with SCE.

Yeah, they've had that notice up there (retiring and whatnot), but, still allow for it (and provide the rebate) - I added mine earlier this year without a problem, even though the notice was still there..

It seems like they have haven't gotten around to stopping the program... I'm guessing COVID has changed some of the priorities...
 
Only historical. Getting future data would be quite a trick ;)

If you can use the Tesla app to see your 5 minute usage graphs grid, then you're all set if you use the API. The app can also export that data but only a day at a time. The API is also limited to a days worth of data at a time so you have to make one call per day back as far as you want. My script that pulls the data into my google sheets takes a date range and breaks it up into one call per day and then concats the days.
Please share your script that pulls data out of the Tesla system. I've been doing it by hand daily and it is very tedious.
 
Please share your script that pulls data out of the Tesla system. I've been doing it by hand daily and it is very tedious.
This topic has been discussed over here: Discussion: How to get status information from your Powerwalls

I think there’s a Google Sheets setup detailed in there.

There are also a few projects out there that the OP alluded to which gather data from Powerwalls on your local home network. Here are some links which I’ve used to create my own data logger (largely for the exercise, it is easier to just use one of these existing projects):

GitHub - vloschiavo/powerwall2: Tesla Powerwall 2 - Local Gateway API documentation

GitHub - mihailescu2m/powerwall_monitor: Monitoring for the Tesla powerwall

GitHub - liveaverage/docker-powerwall-dashboard: Grafana dashboard showing trend & historical data polled from Tesla Powerwall 2 API served up in an easy to use docker image

GitHub - jrester/tesla_powerwall: Python API for Tesla Powerwall