Tesla Battery Gateway Plugin

Posted on
Mon Feb 22, 2021 9:25 am
roquej offline
User avatar
Posts: 607
Joined: Jan 04, 2015
Location: South Florida, USA

Re: Tesla Battery Gateway Plugin

Sure enough, it stopped working again. Will keep monitoring and keeping my fingers crossed for a more stable solution.

Again, thank you.

JP

Posted on
Mon Feb 22, 2021 2:09 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

Tesla Battery Gateway Plugin

roquej wrote:
Sure enough, it stopped working again. Will keep monitoring and keeping my fingers crossed for a more stable solution.

Again, thank you.

JP

Interesting, mine is still working fine - there are few more versions along on GitHub, just tidy up really; nothing material to the api issues as yet.

You will probably find by restarting it fixes the problem.

https://github.com/timdorr/tesla-api/issues/260

The Tesla server changes are causing everyone issues, it appears their WAF is undergoing some changes.

Now I thought WAF = Wife acceptance factor ; but apparently that had little to do with it more, web application firewall!

Edit:
Have seen this now, and its for local connections.
Believe probably because session not being destroyed/recreated; will add some changes asap

Sent from my iPad using Tapatalk

Posted on
Mon May 31, 2021 5:17 pm
roquej offline
User avatar
Posts: 607
Joined: Jan 04, 2015
Location: South Florida, USA

Re: Tesla Battery Gateway Plugin

Started getting this errors:

Tesla Battery Error Caught Login Exception GetTokenfromLogin
Traceback (most recent call last):
File "plugin.py", line 809, in GetTokenFromLoginPW
code = parse_qs(resp.headers["location"])["https://auth.tesla.com/void/callback?code"]
File "/Library/Application Support/Perceptive Automation/Indigo 7.5/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/structures.py", line 56, in __getitem__
return self._store[key.lower()][1]
KeyError: 'location'

Any ideas?

JP

Posted on
Mon May 31, 2021 5:49 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

Tesla Battery Gateway Plugin

roquej wrote:
Started getting this errors:

Tesla Battery Error Caught Login Exception GetTokenfromLogin
Traceback (most recent call last):
File "plugin.py", line 809, in GetTokenFromLoginPW
code = parse_qs(resp.headers["location"])["https://auth.tesla.com/void/callback?code"]
File "/Library/Application Support/Perceptive Automation/Indigo 7.5/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/structures.py", line 56, in __getitem__
return self._store[key.lower()][1]
KeyError: 'location'

Any ideas?

JP
Hi

Unfortunately not. I have worked backwards and worked out that you seem to be using that latest GitHub version?

I do not see that error and is working correctly at my end.

The Tesla api changes have largely seem to have settled down and all has been working well for past month or so. Except for this report.

May be a oneof local issue, but very hard to tell from this limited error message. Happy to look at longer debug log, but may pay to wait it out.

Edit:

Seems like Tesla has added a captcha to the login page 3 days ago.
Pretty much killing any 3rd party integration like this and everything else.
Lots of complaints.
Hasn’t rolled on to me as yet - but presume that is what you are seeing.
Not sure will be any easy fix.

The only option at the moment seems to be to register for a captcha account (which is cheap 50c 1000 solves) and modify code to use this. To me, huge backwards step, hopefully Tesla organises app registration or something similar….

Glenn


Sent from my iPad using Tapatalk

Posted on
Mon May 31, 2021 7:47 pm
roquej offline
User avatar
Posts: 607
Joined: Jan 04, 2015
Location: South Florida, USA

Re: Tesla Battery Gateway Plugin

Thank you, Glenn. Keeping my fingers crossed you can find a solution. This is a major part of my system, as I use it with Graphana to keep track of all my home details.

JP

Posted on
Mon May 31, 2021 10:55 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Hi

Can try the new github version 0.7.9

Adds a allow online communication button to PluginConfig. Disabled by default.

