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

Tesla Powerwall Homekit Support through Homebridge

TimoD

New Member
May 27, 2018
3
3
Germany
Hi Tesla Powerwall Members,

I got my Powerwall 4 Weeks ago, I live in Germany an I'am very happy with it. I moved to my new house which hears to Apple Homekit.

Sadly, Teslas Powerwall has not so much 3rd Party Applications, even no IFTTT integration. So I decided to integrate Teslas Powerwall to Apple Homekit (together with my cousin, study informatics) using Homebridge.

Now I want to share our Project:

You can find it here:

homebridge-tesla-powerwall

What it does:

It integrates the Tesla Powerwall as different devices in Apple Homekit:

1. There is an switch which can turn On / Off the Powerwall (which can be used in scenes)
2. A lamp which shows actual Powerstate (Which can trigger Events)
3. 4 Devices each for One Energy Flow (Home / Solar / Battery / Grid)

And then it looks like this:

Homekit.jpg


And here comes the best Part, everything also acts like an EVE Energy, which can be shown togehther with Diagramms in the EVE App:

EVE.jpg


EVEDia.jpg

If you use our integration, please support the Development (my Cousin) by leaving a Coffee Cup by Paypal:

Pay Timo Dostal using PayPal.Me

I'm curious of what you think of our Integration,...

Greetings Timo
 

Parenn

New Member
Jun 4, 2018
1
0
Berowra
This looks pretty good, thank you!

I just set it up and I’m a bit confused about how to use the lamp on/off and colour, do you have an example?
 

TimoD

New Member
May 27, 2018
3
3
Germany
Hey the Lamp / Color is just for showming the actual Power State of the Powerwall. You can use the Switch (Showing in Apples Home App) Turn the Powerwall On / Off
Best for Showing Stats is EVE
 

Ulmo

Active Member
Jan 19, 2016
4,325
4,427
Vienna Woods, Aptos, California
I just found this (since I first installed HomeBridge today). Installing it now.

I opted not to supply a username and password, since I don't want to be able to turn it off and prefer not to give away credentials unnecessarily. I supplied IP#, which I assumed was the PW LAN IP. It works fine in this configuration.

Here's the Eve app I installed: "Eve for HomeKit": Eve for HomeKit by Eve Systems GmbH

Here's a screenshot:Eve for HomeKit by Eve Systems GmbH.jpeg

Note that "Battery Power Meter" shows 0 even though it is negative in the HomeKit Fan section. I suppose it is charging from the excess solar, since 2302W-1260W=1042W.

When my automatic water heating kettle which I use for coffee cycled on to maintain my water kettle temperature, I noticed that the electricity used by Home Power Meter went up, and when it exceeded Solar Power Meter, then Battery Power Meter showed wattage. Looking at live stats on my PW web display, it also showed the same thing. So, the limitation is that it will not show negative wattage.

Playing with Siri:

"What is the home battery flow?" --> "Your Battery Flow is on." (Useless answer.)

"What is the home power meter?" --> "Hmm, I can't do that with HomeKit because I'm not sure what you mean by "meter". (So it knew it was HomeKit, then just gave up.)

"How much battery flow is there?" --> "Looks like there's one of those." (Even less useful answer.)

Ok, I started to think about the nomenclature that HomeKit uses. First, I thought of it as a light bulb, which was wrong:

"How bright is the Battery Flow?" --> "Hmm, that feature is not available for the Battery Flow."

I thought a little harder, and remembered that the flows are indicated as fans. So, I tried this:

"How fast is my Battery Flow?" --> "The Battery Flow is at -6." SUCCESS!

"How much is the Battery Flow?" --> "Your Battery Flow is on." Failure.

Ok, minimizing:

"How fast is the Grid?" --> "Your grid flow is 0"

"How fast is the battery?" --> "CO Detector detects normal carbon monoxide levels in the Bed." Wrong device.

"How fast is the Battery Flow?" --> The Battery Flow is at -18.

"How fast is the Solar Flow?" --> The Solar Flow is at 30.


Well, you get the idea. 30 what?!

