Tesla Battery Gateway Plugin

Posted on
Sat Jun 09, 2018 1:25 am
GlennNZ offline
Posts: 815
Joined: Dec 07, 2014
Location: Central Coast, Australia

Tesla Battery Gateway Plugin

Image

Tesla Battery Gateway Plugin

A Plugin for Tesla Battery Gateway - enabling you to see everything that is happening within the Tesla App.

eg.
Grid Usage in Watts
Solar Generation in Watts
Battery Usage in Watts
Home Consumption in Watts

Potential Use Scenarios:
    Informs if Grid Connection lost - so in case of Grid outages can trigger on GridDown run Action Groups - eg. turn off devices.
    Given Watts used/generated/Battery can schedule heavy items usage eg. pool pump based on current battery usage/whether fill or not
    Another set of Solar Data Watts/Generated/Used etc. (Enphase Plugin - also reports this)



Further Documentation to follow - but these pictures should explain

Usage

1. Need Tesla Battery with standard Gateway

2. Set up Static IP Address for this Gateway on the same network as Indigo Server

3. Install Plugin from
https://github.com/Ghawken/TeslaBatteryPlugin/releases/


4. Go to Plugin Config - enter the Gateway IP Address

Click the Check Connection Button

Image


If communicating - Generate Devices button will appear
Click the Generate Devices button

Image


This will create the plugins four devices with a folder called 'Tesla Battery Gateway'

eg.

Image


Image


Image






