Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Home Automation & Powerwalls/Panels

This site may earn commission on affiliate links.
Anyone here do any integration with their home automation systems and their powerwall? How are you using it? Despite having a home automation system for 17 years, powerwall/panels for 3, I just hooked mine up a few weeks ago.

I'm setting up the first use case: Automated shutdown of all ghost power (TVs, sonos, etc) on grid down using zWave switches, and text wife/I/kids that it did this.

Second use case, which may not be possible: Compare production vs consumption at a circuit level (I have a Brultech GEM with CTs hardwired inside the main & sub back to their network connected device linked into HASS). In my dream world I could create custom charts without having to do all the manual manipulation to pull data into a single db. Alas the API doesn't show powerwall charge, I might be wrong though.

If you've never seen it, this is what HASS sees via the integration. I'd love to find a way to pull all the various info into one location:

1631136300110.png


What the powerwall desktop browser shows:

1631136392052.png


But, I can get much more granular using Brultech. 1 kw isn't a useful measure.

1631136855782.png

if you're a visual person...
1631136929956.png
 
  • Like
Reactions: cobra
I have Homeseer and rolled my own Powerwall plugin a few years back though there are ones available now. It allows me to trigger an event on any part of the system, including grid outages. When the grid goes down lights and unneeded appliances turn off and I get an email plus an audible alarm. Other triggers are set up for low battery/runtime and frequency out of spec. The HA system is stateful in that it knows when we're home and not home so different levels of turning things off can happen (ie shut everything off when we're not home as opposed to leaving lights on and we can manage them manually).

I'll also take credit for Tesla adding the Runtime status in the new app - I've had it in my HA system for over a year now :)

1631152411770.png


@BrettS also does something similar using Homeseer, perhaps he has some fun HA integration stories.
 
I have the data in Home Assistant but I'm not driving any automation yet. My current goals (as time permits) is to just get the instrumentation in place. I also have some circuit data and smart devices data that need a little love to get them into the energy display or I just need to work on the Grafana dashboards.
 

Attachments

  • Home Assistant Energy Display.png
    Home Assistant Energy Display.png
    188.7 KB · Views: 60
@BrettS also does something similar using Homeseer, perhaps he has some fun HA integration stories.

Haha, I’ve had my share of fun integrations, but tbh, other than using your plugin for my powerwalls and another plugin for my solaredge inverters to get the data into my HA system I really haven’t done any integration.

I'm setting up the first use case: Automated shutdown of all ghost power (TVs, sonos, etc) on grid down using zWave switches, and text wife/I/kids that it did this.

I’ve considered setting up some automated load shedding, but it gets pretty complicated pretty quickly. During bad storms I can get times where the power will fluctuate enough to cause my system to switch to the powerwalls for a few minutes until the power stabilizes. I don’t want to do any load shedding for a 5 minute outage… especially not very visible things, like turning off TV’s and speakers. If someone is watching TV or using the speaker at that time then it’s just going to be a huge annoyance.

Of course you could add a condition so it wouldn’t start load shedding until the power had been out for x minutes, but even that isn’t really cut and dry. My powerwalls will give me 18+ hours of backup power at my normal power usage levels, and with enough solar power I can last pretty much indefinitely. So even with a power outage that’s going to be a few hours I probably don’t want to do any load shedding and annoy people in the house. I mean tbh, that’s one of the big reasons that I got the powerwalls… to be able to continue to operate my home pretty normally even in the event of a power failure.

About the only time I would want to do any load shedding is when it looks like the outage may be multiple days and there will be limited solar power, either due to weather or time of year. And that situation happens so infrequently that it’s just not worth automating. I guess I could set up a load shedding automation that would do things like adjust my HVAC temp and turn off my pool pump and turn off the lights in my fish tank and such so that I’m ready for a long term power outage, but I think I would just let it remain manually triggered since it would be used so infrequently.

And tbh, I’m not sure I’d really even worry about ‘ghost power’ like TV’s and Sonos and such. Most modern devices really consume very little power in standby mode and unless you already have an automated plug for those devices for other reasons, the automated plug itself may draw about the same amount of power as the device draws in standby mode anyway.

I love getting new technology and automating things, but I try very hard to make sure that all of my automations are useful and make life easier and that I’m not just automating things for the sake of automating them. And after a lot of thinking I’ve decided that automated load shedding during a power outage is probably one of those things that will be more annoying than useful.
 