Ohhhh ... 30 hundred watts. Nice. I see said the blind man ...

"How fast is the home power flow?" --> "No. Your Battery Flow is on. Shall I turn it off for you?" REALLY?!

I had to look carefully at the names in the Eve app. I see: I need to use "Battery Flow", "Grid Flow", "Home Flow", "Solar Flow", as if they are fans. This works:

"How fast is the home flow?" --> "The Home Flow is at 13." So, 13 hundred watts, or +1300W, which would be to the home.

Further minimizing:

"Solar flow speed" --> "The Solar Flow is at 27." MUCH better.
"Home flow speed" --> "The Home Flow is at 13." Yes.
"Grid Flow Speed" --> "The Grid Flow is at 0."
"Battery Flow Speed" --> "The Battery Flow is at -9."

You have to be careful not to let Siri think you're giving it a command. For instance, if you say "Solar Flow", Siri turns it off. At least it thinks it turns it off. But in actuality, the plugin ignores that, so no harm done. Similarly, I said something that it thought meant "Solar flow low", and it set the speed to low, which of course also does nothing.

I would like better answers to better questions:

"How much solar is there?" --> "Looks like there's one of those." There better be! Without that we'd all be dead! Anyway, knowing the solar panel input and the cloud cover & UV index would be nice, as well as some effects like how warm it is and the forecast.

"How much electricity am I using?" --> "Hmm, I can't do that with HomeKit because I'm not sure what you mean by "electricity"." It should have given me an idea of how much was being used in the home, taken from or given to the batteries, and from the grid. At least one of those would have been nice. But nothing. Also, if it told me how much my HomeKit outlet was using, that would be nice too.

Siri is limited, as usual.

Anyway, great! I'll see if this plugin is useful for anything. I just have to remember when using Siri: Siri thinks these meters are fans.
 
Last edited:

liuping

Active Member
Jul 23, 2013
2,242
896
San Diego
I'm glad I stumbled on to this.

I've been looking for a way to stop the Tesla from charging when the Powerwall is discharging and there is no solar or grid available.

I don't really want to wake up in the morning after a power outage to an empty Powerwall.

This is part one, and homebridge-tesla might be enough for the second part (I'm not sure yet if it can control charging)
 

liuping

Active Member
Jul 23, 2013
2,242
896
San Diego
Unfortunately It does not work for me. My powerwall has always been a bit flakey when trying to connect locally. I just get a ton of error spew in the logs.

For this to work for me, it would need to go through the Tesla servers. I have some python script to do that, but I have not had a chance to learn how to make a homebridge plug in yet.
 

MorrisonHiker

S 100D 2021.4.15
Mar 8, 2015
9,582
8,796
Colorado
I'm glad I stumbled on to this.

I've been looking for a way to stop the Tesla from charging when the Powerwall is discharging and there is no solar or grid available.

I don't really want to wake up in the morning after a power outage to an empty Powerwall.

This is part one, and homebridge-tesla might be enough for the second part (I'm not sure yet if it can control charging)
We had a 5.5 hour outage this week and someone scheduled his car to charge early and it drained the Powerwalls. We tweeted Elon about the issue and three minutes later, he replied and said there will be a solution "coming soon".
 

liuping

Active Member
Jul 23, 2013
2,242
896
San Diego
We had a 5.5 hour outage this week and someone scheduled his car to charge early and it drained the Powerwalls. We tweeted Elon about the issue and three minutes later, he replied and said there will be a solution "coming soon".
Thanks! That is great news.

In the mean, time I wrote a script that check the Powerwall grid status every few minutes and send a message to my home automation system to stop the car charging. It’s a bit hacky, but works until something more official form Tesla is available.
 
  • Like
Reactions: NuShrike

anderkh

New Member
Jan 25, 2021
3
0
Sleepy Hollow, NY
TimoD, apparently things are locked down more now on the gateway, and it's not accessible directly. Are you planning on upgrading the plugin so that it will work through Tesla's network?
 

About Us

Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.

Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


SUPPORT TMC
Top