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. 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...

You might want to capture the output of your scripts for debugging. For example when I run the command to turn on my charger I get the following output...

[~] $ teslacmd -C start
Teslamotors.com logon information loaded from /Users/hans/.teslams/config.json
{ reason: '', result: true }

If you don't get "result: true" then there is some other problem. I have noticed that Tesla has been doing maintenance on their servers between 1pm-3pm lately so scripts that run when the Tesla servers are down might not trigger the intended action.

I guess the good news is that Tesla's are getting deployed around the world now so they are going to have to get better at providing 7x24 uptime for the REST API and mobile apps.
 
Thanks. And I do get the reason: ", result: true as a result. I tried to charge my car today using "-R 92" and it won't do it. I get the right output from the script but it will only do a maximum charge when I put in 92. Shoudn't it be able to do that number or does it have to be in a multiple of 10?
 
Thanks. And I do get the reason: ", result: true as a result. I tried to charge my car today using "-R 92" and it won't do it. I get the right output from the script but it will only do a maximum charge when I put in 92. Shoudn't it be able to do that number or does it have to be in a multiple of 10?

If I remember correctly it takes numbers between 50 and 90 and anything above is a range charge (i.e. 100%)
 
That would make sense why mine's doing that but the instructions I believe for teslams is any % 50 - 100...

I wasn't aware that all values over 90% became 100% but I only charge to about 80% most of the time. If all "trip" charge values are the same as a max charge then I will change the documentation and online help to make that clear.

Does the car slider work the same way? I thought I had once set the slider to 95%.
 
I thought I had used the slider between 90-100 as well but I never confirmed so maybe it didn't work?

I just tested this.

With the REST API all trip range values (I.e. 91-100) automatically set the charge_limit_soc to 100% and charge_to_max_range to true.

In the car you can set the slider to any trip range value and it will work. I set it to 95 and verified it worked like so:

