gglockner / teslajson

Simple Python class to access the Tesla JSON API
MIT License
148 stars 54 forks source link

Streaming #17

Open kendo55 opened 5 years ago

kendo55 commented 5 years ago

does anyone have experience with the streaming of vehicle data. Is there an example in Python?

ejsuncy commented 5 years ago

I don’t, but I’m curious what your use case would be...

racket99 commented 5 years ago

I created SigTwo and I am adding to it everyday. Combines telemetry data and video imagery into one platform.

I have a guest account that I can give you access to. Just ping me at racket99@gmail.com.

Rgds

kendo55 commented 5 years ago

I don’t, but I’m curious what your use case would be...

to have a stream of the telemetry data, like string url = "https://streaming.vn.teslamotors.com/stream/" + Tesla_vehicle_id + "/?values=speed,odometer,soc,elevation,est_heading,est_lat,est_lng,power,shift_state,est_range";

kendo55 commented 5 years ago

someone who knows a link with the documentation of https://streaming.vn.teslamotors.com/stream/"

kendo55 commented 5 years ago

i have the solution:

r = requests.get("https://streaming.vn.teslamotors.com/stream/" + str(Tesla_vehicle_id) + "/?values=speed,odometer,soc,elevation,est_heading,est_lat,est_lng,power,shift_state,est_range", data={}, auth=(TeslaName, Tesla_Streamingtoken), stream=True)

for line in r.iter_lines(): if line: # keep-alive zeilen ausfiltern

    print line

print "Stream end"