sw-home / fhem-tesla Goto Github PK
View Code? Open in Web Editor NEWMonitor and control your Tesla vehicles in the FHEM smart home environment.
License: GNU Affero General Public License v3.0
Monitor and control your Tesla vehicles in the FHEM smart home environment.
License: GNU Affero General Public License v3.0
Would be nice to open or vent all windows. Especially it doesn't make sense to start HVAC with open windows. As I've seen in the Tesla API there is some possibility.
Script crashes fhem Process each now and then with the following Error:
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE html>\n<ht...") at ./FHEM/49_TeslaCar.pm line 211.
Known bug?
Access to https://owner-api.teslamotors.com/api/1/vehicles returns "Endpoint is only available on fleetapi. Visit https://developer.tesla.com/docs for more info".
see here: teslamate-org/teslamate#3629 (and here https://github.com/teslamate-org/teslamate/pull/3630/files for a workaround)
I was asked (by family) to check whether I could update this program to use the new authentication API as documented here:
However, I currently do not have the required time (I, for example, do not have experience with Perl nor a Tesla account to test with).
My findings are below:
The tesla-api documentation does look like it is sufficiently complete.
In addition, the repo provides an implementation of the API using Ruby:
A diff with the before/after of the authentication implementation can be seen here: https://github.com/timdorr/tesla-api/compare/75e79d34fdbfbfd4ef5978ae45e6bbef96ac4ed5...master?diff=split#
The relevant file is lib/tesla_api/client.rb
.
Observed changes (and rough commentary based on a first glance):
refresh_access_token
:
exchange_sso_access_token
at the endlogin!
exchange_sso_access_token
at the endexchange_sso_access_token
The main job seems to be the parsing/scraping of the HTTP results.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.