read your tesla
npm install teslac
// get your tokens from mobile app "Auth for Tesla"(ios) or "Tesla Tokens"(android)
teslac(access_token, refresh_token)
.then((tc) =>
tc
.control(
tc.vehicles[0].id,
tc.ownerApi(`/vehicles/${tc.vehicles[0].id}/data_request/charge_state`)
)
.then(console.log)
)
.catch((err) => {
console.log(err)
})