Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

TeslaMS tools for telemetry data visualization

This site may earn commission on affiliate links.
Ok, that worked... I was following the instructions off the github page, which says:



I thought that just going to the root of the server would give me useful options / a map based on that. :)

Is there any way to generate the sample map that is showed by the instructions for the streaming API (the one with location / the path of the car)?

I get a display for energy and for stats but for maps I don't get the correct location. Dirk, am I using the right URLs?

stats URL - http://localhost:8766/stats?from=2013-08-24-00-00-00&to=2013-08-25-23-59-59
energy URL - http://localhost:8766/energy?from=2013-08-24-00-00-00&to=2013-08-25-23-59-59
maps URL - http://localhost:8766/?from=2013-08-24-00-00-00&to=2013-08-25-23-59-59
 
I thought that just going to the root of the server would give me useful options / a map based on that. :)
Yes, that's what it should do (and will do after I had a moment to write the code).
Is there any way to generate the sample map that is showed by the instructions for the streaming API (the one with location / the path of the car)?
Sure - click on the map link once you have it up. Or go directly to the root URL:
http://localhost:8766/?from=2013-08-25-10-30-00&to=2013-08-25-11-30-00
for your driving today between 10:30 and 11:30
 
I have created a "friendly" welcome page that is displayed at the root URL '/' - and moved the map to '/map'.
At least the root URL is now happy with no ?from=...&to=... and picks reasonable defaults; it also has date / time pickers for the user to modify those defaults - and then has links to the other three pages.

This has been submitted as pull request to Hans...

BTW: is there anyone here with some graphical talent who'd be willing to help with a few icons? My graphical capabilities are completely non-existent (as the UI so far should demonstrate sufficiently) :)

Screen Shot 2013-08-25 at 5.20.11 PM.png


- - - Updated - - -

I get a display for energy and for stats but for maps I don't get the correct location. Dirk, am I using the right URLs?

stats URL - http://localhost:8766/stats?from=2013-08-24-00-00-00&to=2013-08-25-23-59-59
energy URL - http://localhost:8766/energy?from=2013-08-24-00-00-00&to=2013-08-25-23-59-59
maps URL - http://localhost:8766/?from=2013-08-24-00-00-00&to=2013-08-25-23-59-59
Yes, those are the old ones - my pull request changes the map one from '/?from...' to '/map?from...'
Can you tell me what exactly you are getting when you try this? Maybe with a screen shot?

I have occasionally had the marker show up in the wrong place - still need to debug that one.
 
Updated the README for the new URLs, merged the changes, and published to npm as version 0.6.7.

Installed and tested fine for me.

I still have some issues with the callout on the maps not pointing to the right place (particularily after zooming in/out) and the pushpin displays correctly at first, but then disappears.

Everything else looks great so far.
 
One other thing: I have mongodb 2.0.4 installed on my Linux host and NPM refuses to install teslams without --force because acceptable versions only go to "1.2.8".

npm ERR! message No compatible version found: mongodb@'>=1.3.14- <1.4.0-'
npm ERR! message Valid install targets:
npm ERR! message ["0.9.4","0.9.4-4","0.9.3","0.9.1","0.9.2","0.9.6-7","0.9.6-8","0.9.6-9","0.9.6-10","0.9.6-11","0.9.6-12","0.9.6-13","0.9.6-14","0.9.6-15","0.9.6-16","0.9.6-17","0.9.6-18","0.9.6-19","0.9.6-20","0.9.6-21","0.9.6-22","0.9.6-23","0.9.7","0.9.7-0","0.9.7-1","0.9.7-1.1","0.9.7-1.2","0.9.7-1.3","0.9.7-1.4","0.9.7-2","0.9.7-2-1","0.9.7-2-2","0.9.7-2-3","0.9.7-2-4","0.9.7-2-5","0.9.7-3","0.9.7-3-1","0.9.7-3-2","0.9.7-3-3","0.9.7-3-4","0.9.7-3-5","0.9.8","0.9.8-1","0.9.8-2","0.9.8-3","0.9.8-4","0.9.8-5","0.9.8-6","0.9.8-7","0.9.9","0.9.9-1","0.9.9-2","0.9.9-3","0.9.9-4","0.9.9-5","0.9.9-6","0.9.9-7","0.9.9-8","1.0.0","1.0.1","1.0.2","1.1.0-beta","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8","1.1.9","1.1.10","1.1.11","1.2.0","1.2.1","1.2.2","1.2.3","1.2.4","1.2.5","1.2.6","1.2.7","1.2.8"]

