·

Lights, Dashcam, Solar

New vehicle commands endpoint you won't find anywhere else.

I'm excited to announce that Teslemetry has expanded its API capabilities with several new endpoints that provide new controls for Tesla vehicles. These new additions allow for functions that were previously unavailable through standard APIs or other third-party services, giving Teslemetry users more ways to interact and automate their vehicles.

New Custom Command Endpoints

The following custom command endpoints should work on all modern Tesla vehicles that support command signing. This excludes legacy Model S/X from 2021 and earlier.

Charge on Solar

This endpoint allows you to enable or disable charging based on solar production, with customizable lower and upper charge limits.

curl 'https://api.teslemetry.com/api/1/vehicles/{vin}/custom_command/charge_on_solar' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer ACCESS_TOKEN' \
  --data '{
  "enabled": true,
  "lowerChargeLimit": 50,
  "upperChargeLimit": 90
}'

You can set the lower charge limit (charge from any source) and upper charge limit to fine-tune when your vehicle charges from solar power or the grid.

Dashcam Save

This endpoint allows you to remotely save the last 10 minutes of dashcam footage, which can be particularly useful in situations where you might want to preserve video evidence.

curl 'https://api.teslemetry.com/api/1/vehicles/{vin}/custom_command/dashcam_save' \
  --request POST \
  --header 'Authorization: Bearer ACCESS_TOKEN'

Play Video

Want to start a video on your Tesla's screen remotely? Now you can with this endpoint that accepts a supported video URL.

curl 'https://api.teslemetry.com/api/1/vehicles/{vin}/custom_command/play_video' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer ACCESS_TOKEN' \
  --data '{
  "url": "https://www.youtube.com/watch?v=BO1XXRwp3mc"
}'

Light Show Controls

Two new endpoints give you control over your Tesla's light show feature:

Start Light Show

curl 'https://api.teslemetry.com/api/1/vehicles/{vin}/custom_command/start_light_show' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer ACCESS_TOKEN' \
  --data '{
  "show_index": 1,
  "start_time": 1714824000000,
  "volume": 0.8,
  "dance_moves": true
}'

This endpoint allows you to select a specific light show by index, set the start time (in milliseconds since epoch), adjust the volume, and even enable or disable dance moves.

Stop Light Show

curl 'https://api.teslemetry.com/api/1/vehicles/{vin}/custom_command/stop_light_show' \
  --request POST \
  --header 'Authorization: Bearer ACCESS_TOKEN'

This simple endpoint allows you to immediately stop any currently running light show.

Improvements to existing commands

The remote_boombox command has had an issue for a long time where it could not be called on newer vehicles that require command signing. Well this is no longer the case and vehicles old and new should be able to fart remotely. The steering wheel heater levels and auto mode endpoints have also had command signing implemented, ensuring they will work properly.

More to come

Expect even more new capabilities to be added to the API soon, and all these new features will be coming to Home Assistant in the near future too. For detailed documentation on the new API endpoints, visit api.teslemetry.com/docs.