Python script for Tesla actions
Posted: Sunday 28 April 2019 0:02
Hi,
Could this python script work in Domoticz?
This is an exported script from "postman program" to Python.
My goal is to do some actions with a virtual switch in Domoticz to control a Tesla.
********************************************************************************************************************************
import requests
url = "https://owner-api.teslamotors.com/api/1 ... /honk_horn"
payload = ""
headers = {
'Authorization': "Bearer 1234567890",
'User-Agent': "PostmanRuntime/7.11.0",
'Accept': "*/*",
'Cache-Control': "no-cache",
'Postman-Token': "abcde",
'Host': "owner-api.teslamotors.com",
'accept-encoding': "gzip, deflate",
'content-length': "",
'Connection': "keep-alive",
'cache-control': "no-cache"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
*********************************************************************************************************************************
Thanks
Could this python script work in Domoticz?
This is an exported script from "postman program" to Python.
My goal is to do some actions with a virtual switch in Domoticz to control a Tesla.
********************************************************************************************************************************
import requests
url = "https://owner-api.teslamotors.com/api/1 ... /honk_horn"
payload = ""
headers = {
'Authorization': "Bearer 1234567890",
'User-Agent': "PostmanRuntime/7.11.0",
'Accept': "*/*",
'Cache-Control': "no-cache",
'Postman-Token': "abcde",
'Host': "owner-api.teslamotors.com",
'accept-encoding': "gzip, deflate",
'content-length': "",
'Connection': "keep-alive",
'cache-control': "no-cache"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
*********************************************************************************************************************************
Thanks