Tesla Battery Gateway Plugin

User avatar
GlennNZ
Posts: 1579
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Tesla Battery Gateway Plugin

Post by GlennNZ »

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
User avatar
jay (support)
Site Admin
Posts: 18310
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Tesla Battery Gateway Plugin

Post by jay (support) »

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
User avatar
GlennNZ
Posts: 1579
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Tesla Battery Gateway Plugin

Post by GlennNZ »

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.
kwijibo007
Posts: 325
Joined: Fri Sep 27, 2013 4:58 pm
Location: Melbourne, Australia

Re: Tesla Battery Gateway Plugin

Post by kwijibo007 »

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
User avatar
durosity
Posts: 4381
Joined: Thu May 10, 2012 3:21 pm
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Tesla Battery Gateway Plugin

Post by durosity »

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! [emoji23]


Sent from my iPhone using Tapatalk
Computer says no.
User avatar
roquej
Posts: 616
Joined: Sun Jan 04, 2015 4:56 pm
Location: South Florida, USA

Re: Tesla Battery Gateway Plugin

Post by roquej »

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
User avatar
durosity
Posts: 4381
Joined: Thu May 10, 2012 3:21 pm
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Tesla Battery Gateway Plugin

Post by durosity »

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.
User avatar
GlennNZ
Posts: 1579
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Post by GlennNZ »

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
markf424
Posts: 58
Joined: Wed Dec 25, 2013 1:52 pm

Re: Tesla Battery Gateway Plugin

Post by markf424 »

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..
User avatar
GlennNZ
Posts: 1579
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Post by GlennNZ »

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)
petematheson
Posts: 847
Joined: Sun Sep 14, 2014 9:51 am
Location: Southampton, UK

Re: Tesla Battery Gateway Plugin

Post by petematheson »

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.
User avatar
GlennNZ
Posts: 1579
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Post by GlennNZ »

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
petematheson
Posts: 847
Joined: Sun Sep 14, 2014 9:51 am
Location: Southampton, UK

Re: Tesla Battery Gateway Plugin

Post by petematheson »

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
petematheson
Posts: 847
Joined: Sun Sep 14, 2014 9:51 am
Location: Southampton, UK

Re: Tesla Battery Gateway Plugin

Post by petematheson »

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
petematheson
Posts: 847
Joined: Sun Sep 14, 2014 9:51 am
Location: Southampton, UK

Re: Tesla Battery Gateway Plugin

Post by petematheson »

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 :)
Post Reply

Return to “Tesla Battery”