Haha, I’ve had my share of fun integrations, but tbh, other than using your plugin for my powerwalls and another plugin for my solaredge inverters to get the data into my HA system I really haven’t done any integration.



I’ve considered setting up some automated load shedding, but it gets pretty complicated pretty quickly. During bad storms I can get times where the power will fluctuate enough to cause my system to switch to the powerwalls for a few minutes until the power stabilizes. I don’t want to do any load shedding for a 5 minute outage… especially not very visible things, like turning off TV’s and speakers. If someone is watching TV or using the speaker at that time then it’s just going to be a huge annoyance.

Of course you could add a condition so it wouldn’t start load shedding until the power had been out for x minutes, but even that isn’t really cut and dry. My powerwalls will give me 18+ hours of backup power at my normal power usage levels, and with enough solar power I can last pretty much indefinitely. So even with a power outage that’s going to be a few hours I probably don’t want to do any load shedding and annoy people in the house. I mean tbh, that’s one of the big reasons that I got the powerwalls… to be able to continue to operate my home pretty normally even in the event of a power failure.

About the only time I would want to do any load shedding is when it looks like the outage may be multiple days and there will be limited solar power, either due to weather or time of year. And that situation happens so infrequently that it’s just not worth automating. I guess I could set up a load shedding automation that would do things like adjust my HVAC temp and turn off my pool pump and turn off the lights in my fish tank and such so that I’m ready for a long term power outage, but I think I would just let it remain manually triggered since it would be used so infrequently.

And tbh, I’m not sure I’d really even worry about ‘ghost power’ like TV’s and Sonos and such. Most modern devices really consume very little power in standby mode and unless you already have an automated plug for those devices for other reasons, the automated plug itself may draw about the same amount of power as the device draws in standby mode anyway.

I love getting new technology and automating things, but I try very hard to make sure that all of my automations are useful and make life easier and that I’m not just automating things for the sake of automating them. And after a lot of thinking I’ve decided that automated load shedding during a power outage is probably one of those things that will be more annoying than useful.
This is one reason why IMO batteries are a pain! For the few times I lose power, and how much work these can take, .........
 
The main integration I've done is to auto turn off mini-splits when the grid goes out. The trick was to only have them turn off in winter, when they use lots of energy, and not in summer, when it doesn't take much to keep the house cool. Ended up developing my own Raspberry Pi solution which now also gives me full control of the mini-splits over the web so I don't have to use the remotes.

The mini-split web interface is now integrated into a touch panel that also displays real-time PowerWall stats with access to logged/charted data, weather, garage door status, etc. One of those never-ending projects.
 
  • Like
Reactions: BGbreeder
The main integration I've done is to auto turn off mini-splits when the grid goes out. The trick was to only have them turn off in winter, when they use lots of energy, and not in summer, when it doesn't take much to keep the house cool. Ended up developing my own Raspberry Pi solution which now also gives me full control of the mini-splits over the web so I don't have to use the remotes.

The mini-split web interface is now integrated into a touch panel that also displays real-time PowerWall stats with access to logged/charted data, weather, garage door status, etc. One of those never-ending projects.
Luckily, I can avoid all this stuff. I do use lots of energy to heat and cool with my mini splits. But since if I run out of battery, I can just start my generator, I do not have to worry about this type of stuff. :)
 
Luckily, I can avoid all this stuff. I do use lots of energy to heat and cool with my mini splits. But since if I run out of battery, I can just start my generator, I do not have to worry about this type of stuff. :)
You mean those noisy things 😛 ? By having the mini-splits go off, it just falls back to the boiler for heating which uses minimal power.
 
I have the data in Home Assistant but I'm not driving any automation yet. My current goals (as time permits) is to just get the instrumentation in place. I also have some circuit data and smart devices data that need a little love to get them into the energy display or I just need to work on the Grafana dashboards.
Still waiting for my system to be online, but is this a custom lovelace dashboard you made or something easily available with the Powerwall integration? Looks pretty slick, would love to add that to my HA setup as well.
 
I have Homeseer and rolled my own Powerwall plugin a few years back though there are ones available now. It allows me to trigger an event on any part of the system, including grid outages. When the grid goes down lights and unneeded appliances turn off and I get an email plus an audible alarm. Other triggers are set up for low battery/runtime and frequency out of spec. The HA system is stateful in that it knows when we're home and not home so different levels of turning things off can happen (ie shut everything off when we're not home as opposed to leaving lights on and we can manage them manually).

