mseminatore / teslajs Goto Github PK
View Code? Open in Web Editor NEWAn Unofficial Tesla API library for NodeJS
Home Page: https://www.teslajs.org
License: MIT License
An Unofficial Tesla API library for NodeJS
Home Page: https://www.teslajs.org
License: MIT License
The code clamps to Deg.F values when Deg.C values are passed in resulting in incorrect settings.
Even though calendar doesn't work we should have a test case for it to make sure we are running the code that is there.
This sample makes it look like TeslaJS has more deps than it actually does have.
The err check at the top of vehicles()
, get_command()
and post_command()
are candidates.
They may be spoken so remove underscores that might confuse speech markup.
use a repeating timer to step the SOC from current up to limit.
Update the sample to reflect the new limited options for controlling sunroof position.
Consider adding vehicle(index) and vehicles().
NB: API breaking change
Perhaps as getTeslaModel(vehicle)
or something similar.
Request is awesome. But we don't need all of its features. And more importantly there is currently no library for recording and playback of REST calls which limits testing options.
Explore adding Coveralls code coverage support.
Logging code might be its own package.
For example, if the call is a failure, line 282
log(API_RESPONSE_LEVEL, "\nResponse: " + JSON.stringify(response).magenta);
causes the server to crash. I'd say remove all the colors completely or at least anything that could fail.
Start using jshint to check code for errors.
For example Temperatures, Charge levels, etc.
Some samples do not work if you specify -u or --username on the command line. The error reported is:
tjs.login(email, password, login_cb);
^
ReferenceError: email is not defined
Server returns "already off" failure.
It's pretty standard to return at least an error in a callback function. I've modified it locally to give me the error, response, and body. Either way I have to interpret it but this way I have access to the response.statusCode and the body.response.result.
And trying to parse the body regardless of error and always trying to return the data regardless of result doesn't work in failure cases.
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.