teslajson icon indicating copy to clipboard operation
teslajson copied to clipboard

Streaming

Open kendo55 opened this issue 6 years ago • 5 comments

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

kendo55 avatar Feb 26 '19 18:02 kendo55

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

ejsuncy avatar Feb 26 '19 19:02 ejsuncy

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 [email protected].

Rgds

racket99 avatar Feb 27 '19 04:02 racket99

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 avatar Feb 27 '19 07:02 kendo55

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

kendo55 avatar Feb 27 '19 07:02 kendo55

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"

kendo55 avatar Feb 27 '19 14:02 kendo55