Unlocks and allows driving of Tesla Model 3.
Requires two other shortcuts, Get My Access Token and Get Vehicle ID. See the Tesla Triggers Collection.
Why? Because the Tesla triggers my phone to start playing podcasts even when that is not the selected source or just when I walk by the car so I tend to leave phone Bluetooth off and so do not have a phone key. This shortcut requires me to type in my Tesla account password in addition to obtaining the access token given the embedded Tesla account credentials. Warning: this is not a secure method.
Что нового
First release
Что делает
Действий: 10-
Run ShortcutGet My Access Token
-
Text
-
Run ShortcutGet Vehicle ID
-
URLhttps://owner-api.teslamotors.com/api/1/vehicles/…/wake_up
-
Get Contents of URL
-
URLhttps://owner-api.teslamotors.com/api/1/vehicles/…/command/door_unlock
-
Get Contents of URL
-
Text
-
URLhttps://owner-api.teslamotors.com/api/1/vehicles/…/command/remote_start_drive?password=…
-
Get Contents of URL
Посмотреть как код
Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.
#include 'actions/web'
#define color darkblue
#define glyph car
const access_token = runSelf()
const vehicle_id = runSelf()
url("https://owner-api.teslamotors.com/api/1/vehicles/{vehicle_id}/wake_up")
fileRequest("", "POST", {
"Authenticate": "Bearer {access_token} "
})
url("https://owner-api.teslamotors.com/api/1/vehicles/{vehicle_id}/command/door_unlock")
fileRequest("", "POST", {
"Authenticate": "Bearer {access_token}"
})
const password = "nil"
url("https://owner-api.teslamotors.com/api/1/vehicles/{vehicle_id}/command/remote_start_drive?password={password}")
fileRequest("", "POST", {
"Authenticate": "Bearer {access_token}"
})
Оценки и отзывы
Написать отзывПока нет отзывов. Поделись мнением первым!