Introducing the Powerwall Manager SmartApp for SmartThings (and Hubitat) Hubs

After 6 months of operation, I’ve been quite pleased with the new Tesla Powerwall II. The Powerwall coupled with our home solar has almost completely squashed our electric utility peak demand charges and has eliminated all net electric usage during peak hours.

While the Tesla mobile app’s Advanced Time Control settings do a decent job working with my electric utility’s rate structure, I wanted the ability to further monitor and automate the Powerwall’s operation.

I wrote this SmartThings smart app so that I could not only monitor and control the Powerwall through the SmartThings Hub, but could also fully leverage SmartThings to send mobile notifications and to automatically command smart devices and Powerwall functions based on the current status of the Powerwall and other smart devices.

Smartthings Hub

SmartThings Hub

by Samsung


In addition to basic SmartThings integration hooks, the app provides a simple menu for receiving mobile push notifications or text messages based on Powerwall state changes and battery level conditions. The app supports custom schedules for operational mode changes (Backup-Only/Self Powered/Advanced Time Controls) and battery reserve level % settings. The app also provides the option to select devices that should automatically be turned off in the event that a grid/power outage is detected by the Powerwall.

A description of application features and installation instructions are included below.

If you have comments, issues, questions, enhancement suggestions, or wish to provide general feedback, please comment below or use the contact menu selection above.

Update 10-Jan-2020: The latest version v0.2.0e.20200110 of the Powerwall Manager smart app adds initial (basic) cross-platform support for the Hubitat Elevation Home Automation hub

Powerwall Manager SmartApp Features

  • Monitor and View Status:
    • Battery % level & Reserve % Level
    • Current power readings for Solar, Grid, Home, & Powerwall
    • Operational Mode Status (Backup-Only/Self Powered/Advanced Time Controls)
    • Optimization Strategy (Cost-Saving/Balanced)
    • Stormwatch Enabled Status
    • Grid/Power Outage Status (added 13-Aug-2019)
  • Control:
    • Set Reserve % Level
    • Set Operational Mode Status (Backup-Only/Self Powered/Advanced Time Controls)
    • Set Optimization Strategy (Cost-Saving/Balanced)
  • Define Schedules and Automations:
    • Schedule the following Powerwall configuration changes to occur at specified times and days of the week:
      • Operational Mode (Backup-Only/Self Powered/Advanced Time Controls)
      • Reserve %
      • Stormwatch enable/disable (added 22-Jan-2020)
    • Select smart devices to automatically turn off in the event of a grid outage (added 13-Aug-2019)
  • Customize Built-in Notification Options (receive push and/or text notifications) when:
    • Powerwall battery level approaches the reserve level or a user-defined notification % value
    • Modes change
    • Grid/Power outage status changes (added 13-Aug-2019)
    • Firmware version changes
  • Integrates Powerwall status and and controls with the SmartThings Hub and ecosystem
    • Supports sophisticated monitoring rules and automated control of Powerwall functions through scripting and rule engines such as the phenomenal WebCoRE.

Mobile SmartThings app UI Images

Tesla PowerWall SmartThings Control
Tesla PowerWall SmartThings Control

Example Powerwall Manager Dashboard running on the Hubitat Elevation Hub

Installation Instructions

The instructions below assume you have basic familiarity with the SmartThings IDE and custom code installation techniques.

Install the Powerwall Manager Smart App

  1. Open the Powerwall Manager Smart App code and select edit->select all” followed by “edit -> copy”. Selecting the “Raw” button may make this a bit easier.
  2. Navigate to the SmartThings IDE “My Smart Apps” tab
  3. Select “+ New Smart App” (upper right)
  4. Select “From Code”
  5. Paste in the Powerwall Manager Smart App code and select “Create” at the bottom
  6. Select “the Publish” button and select “For Me”

Installing the Powerwall Device Handler

  1. Open the Powerwall Manager Dashboard Device Handler Code, and select “edit->select all” followed by “edit -> copy”. Selecting the “Raw” button may make this a bit easier.
  2. Navigate to the SmartThings IDE “My Device Handlers” tab
  3. Select “+Create New Device Handler” (upper right)
  4. On the “Create New Device Handler” page, select the tab “From Code”.
  5. Paste in the code for the Powerwall Manager Dashboard Device Handler code and click the “Create” button at the bottom
  6. Click the “Publish” button and select “For Me”.

Activate the Powerwall Manager Smart App from the SmartThings Mobile App

  1. From the SmartThings Classic mobile app on your phone or tablet device, select the Automation -> SmartApps tab
  2. Scroll to the bottom and select “+Add a SmartApp”
  3. Scroll to the bottom and select “My Apps”
  4. Select “Tesla Powerwall Manager” from the list
  5. Scroll through each of the setting options and menus and select “Save” when done. You can always go back and add/change your settings.
  6. The Powerwall Manager is now operational and its status can be viewed from the Tesla Powerwall Device on the SmartThings Classic mobile app “Things” tab.

Configuring the App

Once installed, the Powerwall Manager can be configured from the SmartThings mobile UI “SmartApps” tab. Current configuration options include Powerwall mode and reserve % change schedules, notification preferences for device, battery level, and  state changes, as well as actions that should be performed during a grid/power outage.

Credentials are currently required to be entered into the app’s preferences to allow interfacing with the Tesla servers. Due to a current limitation with SmartThings support of self-signed certificates, this SmartThings app cannot interface directly with the local Powerwall gateway’s interface at this time.

Changes to Powerwall settings made from this app may not immediately take effect at the time they are commanded. While settings from this app are reflected almost immediately in the Powerwall server settings (and the Tesla native app) after being sent, they are subject to the same Powerwall processing delays as changes made from the Tesla native app.

Warnings and Disclaimer


This software was developed for my personal use and is provided here in the hopes that it will be useful to others, however, it is beta software and use of this software may result in unforeseen side effects to your equipment and related accounts.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at: Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Tesla referral code: ERIC78022