[~] $ teslacmd -c
Teslamotors.com logon information loaded from /Users/hans/.teslams/config.json
{ charging_state: 'Disconnected',
charge_limit_soc: 95,
charge_limit_soc_std: 90,
charge_limit_soc_min: 50,
charge_limit_soc_max: 100,
charge_to_max_range: true,
[...]

This is what it looks like setting a daily range value (I.e 50-90)

[~] $ teslacmd -R 80
Teslamotors.com logon information loaded from /Users/hans/.teslams/config.json
{ reason: '', result: true }

[~] $ teslacmd -c
Teslamotors.com logon information loaded from /Users/hans/.teslams/config.json
{ charging_state: 'Disconnected',
charge_limit_soc: 80,
charge_limit_soc_std: 90,
charge_limit_soc_min: 50,
charge_limit_soc_max: 100,
charge_to_max_range: false,
[...]
 
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...
Have you considered being able to export the dataset used to generate the "Daily Summary Chart" to a .csv or similar file? Specifically the Distance, Energy Used, Energy Lost, Charge, and Average values for each day listed. That way we could do some secondary analysis in a spreadsheet for: totals in each category, distribution of trip frequencies, averages over a give period, etc.

The graph form is great, but now that we are getting several months worth of data, there are all sorts of ideas I have on additional usefully ways to mine it.
 
Have you considered being able to export the dataset used to generate the "Daily Summary Chart" to a .csv or similar file? Specifically the Distance, Energy Used, Energy Lost, Charge, and Average values for each day listed. That way we could do some secondary analysis in a spreadsheet for: totals in each category, distribution of trip frequencies, averages over a give period, etc.

The graph form is great, but now that we are getting several months worth of data, there are all sorts of ideas I have on additional usefully ways to mine it.
Sure, easy enough. It's a database... you can easily extract any data you want.
But on the flipside... why don't you share the ideas for analysis that you want to do and maybe we can do this with teslams?
 
Sure, easy enough. It's a database... you can easily extract any data you want.
But on the flipside... why don't you share the ideas for analysis that you want to do and maybe we can do this with teslams?

Within a given date range I was looking to create some statistics based on what is shown on the "Daily Summary Chart" Some of the ideas I was looking at are:
- Total miles driven
- Total Energy Used
- Total Energy Lost
- Total kWh Charged
- Average of any of those over the period listed
- Average of the "Average (Wh/mile)"

It would be great to see the data visually and then have a way to export it so I could compare two different periods. For example, compare Average (Wh/mile) in April-Sep vs. Oct-March to get an idea of the real world impact cold weather has.

There is lots of great data here, just looking for some ways to archive and further report.
 
Within a given date range I was looking to create some statistics based on what is shown on the "Daily Summary Chart" Some of the ideas I was looking at are:
- Total miles driven
- Total Energy Used
- Total Energy Lost
- Total kWh Charged
- Average of any of those over the period listed
- Average of the "Average (Wh/mile)"

It would be great to see the data visually and then have a way to export it so I could compare two different periods. For example, compare Average (Wh/mile) in April-Sep vs. Oct-March to get an idea of the real world impact cold weather has.

There is lots of great data here, just looking for some ways to archive and further report.

Those are reasonably easy to add to the current graphs.
And getting to the raw data is straight forward as well (it's already in the JavaScript that is sent to the browser... So all we need is agree on the specific output format you are looking for)
 
I noticed the new build has weekly total graphs, very nice :smile: However, the mapping function no longer displays any trip info or the base map. I have tried two different installs in a Win 7 machine and a raspberry pi as a server with a couple of browsers; but it appears to no longer work.
 
I noticed the new build has weekly total graphs, very nice :smile: However, the mapping function no longer displays any trip info or the base map. I have tried two different installs in a Win 7 machine and a raspberry pi as a server with a couple of browsers; but it appears to no longer work.

I ran into that as well today. Need to figure out what broke this...
 
I noticed the mapping being broken as well. In addition, going to the daily summary is crashing out of visualiuze.js for me:

events.js:72
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'ts' of undefined
at updateChargeWValues (/root/node_modules/teslams/examples/visualize/visualize.js:696:28)
at /root/node_modules/teslams/examples/visualize/visualize.js:794:5
at /root/node_modules/teslams/node_modules/mongodb/lib/mongodb/cursor.js:158:16
at commandHandler (/root/node_modules/teslams/node_modules/mongodb/lib/mongodb/cursor.js:651:16)
at /root/node_modules/teslams/node_modules/mongodb/lib/mongodb/db.js:1670:9
at Server.Base._callHandler (/root/node_modules/teslams/node_modules/mongodb/lib/mongodb/connection/base.js:382:41)
at /root/node_modules/teslams/node_modules/mongodb/lib/mongodb/connection/server.js:472:18
at MongoReply.parseBody (/root/node_modules/teslams/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at null.<anonymous> (/root/node_modules/teslams/node_modules/mongodb/lib/mongodb/connection/server.js:430:20)
at EventEmitter.emit (events.js:95:17)
 
I noticed the mapping being broken as well. In addition, going to the daily summary is crashing out of visualiuze.js for me:

events.js:72
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'ts' of undefined
at updateChargeWValues (/root/node_modules/teslams/examples/visualize/visualize.js:696:28)
at /root/node_modules/teslams/examples/visualize/visualize.js:794:5
at /root/node_modules/teslams/node_modules/mongodb/lib/mongodb/cursor.js:158:16
at commandHandler (/root/node_modules/teslams/node_modules/mongodb/lib/mongodb/cursor.js:651:16)
at /root/node_modules/teslams/node_modules/mongodb/lib/mongodb/db.js:1670:9
at Server.Base._callHandler (/root/node_modules/teslams/node_modules/mongodb/lib/mongodb/connection/base.js:382:41)
at /root/node_modules/teslams/node_modules/mongodb/lib/mongodb/connection/server.js:472:18
at MongoReply.parseBody (/root/node_modules/teslams/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at null.<anonymous> (/root/node_modules/teslams/node_modules/mongodb/lib/mongodb/connection/server.js:430:20)
at EventEmitter.emit (events.js:95:17)
You are passing in a null where I didn't expect it.
Or I should say... your database has a null where I didn't expect it.
This one is easier to fix.
I'll try and push those fixes to Hans today.
Thanks for the report
 
Ok, I found and fixed both of these bugs and pushed a fix to Hans. You can get them from branch 'fixes' in my repository, or you can wait for Hans to pull them into his...
Thanks again for the reports!

- - - Updated - - -


... and Hans has pushed this out now.
 
I have two different setups I tried it on. One being a Win 7 "server" and the other on a raspberry pi "server". Stopped the visualize.js, downloaded the new package, and restarted both.
I have used chrome and ie on a Win 8 system to access the data. Also tried viewing the map on an ipad with IOS7 and got the same thing.