Pulling data out Tesla Powerwall

I didn't notice that either. Glad it's working now.

Powerwall Manager v0.3.60 is now available and includes the following changes since the v03.30 post:

v0.3.60: Added Storm Watch Active status, added delta Watt threshold preference setting for power reporting, enabled dimmer level for reserve control/status using the base Powerwall device, added child device creation options for some states and power meter values.

v0.3.50: Fixed issue with delta check update logic resulting in power level updates not always being sent as expected.

v0.3.40: Added option to choose between multiple Powerwall sites when available. Fixed issue with actions and alerts when returning to on-grid.

Both app and device driver are required to be updated with this change. The Powerwall Manager is also now available in Hubitat Package Manager.

4 Likes

@Darwin - Is this app still working with recent API updates from Tesla, or is this still local-only? We’re working on @kahn-hubitat’s Tesla car integration to try to update the app due to the recent changes. Many of us were manually updating the token which only refreshed every 45 days, but now with an 8-hour refresh it’s unmanageable. So it was suggested we might be able to use what you did with Powerwall in this app. Any help would be appreciated!

Yes, the Powerwall Manager is still working with Tesla's recent API updates. The method to refresh the tokens is void refreshAccessToken() on line 620. It will schedule this as needed based on the expiration date of the last token received. There's a second try/catch in this method that attempts to get the old 45 day access tokens from bearer refresh token just in cases that starts working again. This second try/catch always fails after Tesla's latest changes, so you can probably leave off that part.

I can possibly look at adding this code in to Tesla Connect app if no one else gets to it, but probably wouldn't be able to look at it for a couple of weeks. I currently don't have my 3 integrated in, but it's probably about time. For those that use both Tesla Connect and the Powerwall Manager, it would be nice to have the option to have just one app keep both tokens updated.

I also saw that the option to not follow HTTP redirects was added in the Oct 2.29 Hubitat update, so it may actually be possible to once again use username and passwords in Hubitat with Tesla's latest auth updates. I haven't looked at that yet to verify.

2 Likes

Thanks so much for this info!!

I’ll take a look at it and see what I can do in the meantime, although probably above my skill level. Kahn and others are in the loop too, so hopefully we can get it done.

Yeah, totally recommend it. I use Tesla Connect to run all my voice controls (iOS and Alexa), set charge levels based on calendar events and location, perform location-based triggers, etc.

2 Likes

Had my first nighttime power outage with the Powerwalls. It unintentionally set off the intrusion alarm with this app. I had the trigger for nightime intrusion set to all contact sensors. I did not realize the Powerwall device appeared as a contact sensor and when it went off grid it triggered the intrusion alarm. I've now set the intrusion alarm to manual sensor selection and left the Powerwall device out of its triggers.

Sorry about that! Yes, the contact sensor capability to indicate power outage was added a while back from an enhancement request as a simple way to trigger power outage voice notification on echo devices. The description for the contact sensor capability is buried down in the general preferences section, but it may worth making that a little more obvious.

1 Like