If you’ve got a Powerwall2, Tesla lets you keep an eye on it via their iOS or Android App, (and now Windows 10 App) which means it’s only visible on compatible phones/tablets (or a PC if you want to put up with running an Android emulator), and it only provides today, yesterday, last week, and last month snapshots.
If you want to see more detailed usage and keep historical data, a webpage that you can leave running on a spare screen would provide another simple way to do this. For our usage, PVOutput.org, which has been running as a solar tracking site for some years now, has been recently upgraded to deal with PW2 data.
In the graph above, you can see the home power use as a red line, battery discharging and charging as blue, solar-system output as the yellow area, battery charge level as the green line, and power imported/exported as the purple area.
This graph starts at midnight on the left – you can see the battery discharging in blue as my PHEV charges, then once the PW2 hits 8% SOC (state of charge), the gateway switches to the grid (purple), and then as the sun comes up, the yellow shows the Solar generation above the line, with the PW2 charging below the line. The real-time graphs are available here. Read on to see how to set your PW2 up on PVOutput.
A PW2 with wifi enabled
A wifi router that the PW2 can connect to
Admin access to your router to find out the IP of your PW2
An always-on Windows PC with internet access on the same network as the PW2
Get connected to the PW2
Your PW2 has a wifi AP in it that can connect to your network. It may be enabled and connected to your network already – go to your router’s DHCP Connected Clients page and look for an entry like “TEG-xxxx” (where xxx is your PW2’s serial number). If you see one like this, copy it’s IP address and paste it in to a browser tab, and you should get a current-status display from the PW2 as follows – if you do, skip to the next bolded subheading:
If your PW2 is not connected to your wifi, you need to associate it to your Wifi router, using the wizard from the PW2 page above – the login details are the installer email and the serial number of the PW2. There is a network socket in the Gateway, behind the cover, and you may need to give the PC a static IP to connect to it.
Confirm the PW2 is outputting raw data
Enter the following address : http://x.x.x.x/api/meters/aggregates in a browser window (replacing x.x.x.x with your PW2’s IP), and you should see the instant data like this:
The text may be unformatted if you are using an older browser, but the data itself will be read by a separate tool provided by PVOutput, so you just need to confirm you are getting this data at that IP.
Entering http://x.x.x.x/api/system_status/soe in a browser should return you the charge-state percentage as follows:
If you got these pages successfully, move on to making an account at PVOutput.org.
Configuring the graphing options at PVOutput.org
Create an account at PVOutput here: https://pvoutput.org/register.jsp – it’s free for simple solar system uploading, but PW2 needs to use Extended Data values that are part of the Donation Features, so donate some Paypal to unlock these, at least $15. Fill in your details and visit the settings page : https://pvoutput.org/account.jsp
Towards the bottom, enable API access and generate a new key – this is what the software on your PC will use to identify you when it uploads data. Under “Registered Systems”, click “Add System”, fill in what details you know and save.
You should now have a new system on the bottom of the settings page – edit the system, and fill in your Energy Tariff Times and costs if you are on TOU.
Now go to the Extended Data section, and fill in the details as per the screen below – these are the labels for the graphs for the values that the PW2 will be exporting.
For the Battery Flow, Home Load, Grid Flow, and Solar Generation, click the cog on the right, and set the modifier to “Divide by 1000” to scale the data correctly. Click the Area / Line to change it’s state to suit your needs, and click the colour blob if you want to pick an alternative colour for any of the graphs.
Save, and from the bottom of the settings page, bookmark the link with your system’s name (that’s what you’ll click on to see the graphs), and keep this page open as you’ll need to copy the API key and System ID in the next step.
Grabbing the data from the PW2 and uploading it to PVOutput.org
On the always-on Windows PC, visit the link below to download the free PVPOutput Integration software: https://bitbucket.org/pvoutput/pvoutput-integration-service/downloads/org.pvoutput.integration.v1.5.2.zip
and unzip it to a folder in your root directory. There’s discussion about the PW2 at their forums, where new versions are posted: https://forum.pvoutput.org/t/powerwall-extended-parameters/298/34
Follow the install instructions first step to install the service.
Edit the conf/pvoutput.ini text file, and paste in the API Key from the bottom of https://pvoutput.org/account.jsp. Paste the System ID to SID=xxxxx from that page also, uncomment the format and change it to powerwall, and uncomment the direction=in., save and close pvoutput.ini.
Open the conf/powerwall.ini and paste the following to replace all the text there, substituting x.x.x.x with your PW2’s IP:
url=http://x.x.x.x/api/meters/aggregates poll=30 direction=in voltage=instant_average_voltage v7=battery.instant_power v8=load.instant_power v10=site.instant_power v12=solar.instant_power soc-url=http://x.x.x.x/api/system_status/soe soc-parameter=v11
In the above text, the v-parameters are the available data sets that PVOutput will accept, but you can vary the content by changing the part after the “=”. Have a look in the original copy of the powerwall.ini file if you want to know the kinds of params each power type can export.
Save and go to the BIN folder, and run “start-service.bat” as an Administrator. Now, give it 10 minutes or so and you should start to see graph data appearing at the page you previously bookmarked at PVoutput.org. Note that you need to click the right-most blob under the graph / above the date to expose the Extended Data graph.
More info if you want it
PVOutput has a default generation / consumption display and summary page, but the above config only lets you see all the PW2 values under the Extended Data page, and with only the gross consumption (red) value on the default display.
You can, however, make another copy of the PVO Integration service just for exporting the solar generation data, so both generation (green) and consumption (red) are plotted and measured on the default PVO page.
To do this, go to the BIN folder, and stop the service. Go back up one level, and copy the entire contents of the PVO Integration folder. Go back up another level, and make a new folder next to the original PVO Integration folder, with a different name. Open this folder and paste the original PVO Integration files/folders in. You can go back to the original PVO Integration folder / BIN, and start the original service again now.
All the following edits are done to the new copy of PVO Integration you just made.
Go up one level, and make a new folder for the output logs also, eg logs-output.
Go to the CONF folder, and edit “pvoutput.conf” – look for “# Name of the service” and change the name slightly – I just added a 1 to it. Do the same for “# Display name of the service”.
Now edit “pvoutput.ini” and change ‘dir=c:/logs” to the log directory you made above, eg: “dir=c:/logs-output”. Scroll down and change “direction=in” to “direction=out”.
Now edit “powerwall.ini” and change it’s “direction=in” to “direction=out“.
Close and save all these files, and go to the BIN folder to run the batch files to install, and then start, the new PVO service.
You should see log files in your new logs-output directory a few minutes later, and then the default PVOutput page will start populating 10 mins after that, with instant generation and total generation values in dark/light green.
Note that the consumption graph is the gross consumption of power used by the home (not including battery charging), and it does not take into account contributions from the battery powering the home. You can only currently see the net grid imports/exports under the Extended Data page.