pjorkypjg:~$ dpkg -l | grep mongo
ii mongodb 1:2.0.4-1ubuntu2.1 object/document-oriented database (metapackage)
ii mongodb-clients 1:2.0.4-1ubuntu2.1 object/document-oriented database (client apps)
ii mongodb-dev 1:2.0.4-1ubuntu2.1 object/document-oriented database (development)
ii mongodb-server 1:2.0.4-1ubuntu2.1 object/document-oriented database (server package)

After force:


EDIT: Either the server's down in a fantastic coincidence or something isn't right in 0.6.7... immediately after replacing 0.6.6 with 0.6.7, it started with an auth error:

database name tesla
timestamp,speed,odometer,soc,elevation,est_heading,est_lat,est_lng,power,shift_state,range,est_range
[Error: Tesla returned authentication error. Either password is wrong, or Tesla Auth service may be down]
Warn: no tokens returned, calling wake_up then trying again
[Error: Tesla returned authentication error. Either password is wrong, or Tesla Auth service may be down]
Warn: no tokens returned, calling wake_up then trying again
 
Last edited:
Updated the README for the new URLs, merged the changes, and published to npm as version 0.6.7.

Installed and tested fine for me.

I still have some issues with the callout on the maps not pointing to the right place (particularily after zooming in/out) and the pushpin displays correctly at first, but then disappears.

Everything else looks great so far.
'callout'... you mean the pin? Yes, I had that, too. Haven't figured out why, yet.
Also, how should I change the 'relative file paths' so this can be started from a different directory.
 
'callout'... you mean the pin? Yes, I had that, too. Haven't figured out why, yet.
Also, how should I change the 'relative file paths' so this can be started from a different directory.

When I say callout I mean the bubble with the text (usually pointing at the pushpin). When the pushpin disappears, the callout remains and is pointing to nothing. will post pics later to make it clear..
 
I have been able to get everything to work, except for the "Voltage and current while charging" graph is blank for me. I am storing all my streaming data to Mongodb, but those two parameters are not part of what "streaming" captures. How are you collecting the data for those items and integrating it into your graphs?

These tools have been fun to work with, thanks for your hard work!
 
I have been able to get everything to work, except for the "Voltage and current while charging" graph is blank for me. I am storing all my streaming data to Mongodb, but those two parameters are not part of what "streaming" captures. How are you collecting the data for those items and integrating it into your graphs?

These tools have been fun to work with, thanks for your hard work!

This may not apply to you, but...

