It is currently November 22nd, 2019, 1:57 pm

Tesla Powerwall 2 Monitor

Post your work-in-progress and completed skins to share and discuss.
User avatar
spoonwzd
Posts: 14
Joined: November 29th, 2017, 6:24 pm

Tesla Powerwall 2 Monitor

spoonwzd » February 20th, 2018, 12:15 pm

Image

Download

Created in RainMeter v4.1

Monitor & graph Powerwall 2 API output:
• Grid import & export
• Battery charging, discharging & level
• Home load
• PV generation
• Firmware revision
• Stored energy (kWh)
• Will graph up to 7kW import / 5kW export
• Grid shows idle / import / export states
• Battery shows idle / charging / discharging states

Usage:
In later firmware revisions the Powerwall only supports SSL connections and Rainmeter cannot ignore a failing certificate, so you must create a 'powerwall' hosts entry of your Powerwall Home Energy Gateway IP address in order for this meter to work correctly

Changelog:

v2.6 - 2019-04-17
• HTTPS Fixes
• Version number fixes

v2.5 - 2018-04-20
• Modified graph so that graphed statistics now match up with vertical measurement intervals

v2.4 - 2018-04-11
• Added display of stored battery energy in kWh (Battery Charge % / 100) * 13.5
• Modified battery charge / grid export limits and graph for 5kW
• Added dynamic Powerwall firmware version display

v2.3 - 2018-03-25
• Adjusted graph line length by 1 pixel to improve aesthetic
• Combined BattImport & SolarPVGen histograms into a single histogram to improve aesthetic
• Further tweaks to grid state thresholds to address graph jumping during low load spikes
• Added line graphs and adjusted colours to improve PV & grid histogram meter aesthetic

v2.2
• Tidied redundant meter config
• Further improvements to meter aesthetic when loads change erratically

v2.1
• Added visual version identifier
• Resolved issue with undefined meter
• Optimised state thresholds and meter display triggers
• PV generation and Powerwall graphs now use histogram instead of line to improve aesthetic
• Increased home load line width to improve aesthetic when grid import and home load values match
• Reordered graph layers to improve aesthetic

Made by spoonwzd
Inspired by and designed to fit alongside the BlueVision skin by g3xter
fhutt
Posts: 4
Joined: May 10th, 2019, 10:19 am

Re: Tesla Powerwall 2 Monitor

fhutt » May 10th, 2019, 10:28 am

This is a great idea.
I have installed this skin and runs. But, without any data and all entries in the log have failed.
I believe that I need to setup the Hosts file for correct operation. Unfortunately, the .ini file does not give any details about how to set this up.

Could someone please explain how to set up the Hosts file. Also I notice that the PoerwallIp address is different to my Powerwall 2 address. Do I change this entry to my powerwall 2 setting?
Thanks
User avatar
spoonwzd
Posts: 14
Joined: November 29th, 2017, 6:24 pm

Re: Tesla Powerwall 2 Monitor

spoonwzd » May 10th, 2019, 7:24 pm

Search the Internet for your answer - "how to edit host entry" yields a page full of valid answers.

It is expected that your Powerwall's IP address will be different to the example - you'll need to set it to whatever IP address your Powerwall was given when you connected it to you network by WiFi or wired connection.

Hope this helps
fhutt
Posts: 4
Joined: May 10th, 2019, 10:19 am

Re: Tesla Powerwall 2 Monitor

fhutt » May 10th, 2019, 10:01 pm

Thank you spoonwzd for your response.
I made the 2 changes. My Powerwall 2 has an IP Address of 192.168.91.1.
I entered this in 'Powerwall V2.ini' file for "powerwallID" entry.
I entered "192.168.91.1 powerwall" in the hosts file.

I didn't have trouble in how to make the entry in the hosts file, I had a problem of what to enter. What I entered (as above) may still be wrong or something else is wrong because it still doesn't work. I get the following errors in the log:
"(Fetch error) The certificate authority is invalid or incorrect (Error Code=12045)"

To reach the powerwall 2 in a browser the address bar entry is https://192.168.91.1. It appears to work in the browser (Firefox) but it appears to be a secured connection with the security details showing that the "issuer is unknown". Maybe this is the problem - how do I fix this?

Any further help would be appreciated.
Thanks
User avatar
spoonwzd
Posts: 14
Joined: November 29th, 2017, 6:24 pm

Re: Tesla Powerwall 2 Monitor

spoonwzd » May 10th, 2019, 10:15 pm

You need to get to the point where web browsing https://powerwall/ gets you to your Powerwall login page without a certificate error.

The PowerWallIP= entry in the ini file is redundant. In fact you shouldn't need to touch the ini file at all. I will be removing this option in the next iteration.

Your hosts file entry looks ok. If done correctly, 'ping firewall' from the CMD line should see the name resolve to the IP address before printing the ping responses.

If you can 'ping powerwall' successfully but not web browse to https://powerwall/ then the issue is certificate related. In this case, adding the Tesla cert on your powerwall to your local trusted certificates list may be the bit you're missing.
fhutt
Posts: 4
Joined: May 10th, 2019, 10:19 am

Re: Tesla Powerwall 2 Monitor

fhutt » May 11th, 2019, 12:53 am

Pinging to 'powerwall' in a command prompt works fine showing the correct ip address (192.168.91.1).

I set an exception to https://powerwall site in local internet options. I cannot find any settings to do with local trusted certificates list.
Firefox is the only browser that does not show an alert. Chrome displays the page but shows "security error" in the address bar. IE11 does not show the page and shows an error in red on the address bar.

Therefore, the problem is still with the certificate (I think) but cannot find the 'local trusted certificates list' to enter the Tesla certificate.
User avatar
spoonwzd
Posts: 14
Joined: November 29th, 2017, 6:24 pm

Re: Tesla Powerwall 2 Monitor

spoonwzd » May 11th, 2019, 7:32 am

Yup, defo the cert then.

It will depend on the browser, but if you web browse to https://powerwall/ you should be able to view the certificate after connecting and getting past any certificate security warning by (in the case of Internet Explorer on my test VM here) clicking on the padlock icon next to the 'https' part of the browser's URL bar.

From there you can view and install the certificate to Local Machine \ Trusted Root Certification Authorities which seems to be what I've done to make it work.
fhutt
Posts: 4
Joined: May 10th, 2019, 10:19 am

Re: Tesla Powerwall 2 Monitor

fhutt » May 11th, 2019, 10:07 pm

Using IE11 I went through the process of registering the certificate as you outlined. However couldn't find "Local machine", just the "Trusted Root Certification Authority". The wizard finished with a successful install. Couldn't find the certificate in certmgr.exe.

IE still complains about the certificate and cannot get to display the page.
I tried Rainmaker then with still the same result.

I am able to view the page without any errors in Firefox (PaleMoon). I thought that Rainmaker would be an easier option. It doesn't look like it.
I might put off this exercise for a while as I keep hitting a brick wall.
Thank you for trying to help though.
User avatar
spoonwzd
Posts: 14
Joined: November 29th, 2017, 6:24 pm

Re: Tesla Powerwall 2 Monitor

spoonwzd » May 11th, 2019, 10:24 pm

Agreed, it was a painful exercise. It's a shame that you can't make Rainmeter ignore certificate errors, so unless the cert part is working Rainmeter wont talk to the Powerwall.