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.
Thanks for the work on this project. I finally got around to setting it up, but since I don't have any 24/7 computers, I installed it on my NAS device running an archaic Debian version. For anyone trying this, the node package forever is great for setting node apps to run as daemons and static lib installs of mongodb work around problems of building with <4.2 gcc.
 
Oh you are so welcome. I'm having FUN. I just hope this is useful for others, too. As I said, looking for feedback.

I noticed there is a "Trip" button in the latest version. I have been able to get it to record a trip and name it, but haven't figured out if it saves it anywhere or how to recall an old trip.

- - - Updated - - -

Can you run this again, with a different db name?
Code:
use true
db.tesla_stream.count()
If that shows you data present, then just run the visualize.js script with "--db true" and things should work (I'll help you later to move this into the "tesla" database... I'm about to leave on an all day road trip...)
Due to some mishaps, my data is now split into two separate databases. Do you have a quick way to merge the two DB files into one?

I have been having a blast collecting and using this info. Great work!
 
I noticed there is a "Trip" button in the latest version. I have been able to get it to record a trip and name it, but haven't figured out if it saves it anywhere or how to recall an old trip.
That's work in progress, waiting for people who'd actually use it (it was a request from a new owner who hasn't taken delivery, yet).
The trips are stored in the database. Open the mongo shell and issue this command to see what was stored:
Code:
db.trip_data.find()
The goal is to have yet another page that allows you to query that database and provide this to the user in a much more friendly manner... but as I said, waiting for feedback if this is the data that people need...

- - - Updated - - -

Due to some mishaps, my data is now split into two separate databases. Do you have a quick way to merge the two DB files into one?
Yes, this requires some database operations. I had to do the same and just looked it up online...
Code:
mongodump --db wrongdb --out ./transfer
mongorestore --db tesla ./transfer/wrongdb
So you dump into ./transfer and it creates a directory with the name of the wrong database in there. And you simply restore that data into the tesla database. It doesn't overwrite the existing database but instead adds to it.
I have been having a blast collecting and using this info. Great work!
I'm glad you are enjoying this. I am still waiting to see others post their graphs :)
 
I'm glad you are enjoying this. I am still waiting to see others post their graphs :)

Capture.JPG
 
@moviemaker2000 -- you are running an old version of streaming.js, I think, so your database doesn't have a lot of chargeState entries (I changed the logic for that a few weeks ago). Also there are clearly some ODD things happening in the second graph... those diagonal lines look very strange.
Thanks for posting!
 
@moviemaker2000 -- you are running an old version of streaming.js, I think, so your database doesn't have a lot of chargeState entries (I changed the logic for that a few weeks ago). Also there are clearly some ODD things happening in the second graph... those diagonal lines look very strange.
Thanks for posting!
That was a graph going back to 8/19 so the first part utilized an older version of streaming.js. I updated about 8/29 and you can see where the extra charging data started collecting.

Those diagonal lines are two times when my "collection server" went offline. It appears that when I fired up the program again, it wanted to make sense of the data gap and drew a straight line between the last point collected and first point when restarted.
 
I can share some data as well.

Here is four day trip from San Jose CA to Ventura CA via Highway 101. The total trip was 860 miles.

We stopped at the Atascadero and Buellton SC's on both directions and had to make a quick pitstop to use the Gilroy SC on the return as I encountered very strong headwinds and burned up with my range with an 401 Wh/mile stretch. One thing to note is that we did seem to capture the SC's voltage at 370V but never actually recorded current readings. Yet the graphs show 90KW charging runs.

One question I do have does the streaming API capturing distance ? It would cool to plot Wh/m or Kw/100KM's along with the SOC and rated miles.

Cheers,
Charles

Screen Shot Png.png
 
I can share some data as well.

Here is four day trip from San Jose CA to Ventura CA via Highway 101. The total trip was 860 miles.

We stopped at the Atascadero and Buellton SC's on both directions and had to make a quick pitstop to use the Gilroy SC on the return as I encountered very strong headwinds and burned up with my range with an 401 Wh/mile stretch. One thing to note is that we did seem to capture the SC's voltage at 370V but never actually recorded current readings. Yet the graphs show 90KW charging runs.

One question I do have does the streaming API capturing distance ? It would cool to plot Wh/m or Kw/100KM's along with the SOC and rated miles.

Cheers,
Charles

View attachment 30497
Your graph shows that you use an older version of streaming.js to capture the data - in the last week of August this was changed to capture charge data MUCH more frequently (which is where the range information, blue line on the bottom graph comes from).
The current on superchargers is in a different field from the current when charging on AC, later versions of visualize.js fix that (meaning you have the information in the database, but the version of the visualization backend that you used to create this graph incorrectly showed that data).
Can you get the latest version of teslams that Hans pushed last night and restart both streaming.js and visualize.js? This obviously won't go back and fix the range data for the past but will record better data from now on. And as I mentioned it will at least fix the plot for the supercharging.
Next, if you switch to the Daily Summary view (also much easier to do with the current version of visualize.js - that one has 'tabs' at the top of the pages) then you will get Wh/mile data as well as daily distance driven. To me it looked odd to have continuous data (like in the graphs you show here) mixed in with daily summary data in the same set of graphs...
Thanks for posting this - I'd love if you could update the software and repost. And if you could let us know what else it is that we should be plotting. Right now there are very few people who comment and provide input, so I'm developing these graphs in a bit of a vacuum.
(oh, one more thing - you resized your window before doing the screenshot - the visualizations don't handle resize events all that gracefully - there is a resize plugin in the toolkit that I use, but some of the labels in the Daily Summary graph still don't get corrected so I haven't included that, yet... the easiest fix is to reload the page after you have resized the window)
 
Hello,
I updated streaming and and visualize. I realized my mistake after I posted that Wh/mile was on a different tab :-( sorry about that !. You know they say USER is a four letter word ;-).

Here is the repost of the four day trip with a few SC's in it. Again it has the old data set.
Screen Shot.png


Here are the interesting bits of standard 24hr period with my 100 mile Bay Area commute via 280 in the wonderful traffic we are having. It also should contain newer streaming data sets.
Screen Shot 2.png


Perhaps other's will share as well.

This is great data and it's great that we can visualize it. Thank you!

Charles
 
Your graph shows that you use an older version of streaming.js to capture the data

Latest version on github or npm is now 0.6.45 and includes all of @dirkhh's enhancements (up to pull request #45).

I am still looking for someone with 5.0 firmware to test out examples/teslacmd.js with the "--isawake" feature I added recently.
 
Last edited:
I have the red power curves now thanks. I had to move the teslams directory over to teslams-old and re-ran npm install. Also, I just dropped a friend off at the Fremont factory so that he could pick up his new S85 which has 5.0. I hope to run some tests against his car.
Excellent. Please get your friend to
a) sign up for TMC
b) install the latest teslams and run streaming.js on a server
c) post / send me graphs
d) help Hans test the code that should prevent us from waking up a sleeping baby, err, Model S
I've been working on the visualization code some more today (on a flight with slllooooowwwww WiFi and taking advantage of it). This will need some testing and I'm traveling and away from my Model S for a week.
(funnily enough, using my tools I can tell that my wife is driving my car... as usual whenever I'm not around to claim it first) :)
 
I was hoping to get some advice regarding charging. I'm using teslamscmd.cmd with some scripts and my home automation software to charge my car in the am. I'm a physician so I charge my car right when I get home in case I need to go somewhere in the middle of the night. Usually I don't have to. My car pretty much only charges to 232 miles every night and by 5 am with vampire drain it is 228. I've been telling teslams to start charging at 5 am again to eliminate the vampire drain but it doesn't appear to be working. What is the best way to go about this? Is it -C on or should I do -R max then -R std. I've tried a number of variations and my car is usually still left with 228 in the am...
 
I was hoping to get some advice regarding charging. I'm using teslamscmd.cmd with some scripts and my home automation software to charge my car in the am. I'm a physician so I charge my car right when I get home in case I need to go somewhere in the middle of the night. Usually I don't have to. My car pretty much only charges to 232 miles every night and by 5 am with vampire drain it is 228. I've been telling teslams to start charging at 5 am again to eliminate the vampire drain but it doesn't appear to be working. What is the best way to go about this? Is it -C on or should I do -R max then -R std. I've tried a number of variations and my car is usually still left with 228 in the am...


To turn on the charger run "teslacmd -C start" (with "-u username -p password" if you haven't already set up a config.json file containing your login and password).

This will turn on the charger but it will not change the maximum amount of charge (like the slider in the car).

If you want to set the maximum charge range to 90% you can run "teslacmd -R std" (or "teslacmd -R 90") again with the -u username and -p password (if required).
If you want to set the maximum charge range to 100% you can run "teslacmd -R max" (or "teslacmd -R 100")

You can combine these option as well so a single command like "teslacmd -u username -p password -C start -R 90" will turn on the charger AND set the maximum charge to 90%.

Once the maximum range is set the car will remember it so you do not need to change it every time unless you want to be sure that someone else hasn't moved the "slider" or used the mobile app to change your maximum charge percentage.

Also make sure if you are running scripts in the middle of the night that your computer is awake or it might not run the script. I have set my mac to wakeup at an appointed time so my automated scripts run.
 
Thanks. Yeah, my scripts are definitely running in the am. It's weird because when I look at the iphone app before I leave in the am it will say 232 but when I get in the car it'll be 228. I do have the air conditioning running for a little while before I get into the car but I though it was supposed to use shore power and not battery power with 4.5...