More to follow.
[Not extensively tested in all conditions as - as haven't had any negative numbers as solar generation today]



Glenn

Posted on
Sat Jun 09, 2018 8:06 am
jay (support) offline
Site Admin
User avatar
Posts: 16552
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Tesla Battery Gateway Plugin

Are you going to put it in the Plugin Store? That's where people will be most likely to find it... ;)

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Jun 09, 2018 11:45 pm
GlennNZ offline
Posts: 815
Joined: Dec 07, 2014
Location: Central Coast, Australia

Tesla Battery Gateway Plugin

jay (support) wrote:
Are you going to put it in the Plugin Store? That's where people will be most likely to find it... ;)


Ok; updated and submitted

Changelog Version: 0.1.5:

- Add some images for control pages - including battery variable level of charge image.
- Add kW values
- Add True/False for Grid Usage
- Add True/False for Battery Charging
- Change to plugin store for update
(checks the github releases page and then directs to PluginStore if newer version)

I expect there are more changes to come...
(almost have the app display duplicated - just have to do the energy flow lines, probably need a few more Boolean..)

Glenn
Last edited by GlennNZ on Sun Jun 10, 2018 2:17 am, edited 1 time in total.

Posted on
Sun Jun 10, 2018 12:58 am
kwijibo007 offline
Posts: 302
Joined: Sep 27, 2013
Location: Melbourne, Australia

Re: Tesla Battery Gateway Plugin

Awesome stuff, Glenn. I don’t have one yet but this is another reason to talk my wife into it.


Sent from my iPhone using Tapatalk

Posted on
Sun Jun 10, 2018 6:13 am
durosity offline
User avatar
Posts: 4025
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Tesla Battery Gateway Plugin

kwijibo007 wrote:
Awesome stuff, Glenn. I don’t have one yet but this is another reason to talk my wife into it.


That is EXACTLY my plan.. as soon as I can actually afford it!


Sent from my iPhone using Tapatalk

Computer says no.

Posted on
Sun Jun 10, 2018 8:48 am
roquej offline
User avatar
Posts: 419
Joined: Jan 04, 2015

Re: Tesla Battery Gateway Plugin

Good luck getting one. I placed an order over 6 months ago, and still nothing. Not even a projection of when I will get it. Living in South Florida, and with a grid connected solar system, we need the battery during a storm, otherwise the panels shutdown. I refuse to get a generator, and with the state of the other type of batteries (e.g., marine ), this is the only game in town for now. As all things Tesla, production is their Achilles Heel.

JP

Posted on
Sun Jun 10, 2018 5:02 pm
durosity offline
User avatar
Posts: 4025
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Tesla Battery Gateway Plugin

Interesting.. someone I know in Manchester (UK) ordered one and it was installed just 4 weeks later (back in April). Perhaps they just had some free stock available in the UK at the time. Unfortunately he’s a die-hard windows fan so this plugin won’t be much use to him!

Computer says no.

Posted on
Sat Jul 14, 2018 12:52 am
GlennNZ offline
Posts: 815
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Image

Release 0.3.5

For new Telsa Battery Software 1.20.0 (being rolled out currently)

Not backward compatible

Changelog:
- Fix for IP address not sticking until save
- Change to HTTPS connection as is new standard
- Change to using CURL for this as requests will fail depending on Mac and Python version
(dreaded TLS 1.2 version error)
- Change to implementing a CURL proc timeout

Posted on
Fri Nov 23, 2018 12:06 pm
markf424 offline
Posts: 58
Joined: Dec 25, 2013

Re: Tesla Battery Gateway Plugin

I can see a good use case for this plugin. I have two Tesla Powerwall 2s tied to my main panel. My Tesla HPWC charger (80A/240V) is on that panel, but I can't/shouldn't use it when on battery backup because of the draw level. I also wouldn't want to deplete my battery even if it could handle the draw. So if I can find a Z-wave or other controlled 100A/240V breaker, I could use that for the HPWC breaker and have this plugin trigger a toggle on that breaker. Since my cars charge in the middle of the night, this solves a worry of mine.

Now to find the breaker..

Posted on
Sat Jun 15, 2019 9:41 pm
GlennNZ offline
Posts: 815
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Release 0.3.9

For Telsa Battery Software 1.20.0+ (currently 1.37.1)
Not backward compatible


- Checks for missing Site Info data (particularly Grid_Code) but all other data.
- Remove Update checks (for Indigo 7.3)
(Continues to use subprocess Curl to bypass any security issues on older Mac/OSXs)

Posted on
Wed Apr 29, 2020 3:05 pm
petematheson offline
Posts: 842
Joined: Sep 14, 2014
Location: Southampton, UK

Re: Tesla Battery Gateway Plugin

Are there any available actions that can be controlled via the API say, to change the battery into Backup Mode and back again?
It would be handy when combining this with the UK's Octopus Agile pricing so we can force the powerwall to charge during times when pricing is low.

Posted on
Wed Apr 29, 2020 4:57 pm
GlennNZ offline
Posts: 815
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

petematheson wrote:
Are there any available actions that can be controlled via the API say, to change the battery into Backup Mode and back again?
It would be handy when combining this with the UK's Octopus Agile pricing so we can force the powerwall to charge during times when pricing is low.

Hi

Not at this stage.

Whilst it is possible to do - I seem to remember to do so involves turning the gateway off (stopping any backup function) and then changing mode and restarting gateway.

I was a bit concerned about risks of gateway remaining off.

Also the powerwall settings for time of use/advanced usage essentially does this already?

Glenn


Sent from my iPhone using Tapatalk

Posted on
Wed Apr 29, 2020 11:03 pm
petematheson offline
Posts: 842
Joined: Sep 14, 2014
Location: Southampton, UK

Re: Tesla Battery Gateway Plugin

It does indeed, however it also seems adamant to do its own thing.
We’ve had 2 days of rain so far, and my PW thinks it’s still going to be sunny and so hasn’t charged itself using off peak energy for the last 2 days meaning we’re paying for everything.

Also with the agile energy pricing, it could mean charging for half hour fob a cheap rate, then a couple oh hours later the price might drop again, so worth charging then.

For example, here’s my mornings rates for today.

Image


Sent from my iPhone using Tapatalk

Posted on
Wed Apr 29, 2020 11:04 pm
petematheson offline
Posts: 842
Joined: Sep 14, 2014
Location: Southampton, UK

Re: Tesla Battery Gateway Plugin

Didn’t realise you need to reset the gateway.
I’ll find out soon as I’ve just set it to backup mode to force a charge!


Sent from my iPhone using Tapatalk

Posted on
Thu Apr 30, 2020 5:28 am
petematheson offline
Posts: 842
Joined: Sep 14, 2014
Location: Southampton, UK

Re: Tesla Battery Gateway Plugin

Glenn, this morning I jumped into the App (because my PW once again didn't charge overnight like it was told to!) and manually flipped to Backup.
It immediately started charging.
At 9am when it was getting mostly full and prices were rising on agile I flipped it back to 'Cost Saver' and it instantly stopped charging from the grid.

So no gateway restart needed as far as I've experienced?

If there is a way to add these actions in that would be a huge help in maximising the cheap rates on the octopus agile tariff :)

Who is online

Users browsing this forum: No registered users and 1 guest