A developer question - does anyone know why these countries aren’t possible with the current API use? Is it a permission/credential issue? Or a case of it simply not being implemented?
Even this as the only control would be extremely useful for the reasons mentioned upthread. I have a different set of criteria for utilizing my PWs than what the Tesla app supports and would love the ability to self-consume based on state of charge AND TOU instead of simply TOU rates/times.
Good news, there is a rewrite Home Assistant integration that will provide full control of your powerwall. It is currently in final states of testing and likely to be released wider in the next week.
This rewrite should resolve this request.
The Tesla Custom Integration is now available for testing and provides control and monitoring over Tesla vehicles as well as energy products including powerwall, including changing operating mode, backup reserve. This is a breaking change if you already have the integration installed.
You can install by including as a custom repository in
You need to install the dev version:
Happy to take comments here, but please raise any issues in GitHub.
Sounds like I am adopting HA at just the right time.
Controlling my powerwall and car charging is definitely something I want to do. Thanks!
I am fine using a custom repository if that is the right thing to do… but I get the impression that this is about to be released into the “main repository” (whatever that is called) to replace the sensor-only integrations that are there. Is that right? Is there a timeline for that?
If it is soon (a few weeks), I’d like to wait, but if there is going to be a bigger delay for that, I might just use the custom repository.
Thanks so much for doing this btw.
I am in the process of switching from smartthings to HA, and I gotta say… I really like it so far. Every time I sit down and say “I should port that custom ST device driver that I wrote over to HA” it turns out that there is already support for whatever it is, and it is more complete and easier to use than the one I wrote. Very exciting.
Just found this new Tesla integration - sounds great.
I’ve been using the old monitoring only integration with my powerwall for a while. What’s the best way to move over to the new one?
What happens to automations that use the current sensor values?
Also don’t really understand the refresh token stuff (maybe it is obvious when you install the new integration?), what’s involved?
Keen not to mess things up, any advice appreciated.
Thanks
You can use both at the same time, so just leave your old one in place, and load up the new one and slowly move your automations across.
Very helpful, thank you.
Will give it a go.
The Custom Tesla integration installed fine - marvellous.
The old integration works locally but this one is cloud polling - is that right? (the reserve power level now agrees with the tesla app - no 4% difference that is there in the local data - hooray)
All the polling info in the docs refers to cars - I only have a Powerwall. Is polling relevant to powerwall only operation? The sensor data seems to be changing every 10-15 seconds. This isn’t critical to anything I just like to understand.
There are two cloud API custom components for install via HACS.
GitHub - carboncoop/tesla-gateway-ha-component: A Home Assistant component to control Tesla Powerwall. - which shouldn’t be used any more as it is unsupported
GitHub - alandtse/tesla: Tesla custom integration for Home Assistant. This requires a refresh token be generated by third-party apps to login. - which is under active management and has a lot of advanced powerwall controls.
There is also the local API integration, which is part of the home assistant core, which doesn’t have the advanced controls.
You can have all or some of these installed at the same time.
Great job with this custom integration. It does exactly what I needed it to do!
Now I just need to find a way to control my Tesla Wall Connectors to manage charging my Non-Tesla Cars.
I have powerwalls and a Kona EV and and Zoe EV.
The Zoe charges via an EVSE that is OCPP capable (Schneider Electric EVLink), and the Kona via a dumb unit with no charge control. The Zoe can’t even set an upper limit to the battery charging, so it was important for me to be able to set this in another way.
Whist the ZOE car has no charging control from inside the car, the EVSE it came with from the factory is quite good and it works well through ChargeHQ.com to regulate charge current, although stopping charge can’t be automated by the battery SOC. That system works well with Tesla vehicles, although it can’t talk with non-Tesla cars. In addition to ChargeHQ.com, I call the HV Battery SOC through EVNotify, which Home assistant can collect via RestAPI, and then the EVSE have individual WiFi Circuit Breakers that Home assistant controls to kill the power at the set SOC percentages.
Considering getting Powerwall 3 installed. Can I ask how does each of the controls work?
I want to do the following automations:
- How do I force PW to stop doing anything and go idle via HA? (eg. let house consume from the grid, use-case: when my Tesla is being asked by energy provider Octopus to charge on their Intelligent Go tariff)
- How do I force PW to charge via HA?
- How do I set overnight charge limit to leave space to capture solar excess via HA?
- Not HA, can the powerwall allow export of solar excess but match load when import is detected. (eg. to avoid paying import pricing but get paid for exporting solar excess) Is there a mode for this?
Set backup reserve % to match current state of charge % and the battery will no longer be discharged for home load.
- How do I force PW to charge via HA?
Set backup reserve % > SOC % and will charge at 1.7 kW per battery
Set operating mode to ‘backup’ will charge at 3.7 kW per battery
Set operating mode to Time Base Control/ Autonomous with a OFFPEAK utility tariff, will charge at 5 kW per battery.
- How do I set overnight charge limit to leave space to capture solar excess via HA?
Leave backup reserve % low to allow headroom, or utilise a more comprehensive optimisation scheduler like EMHASS: An Energy Management for Home Assistant
- Not HA, can the powerwall allow export of solar excess but match load when import is detected. (eg. to avoid paying import pricing but get paid for exporting solar excess) Is there a mode for this?
Switch AllowedExports mode to PV only.
Thank you so much for detailed answers. So Tesla powerwall can do all those things, just though a convoluted way rather than a direct “charge” or “upper charge limit” setting. I was getting really confused by their demo app.
Finally how can I force PW to discharge? What rate (kW) does it do discharge?
Discharge is the biggest workaround.
Powerwall will export in TBC mode, provided your utility rate plan has a high export price during PEAK, exports are generally 5 kW per battery.
Thank you very much.
For anyone else searching, I’ve also got answers from Tesla custom integration discussions:
This is great, thanks. Ive been able to use this to get my EV charger and Powerwall link together with the Intelligent Octopus tariff that I’m on for electric in the UK.
Can i just check that we still need to use the ‘dev’ version of this?
Hi
I am new to HA but can this control my Powerwall?
what I would love is a way to force the pw to charge off peak to a chosen % no matter what the algorithm thinks as I want to start each day especially in winter to 70+ % as I am in uk and weather is not guaranteed
Adrian
From the automation someone posted on github I linked earlier: How does HA control the Powerwall? · alandtse/tesla · Discussion #1017 · GitHub
You need to use the Tesla custom integration (see the repository of that discussion thread) and you get Powerwall to stop charging by setting this:
- service: select.select_option
data:
option: "No"
target:
entity_id: select.home_grid_charging
I’m still waiting for my install, meant to happen today after delays but they can’t do it, last minute cancel. Not happy with Heatable (UK).