Tesla Powerwall II

Here’s a very basic device handler for the Tesla Powerwall II

It will show you charge level and the current power for grid, site, solar and Powerwall.
It requires a FQDN for your Powerwall, because SmartThings is a PITA about allowing direct access via IP addresses unless you also write a device handler app - and I lost the will to live trying to decipher the awful documentation on doing this. Someone that knows what they are doing could probably sort this out really quickly.

The SmartApp simply sends you a push notification when the charge level goes through configurable upper or lower limits, with the simple purpose of alerting you when the battery is full so that you can turn something on to make use of excess solar. The SmartApp could be easily modified to switch a load on and off for you in response to charge levels.

Hope someone finds it useful.


I figured this would happen sooner or later! Nice one! While I don’t have any Powerwalls I am definitely following this!

1 Like

This is great, thank you Robin. I’m still waiting for my PW to be installed so can’t make use of this quite yet however my plan is to pull the solar generation and PW % (Charging/discharging) to display on a LaMetric device. I’m assuming the DH will give me access to those parameters?

Everything you need you can get with calls to:

For charge level: http://pw_ip_address/api/system_status/soe

Everything else:http://pw_ip_address/api/meters/aggregates

Ok. Thanks Robin, will have a play when it (finally) gets installed.

If you have multiple PW’s does the power output capacity add together or is it still 5kW/7kW peak total and just the storage capacity increases?

In the UK it will be limited to 3.5kW, unless you get a G59 approval from the local grid company.
Even then, you will not get over about 5.7 in real power.
If you have more than one PW they are all connected to the same gateway, and the storage capacity is increased. You’ll have to check with your installer if you can install to give a higher output. There are issues with interference and messing up the AC supply phase.

Interesting that Tesla have removed my post about this on their forum.

Whaaaaaat… Did you link your DTH or something?

I miss the luxury of 240V * everywhere * in the UK, if you even have a slight hobby for power tools or power amps for A/V, then it becomes a struggle on 120V with the majority of outlets limited to 15A…

And the kettle takes an age to boil :joy:

Kettle?! No one has kettles over here, I had to track one down and buy one when my parents came and visited :smiley:

Trying to add this DTH but when I update from repo to install, theres nothing there

I created custom device and app, used “From Code” option for both, and pasted the code in.

However, it stopped working after the most recent Powerwall update. So guessing they changed their API. Not had chance to investigate yet.

Oh ok. Which port does power wall use to communicate? Not sure which port to forward to

It was just http, they may have changed it to https now. However if your hub and the PW are on the same network then it’s only a local call, no port forwarding required. If you do need to open it up to external access at the very least put a remote IP address restriction on it, as you can turn a PW on and off and work out what the system password is without any authentication.

Hi Robin, does this still work following the latest 1.22.1 PW firmware upgrade? I can pull stats using domain:port so know connectivity is ok but despite that the app is unable to display any data. Could they have altered the api calls?

Hi Tony

Tesla introduced a self-signed certificate to achieve a HTTPS connection. Unfortunately the Groovy language doesn’t support calls that use self signed certificates. I asked Tesla about doing it in a better way to allow continued access and they weren’t interested (putting it politely). So it will need a workaround using an app on another device (Raspberry Pi is a possibility) to fetch the data and pass it to SmartThings.

1 Like

Ah, ok, that’s a shame. I was so close to having the perfect setup. Thanks for the prompt response.

Not sure if they are all the same, but I noted that the hub they connected to my router has a zigbee address. Can’t see it on a search, but maybe some hope for a more natural integration?

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.