This means:
Wont be able to change modes of Powerwall, backup levels, autonomous, back mode etc.
BUT
All data collection importing, exporting, usage, generation, state of battery all reported.

So basically - will remove all related error messages (which currently are somewhat cosmetic)

Will see what dust settles from Tesla changes.

Gklenn

Posted on
Tue Jun 01, 2021 10:06 am
roquej offline
User avatar
Posts: 607
Joined: Jan 04, 2015
Location: South Florida, USA

Re: Tesla Battery Gateway Plugin

The latest update took care of all the errors.

Thank you!

JP

Posted on
Sat Jun 05, 2021 6:36 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Further to this:

Looks like currently Tesla has removed the captcha requirement from it's login.

So above plugin works, including enabling allow online control button.

Up to tesla how long this continues

Posted on
Thu Jun 17, 2021 5:32 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

Tesla Battery Gateway Plugin

New Release; in Plugin Store

0.7.9

- Changes to allow ongoing Tesla API access
- Add option of disabling Tesla Online access - recommended currently given API access issues
This:
Allows full local data retrieval from Powerwall, DOES NOT ALLOW Mode changes
Currently API is back working, but may change and this gives option to disable this if not being used; avoids error messages in future.

Fix for Action groups (some merge/rebase somewhere used old Actions.xml - hopefully the only issue)

Posted on
Sun Mar 26, 2023 9:02 am
roquej offline
User avatar
Posts: 607
Joined: Jan 04, 2015
Location: South Florida, USA

Re: Tesla Battery Gateway Plugin

Last plugin I use not on Python 3! Do you think it will happen before the next Indigo version?

Thank you!

JP

Posted on
Sun Mar 26, 2023 2:16 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

Tesla Battery Gateway Plugin

Hi

Yep - there is a python3 version that I have been using locally for some time.

The tesla API kept having backend changes when was updating it - which at the time I gave up as kept working/not working as they altered something day at a time. The non API, local stuff works fine - just not the control of the Battery without API access.

Also - the method to get API access changed to using a one-app and entering a refreshToken. Something that I haven’t documented., so need to do so as well..

On re-enabling the API side now —> fails again. Hopefully the changes at their end have stopped and will have another look. But everything else is working fine!

Glenn


Sent from my iPad using Tapatalk

Posted on
Sat Oct 14, 2023 4:09 pm
roquej offline
User avatar
Posts: 607
Joined: Jan 04, 2015
Location: South Florida, USA

Re: Tesla Battery Gateway Plugin

Well, with the latest version of Indigo, the plugin is no longer supported (Python2). Any plans for that Python 3 version?

JP

Posted on
Sat Oct 14, 2023 4:14 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

Tesla Battery Gateway Plugin

Hi

There is a python 3 version


Check out GitHub

https://github.com/Ghawken/TeslaBattery ... e/python3_

Just not released and needs token generated from an app for online access/control. Not sure have completely documented that aspect - but mine is been running fine for a while.

Although just re-tested and the online aspect has changed once again. The local reporting works without needing online access - which is primarily my usage. I’m getting an access_token error currently when enabling the online aspects.

I’ll have a look and see if easily fixable, but leave online disabled and rest is converted and working fine under python3.


Glenn


Sent from my iPhone using Tapatalk

Posted on
Sun Oct 15, 2023 11:31 am
roquej offline
User avatar
Posts: 607
Joined: Jan 04, 2015
Location: South Florida, USA

Re: Tesla Battery Gateway Plugin

Glenn,

Thank you! I am using local access, too, and everything works as before. I can also test the online connection once you get that working.

JP

Posted on
Sun Oct 15, 2023 11:00 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Tesla Battery Gateway Plugin

Have checked - and my latest version for python3 was running okay for online connection, but have pushed update 0.8.11 and released to Plugin Store - with bit about getting Refresh Token if wish to use online connection

Glenn


Sent from my iPad using Tapatalk

Who is online

Users browsing this forum: No registered users and 1 guest