If you upgraded, have you restarted streaming.js? If you're running the old streaming.js from 0.6.5 or previous versions, it won't show anything (at least it didn't for me). You have to start streaming.js from later versions to publish car data into the database and also collect some charging data.
 
This may not apply to you, but...

If you upgraded, have you restarted streaming.js? If you're running the old streaming.js from 0.6.5 or previous versions, it won't show anything (at least it didn't for me). You have to start streaming.js from later versions to publish car data into the database and also collect some charging data.

Correct. I added more data to the database a couple of versions ago. There's also climate data stored that I'm not plotting, yet.

I pushed some very cool map updates to Hans last night - you can now interactively control the speedup in map mode and so the replay. It also does a much better job when covering live data (when someone else is driving, or for yourself when run from the car browser).
 
Correct. I added more data to the database a couple of versions ago. There's also climate data stored that I'm not plotting, yet.

I pushed some very cool map updates to Hans last night - you can now interactively control the speedup in map mode and so the replay. It also does a much better job when covering live data (when someone else is driving, or for yourself when run from the car browser).

I had version 0.6.8 installed and restarted streaming.js.
When it starts it lists the following default values being collected "timestamp,speed,odometer,soc,elevation,est_heading,est_lat,est_lng,power,shift_state,range,est_range" Is there another string of values and order I need to add to the command line to port them into the DB?
 
I had version 0.6.8 installed and restarted streaming.js.
When it starts it lists the following default values being collected "timestamp,speed,odometer,soc,elevation,est_heading,est_lat,est_lng,power,shift_state,range,est_range" Is there another string of values and order I need to add to the command line to port them into the DB?
These don't come from the streaming API - we are (very carefully) making calls to the REST API to get charge and climate data.
0.6.8 definitely has that code.
You can check if the data is recorded
mongo
use tesla (<- assuming that's the database name you use)
db.tesla_aux.count()

if this shows documents are in the database, then the streaming app is recording the climate and charging data
 
Thanks for developing this. I am using streaming.js to collect data by using nssm as a service as described above. I had a question whether anyone has integrated this with home automation software such as homeseer. Right now I am working with the developer of a plugin/script for homeseer called Snevllatitude which uses location data to trigger events such as the garage door opening when you arrive, turning the lights off when you leave, etc... I know very little about programming. He was thinking of doing it in 1 of 2 ways:


  1. He could create a script that went and pulled the data from the mother ship, and it would then queue up some data and trigger the main Snevl Latitude script to ingest the data.
  2. He could create a ASPX web page that you could call with some GET args. The ASPX would essentially do the same thing after that, putting the data someplace for the main Snevl Latitude script to find, and then trigger the script.

Anyone have any input on which direction or alternatives they would choose?
 
Thanks for developing this. I am using streaming.js to collect data by using nssm as a service as described above. I had a question whether anyone has integrated this with home automation software such as homeseer. Right now I am working with the developer of a plugin/script for homeseer called Snevllatitude which uses location data to trigger events such as the garage door opening when you arrive, turning the lights off when you leave, etc... I know very little about programming. He was thinking of doing it in 1 of 2 ways:


  1. He could create a script that went and pulled the data from the mother ship, and it would then queue up some data and trigger the main Snevl Latitude script to ingest the data.
  2. He could create a ASPX web page that you could call with some GET args. The ASPX would essentially do the same thing after that, putting the data someplace for the main Snevl Latitude script to find, and then trigger the script.

Anyone have any input on which direction or alternatives they would choose?

I have a few similar location based application ideas but I really do not want to send all my Tesla telemetry data to someone else.

#1 above is out of the question for me because I would have to give away my Tesla login and password or the script wouldn't work. In #2 I would just be giving away my car's location, which is not as bad but still somewhat sensitive info.

I was going to use Locale, which is an Android app that runs on a phone and uses the phones location to trigger scripted events. There is a REST plug in so it can call an external API to trigger things either on the Tesla, or in the home automation service.
I created a rule that detects when my phone is connected to the cars Bluetooth so it can know when I am driving my car, rather than my wife's car.

My hope was that once Tesla gives us an SDK for writing apps that run on the car, I could write something like Locale as a Tesla console app.
 
I don't think I would be giving anyone my login info with either example above as the scripts and aspx page would be running on
My computer/homeseer, it wouldn't be open to the outside world.

To "pull the data from the mother ship" he'd need your credentials.
But it would be feasible to add code to streaming.js that calls a different REST api once the car enters our leaves a certain area.

What kind of user interface do you have in mind? Would it be enough if we told you "enter location and radius plus the REST call to make in a config file"? That wouldn't be too hard, frankly.