Separate names with a comma.
Discussion in 'Model S: User Interface' started by timdorr, Feb 2, 2013.
Does the actuate_trunk work on Model S / Model X? Always get invalid_value when trying.
Yep they work.
How are you sending the API request? More often than not your implementation is wrong.
Thank you for replying
I use this: https://owner-api.teslamotors.com/api/1/vehicles/<vehicleid>/command/actuate_trunk?which_trunk=rear
All other commands work.
Your request likely looks like:
POST /api/1/vehicles/zzzzzzz/command/actuate_trunk?which_trunk=rear HTTP/1.1
Authorization: Bearer xxxxx
with your values for x,y,z....
I duplicated your current result of:
Instead of passing the commend as parameter on the url just pass them as value in the body. Note the additional Content-Type header and its value to indicate the type of data you are passing in the body for the POST request
POST /api/1/vehicles/zzzzzz/command/actuate_trunk HTTP/1.1
Authorization: Bearer xxxxxx
Which yields a valid response:
Perfect! Got it working. Thanks
I have done an `npm publish` of the latest teslams.js (version 1.3.0) so it should work from either source on github or via `npm install`.
Special thanks to cbrandlehner for the fix.
Tesla Control lets you schedule start and stop times. It’s done with background tasks.
I can find the start/stop charging commands (no details about what the httpbody payload should be though?)... however, is there such a command that could set the charging current remotely? I haven't seen one in the official app but I'm wondering if an API for it exists (or if someone managed to sniff one out)?
Unfortunately not. This is a holy grail I have been waiting for (And tweeting Elon).
If the API allowed us to set the charge rate, I could utilise much more of my solar export by keeping the charge rate the same as solar excess.
EXACTLY the reason why I asked for it too Tweet him again, I'd imagine we're not the only ones thinking about this... Since my solar inverter can't work in island mode, and I can't send any predetermined amount of power towards the car first before exporting excess, having the car "pull" a corresponding amperage out of the inverter in line with solar output seems to make a lot of sense!
I'm guessing you already tried obvious stuff like command/set_charge_current (as opposed to set_charge_limit) just to see if the API actually exists right? (i just tested it now, got a 400 bad request).. that makes me think, i wonder what other hidden APIs there are.. possible able to just guess a bunch i think
Mate it doesn't exist
There's a different way to achieve this, by using the load sharing protocol of the Tesla Wall Connector. (This requires wiring something to the wall connector.) There's a thread here:
New Wall Connector load sharing protocol
And source code here:
Nice! But unfortunately my car is 2015, so is my HPWC... so I can only assume it's the "older" model with older firmware/hardware that can't run that... and it wouldn't be as precise as the car controlling draw either, because HPWC selector is still in stepped amps, whereas car is single digit amp changes... really wish an API was available! What about canbus message within the car? anyone?
It requires a second generation wall connector, but I believe it will work with any Model S/X/3.
That's doable, as the car is the one that talks to EVSE and requests the current
Don't know if anyone here cares, but the newest firmware 46.x changed the timestamp format for charging start time again. It's back to long-UNIX style UTC, no longer readable with the "T" in the middle. Re-broke some of my scripts after the update. Just had to go back to before Nov. 2 to see what I had changed so that I could undo it.
I had coded Tesla Control to handle both formats guessing they would switch back at some point.