tobiasehlert / teslamateapi

TeslaMateApi is a RESTful API to get data collected by self-hosted data logger TeslaMate in JSON
MIT License
87 stars 21 forks source link

Integration of new fleet api #255

Open pkuehnel opened 8 months ago

pkuehnel commented 8 months ago

From now on, new vehicles do not support the old Tesla owner's API. From 2024 onward, no cars will support the current API.

Detailed plan here: https://developer.tesla.com/docs/fleet-api#2023-11-17-rest-api-vehicle-commands-endpoint-deprecation-timeline-action-required

tobiasehlert commented 8 months ago

Ah nice catch, there is a discussion on that as well in #254 and @LelandSindt might already have taken a look too.

LelandSindt commented 6 months ago

@pkuehnel -- are you seeing failures? --- what commands are you using?

pkuehnel commented 6 months ago

I got rid of Teslamateapi and implemented the new fleet api by myself (at least what I need), see here

I created a Dev Account at Tesla as well and am hosting a service so everyone using TeslaSolarCharger can create a Token from the application. All requests for cars that require the FleetAPI proxy as well are auto transmitted to my self hosted FleetAPI proxy.

kirichkov commented 2 months ago

For a few days now, my attempts to start/stop charging and change charge current started returning 403. TeslaMate is still able to pull data, but it appears commands are being rejected with 403 status.

LelandSindt commented 2 months ago

Just tested, it looks like the wake command worked, but the /api/v1/cars/1/command/auto_conditioning_start command failed with a 403... I figured it was just a matter of time... I usually only use this automation in the winter time, so it may have been broken for some time.

@tobiasehlert --- it might be time to pull the command portion of this service out... I don't anticipate having time or reason to migrate it to the new supported methods any time soon.

kimmilde commented 2 months ago

The commands are not working longer. I'm using teslamatapi to adjust charging speed, 403 response

kirichkov commented 2 months ago

Apparently the wake command via the HTTP API will likely remain working, as it requires no authentication. All other commands will require authentication from now on, so 403 should mean that we should be using the FleetAPI

As I was using TeslaMateAPI to control charging, I'm now looking into controlling charging via BLE, as it will likely be faster to adjust charging amps.

uqs commented 1 month ago

It would be great to have this working in teslamateapi! I had excess solar charging working use the tesla binding in OpenHAB and that worked well, but my car now also needs the Fleet API as of a few months.

I have Teslamate and teslamateapi running and was just about to migrate over to reading that via MQTT and sending commands for my charging rules over to using teslamateapi, but alas the error is "Tesla Vehicle Command Protocol required, please refer to the documentation here: https://developer.tesla.com/docs/fleet-api#2023-10-09-rest-api-vehicle-commands-endpoint-deprecation-warning"

Did someone look at the proxy that Tesla is offering yet?

Or can I poke Teslamate more directly to send these commands for me? I don't think it can do things like start_charging out of the box, can it?