I'll also take credit for Tesla adding the Runtime status in the new app - I've had it in my HA system for over a year now :)

View attachment 706981

@BrettS also does something similar using Homeseer, perhaps he has some fun HA integration stories.
Dude I love that runtime remaining. I don't see that in HASS, was that custom code or is that part of the API?
 
I’ve considered setting up some automated load shedding, but it gets pretty complicated pretty quickly. During bad storms I can get times where the power will fluctuate enough to cause my system to switch to the powerwalls for a few minutes until the power stabilizes. I don’t want to do any load shedding for a 5 minute outage… especially not very visible things, like turning off TV’s and speakers. If someone is watching TV or using the speaker at that time then it’s just going to be a huge annoyance.

Of course you could add a condition so it wouldn’t start load shedding until the power had been out for x minutes, but even that isn’t really cut and dry. My powerwalls will give me 18+ hours of backup power at my normal power usage levels, and with enough solar power I can last pretty much indefinitely. So even with a power outage that’s going to be a few hours I probably don’t want to do any load shedding and annoy people in the house. I mean tbh, that’s one of the big reasons that I got the powerwalls… to be able to continue to operate my home pretty normally even in the event of a power failure.

About the only time I would want to do any load shedding is when it looks like the outage may be multiple days and there will be limited solar power, either due to weather or time of year. And that situation happens so infrequently that it’s just not worth automating. I guess I could set up a load shedding automation that would do things like adjust my HVAC temp and turn off my pool pump and turn off the lights in my fish tank and such so that I’m ready for a long term power outage, but I think I would just let it remain manually triggered since it would be used so infrequently.

And tbh, I’m not sure I’d really even worry about ‘ghost power’ like TV’s and Sonos and such. Most modern devices really consume very little power in standby mode and unless you already have an automated plug for those devices for other reasons, the automated plug itself may draw about the same amount of power as the device draws in standby mode anyway.

I love getting new technology and automating things, but I try very hard to make sure that all of my automations are useful and make life easier and that I’m not just automating things for the sake of automating them. And after a lot of thinking I’ve decided that automated load shedding during a power outage is probably one of those things that will be more annoying than useful.

Hmmm. That is an excellent point.

perhaps only automated if it's late at night or nobody at home. Or set up a 1click "oh crap turn it all off" that we just do manually.

Now I have something new to think about. Perhaps this isn't as good an idea as I thought.
 
Dude I love that runtime remaining. I don't see that in HASS, was that custom code or is that part of the API?

That is definitely custom code and the best part of the plugin @gpez wrote. He calculates the rolling average of the home’s power draw over the last x minutes (which is configurable) and with that number and the amount of power remaining in the powerwalls, calculates the amount of runtime you have left. It’s obviously just an estimate and can vary greatly as your home’s power consumption goes up and down, although using the rolling average helps to minimize the fluctuations. It also assumes that you will get no solar power to replenish the powerwalls, so if you can see that you have enough runtime remaining to make it to sunrise then you know you’ll be good. During the time I was doing my ‘extended off grid testing’ and running off grid for days at a time I would check the runtime remaining number every evening before I went to sleep just to help reassure me that I would have plenty of power to make it through to the morning.
 
That is definitely custom code and the best part of the plugin @gpez wrote. He calculates the rolling average of the home’s power draw over the last x minutes (which is configurable) and with that number and the amount of power remaining in the powerwalls, calculates the amount of runtime you have left. It’s obviously just an estimate and can vary greatly as your home’s power consumption goes up and down, although using the rolling average helps to minimize the fluctuations. It also assumes that you will get no solar power to replenish the powerwalls, so if you can see that you have enough runtime remaining to make it to sunrise then you know you’ll be good. During the time I was doing my ‘extended off grid testing’ and running off grid for days at a time I would check the runtime remaining number every evening before I went to sleep just to help reassure me that I would have plenty of power to make it through to the morning.
Got it.

Also, how did you get the % battery? Also custom code? I have mine set to 40% reserve so the HASS "battery now" just shows wattage coming from battery. Right now, 8am, that's 0 kw/0%. I'd love to see the "40%" somewhere.