Home Home Control: Powerwall 2 API
Post
Cancel
Preview Image

Home Control: Powerwall 2 API

Unlike several other APIs which require the device to send its data to the Internet where it can then be retrieved for use, Teslas have enabled direct access to the Powerwall 2 data in the Gateway itself. All that is needed is the IP address.

Get Powerwall 2 IP Address

  • Get password for Gateway from behind the cover of the unit
    • S/N: [STRONGBOX], PW: [STRONGBOX]
  • With phone/MacBook, connect to the Gateway WiFi network which appears as “TEG-xxx” where “xxx” is the last 3 digits of the gateway S/N [TEG-STRONGBOX], and use the password above
  • With web browser go to “192.168.91.1” or “https://teg-xxx”
  • Choose “Customer” login
    • Email address from Tesla account (app)
    • First time, password is last 5 characters of gateway PW, thereafter whatever set [refer to StrongBox]
  • Can then look at Network details for IP address and Summary for system settings, etc

Integrate into OpenHAB

  • Install the Tesla Powerwall Binding from the Community Marketplace (Settings -> Bindings)
  • Configure binding Thing
    • Add Hostname/IP: 192.168.0.104
    • Email address from Tesla account
    • Local Powerwall password: last 5 characters of Gateway PW [STRONGBOX]
  • Thing should go online. There are many channels to choose from, but only using state of charge at the moment [item = TeslaPowerwall_BatterySOE]

HabPanel

The Energy Flows widget on the HabPanel includes an element which shows the battery state TeslaPowerwall_BatterySOE in percent.

It uses CSS relative positioning to put the number over the battery icon.

1
2
3
<div style="position: relative; top: -5.1vw; left: 2.4vw; font-size: 1.1vw">
  {{'%.0f' | sprintf:itemValue('TeslaPowerwall_BatterySOE')}}%
</div>

Resources

This post is licensed under CC BY 4.0 by the author.
Recently Updated
Trending Tags
Contents
Trending Tags