Page 1 of 9

Tesla Battery Gateway Plugin

PostPosted: Sat Jun 09, 2018 1:25 am
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

Re: Tesla Battery Gateway Plugin

PostPosted: Sat Jun 09, 2018 8:06 am
by jay (support)
Are you going to put it in the Plugin Store? That's where people will be most likely to find it... ;)

Tesla Battery Gateway Plugin

PostPosted: Sat Jun 09, 2018 11:45 pm
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

Re: Tesla Battery Gateway Plugin

PostPosted: Sun Jun 10, 2018 12:58 am
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

Re: Tesla Battery Gateway Plugin

PostPosted: Sun Jun 10, 2018 6:13 am
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!


Sent from my iPhone using Tapatalk

Re: Tesla Battery Gateway Plugin

PostPosted: Sun Jun 10, 2018 8:48 am
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

Re: Tesla Battery Gateway Plugin

PostPosted: Sun Jun 10, 2018 5:02 pm
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!

Re: Tesla Battery Gateway Plugin

PostPosted: Sat Jul 14, 2018 12:52 am
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

Re: Tesla Battery Gateway Plugin

PostPosted: Fri Nov 23, 2018 12:06 pm
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..

Re: Tesla Battery Gateway Plugin

PostPosted: Sat Jun 15, 2019 9:41 pm
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)

Re: Tesla Battery Gateway Plugin

PostPosted: Wed Apr 29, 2020 3:05 pm
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.

Re: Tesla Battery Gateway Plugin

PostPosted: Wed Apr 29, 2020 4:57 pm
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

Re: Tesla Battery Gateway Plugin

PostPosted: Wed Apr 29, 2020 11:03 pm
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

Re: Tesla Battery Gateway Plugin

PostPosted: Wed Apr 29, 2020 11:04 pm
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

Re: Tesla Battery Gateway Plugin

PostPosted: Thu Apr 30, 2020 5:28 am
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 :)