timdorr / tesla-api

🚘 A Ruby gem and unofficial documentation of Tesla's JSON API for the Model S, 3, X, and Y.
https://tesla-api.timdorr.com/
MIT License
1.98k stars 532 forks source link

Powerwall API changes orphan downstream home assistant projects #761

Closed Viss closed 9 months ago

Viss commented 9 months ago

Hello!

Sometime yesterday afternoon teslas api "just changed", and a boatload of folks who are using it to manage their installation with home assistant suddenly were left with a non-functioning setup. Lots of folks are using these api endpoints to impersonate the mobile app and do things like turn on or off grid charging, or set their powerall modes.

There's been a lengthy discussion on this thread, for that project: https://github.com/alandtse/tesla/issues/724 and it's owner has directed us here in the hopes that we can figure out what changed to update that home assistant integration code.

any help would be greatly appreciated!

purcell-lab commented 9 months ago

Looks like the BATTERY endpoints have gone offline, SITE and ENERGY endpoints still seem to be functional.

$ python3 ./cli.py -e mark@purcell.id.au -z BATTERY_DATA
Traceback (most recent call last):
  File "/home/mark/./cli.py", line 221, in <module>
    main()
  File "/home/mark/./cli.py", line 122, in main
    print(product.api(command, **command_data))
  File "/usr/local/lib/python3.9/dist-packages/teslapy/__init__.py", line 726, in api
    return self.tesla.api(name, pathvars, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/teslapy/__init__.py", line 363, in api
    return self.request(endpoint['TYPE'], uri, serialize,
  File "/usr/local/lib/python3.9/dist-packages/teslapy/__init__.py", line 155, in request
    response.raise_for_status()  # Raise HTTPError, if one occurred
  File "/usr/lib/python3/dist-packages/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 410 Client Error: https://powergate.prd.sn.tesla.services:443/api/powerwalls/1152100-14-J--CN321293G4J50D/fullstatus => Gone for url: https://owner-api.teslamotors.com/api/1/powerwalls/STE20220321-00093
timdorr commented 9 months ago

Unfortunately, I don't have any control over the API. This is just unofficial documentation of it. Nor do I have anything to do with Home Assistant. This repo is not the place to have this fixed, as there's nothing we can do from here. Sorry, but you'll have to look at Alan's repo instead.

alandtse commented 9 months ago

Sorry about that Tim; since I don't have a powerwall I pointed out that API changes may be already shared here. Didn't intend for people to open an issue on you.