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.
Can you give an example of what one could do with Pebble?

It's a programmable watch so just about anything is possible. I would like to make a watch face that shows the status of the car (stuff like the state of the door locks, charge, charge time remaining, estimated range, etc.). This would allow me to monitor these statistics without taking my phone out and starting the Tesla mobile app.

I would also like to use the Pebble's accelerometer to allow gestures to lock/unlock the car, and use the watch buttons to start the climate control to precondition the car as I walk from my office to it's usual parking spot 3 blocks away.
 
It's a programmable watch so just about anything is possible. I would like to make a watch face that shows the status of the car (stuff like the state of the door locks, charge, charge time remaining, estimated range, etc.). This would allow me to monitor these statistics without taking my phone out and starting the Tesla mobile app.

I would also like to use the Pebble's accelerometer to allow gestures to lock/unlock the car, and use the watch buttons to start the climate control to precondition the car as I walk from my office to it's usual parking spot 3 blocks away.

Sound like great ideas. I should have said that I have a Pebble (Kickstarter), but other than running/cycling apps I haven't seen much useful stuff yet, although I'm not straining to keep looking ...

I presume that at least most of these functions would require a companion app on the smartphone. That's probably much easier on Android, but I am tied to iPhones. Any hope for that?
 
Sound like great ideas. I should have said that I have a Pebble (Kickstarter), but other than running/cycling apps I haven't seen much useful stuff yet, although I'm not straining to keep looking ...

I presume that at least most of these functions would require a companion app on the smartphone. That's probably much easier on Android, but I am tied to iPhones. Any hope for that?

Pebble just launched the Pebble SDK 2.0 today. It has full support for iOS 7 notifications and now that they support JavaScript I think I can write the companion app for the smartphone in a way that will run on both Android and iPhone.

Pebble SDK hits 2.0, brings new APIs, full iOS 7 integration | Ars Technica

Now that you made me think about it more, I should make a watch notification when charging completes, or when the charge cable is disconnected.
 
Pebble just launched the Pebble SDK 2.0 today. It has full support for iOS 7 notifications and now that they support JavaScript I think I can write the companion app for the smartphone in a way that will run on both Android and iPhone.

Pebble SDK hits 2.0, brings new APIs, full iOS 7 integration | Ars Technica

Now that you made me think about it more, I should make a watch notification when charging completes, or when the charge cable is disconnected.

Hans

I have a pebble.... Please do this!

:)

Aaron
 
Hans

I have a pebble.... Please do this!

:)

Aaron

10750598783_a2f8e41957_z.jpg

 
Last edited by a moderator:
Hans

WOW!!! I assume you did that with the new SDK 2.0?

When will you have it available? I know the new pebble app hasn't been approved by apple yet....

Aaron

Yup. I'm still experimenting with SDK 2.0 Beta1. I have both the Android and iOS versions of the phone app.
Right now I have something basic that works but it requires me to use the "restla" proxy and for it to be accessible over the internet from my phone to work.
I would like to get the teslams JavaScript libraries working directly in PebbleJS so there are no extra proxies to install or any extra helper applications to load on the phone.
This approach will work on both iPhones and Android.


10808758346_9cbcfb548f.jpg
 
Yup. I'm still experimenting with SDK 2.0 Beta1. I have both the Android and iOS versions of the phone app.
Right now I have something basic that works but it requires me to use the "restla" proxy and for it to be accessible over the internet from my phone to work.
I would like to get the teslams JavaScript libraries working directly in PebbleJS so there are no extra proxies to install or any extra helper applications to load on the phone.
This approach will work on both iPhones and Android.


View attachment 35364

OUTSTANDING Hans!

I am now up and running in the new iOS release and my Pebble firmware was updated!

If you need a beta tester - I volunteer!!!!

Aaron
 
Hi, I'm having trouble getting started. I've installed mongo db and node. The examples work ok until I try to run visualize. It tries to load /login.html which does not exist.

here's the code:

// simple login screen with correspoding POST setup
app.get('/login', function(req,res) {
fs.readFile(__dirname + "/login.html", "utf-8", function(err, data) {
if (err) throw err;
res.send(data);
});
})
;


This happens when I try to point my browser to localhost/welcome
 
Hi, I'm having trouble getting started. I've installed mongo db and node. The examples work ok until I try to run visualize. It tries to load /login.html which does not exist.

here's the code:

// simple login screen with correspoding POST setup
app.get('/login', function(req,res) {
fs.readFile(__dirname + "/login.html", "utf-8", function(err, data) {
if (err) throw err;
res.send(data);
});
})
;


This happens when I try to point my browser to localhost/welcome

Hans just pushes those changes. I wonder if I forgot to add that file by mistake. I'm away from my computer for a few hours but will check this afternoon (I'm in Seoul right now)
 
Hi, I'm having trouble getting started. I've installed mongo db and node. The examples work ok until I try to run visualize. It tries to load /login.html which does not exist.

here's the code:

// simple login screen with correspoding POST setup
app.get('/login', function(req,res) {
fs.readFile(__dirname + "/login.html", "utf-8", function(err, data) {
if (err) throw err;
res.send(data);
});
})
;


This happens when I try to point my browser to localhost/welcome

I tried it as well. The package is missing the ~teslams/examples/visualize/login.html file.

If you roll back by running "npm install -g [email protected]" then you can get going (without authentication) and I will push out a newer version once I get the missing file from dirkhh.
 
Last edited:
The missing file is now in a new distribution (version 0.7.5). "sudo npm install -g teslams" and you should get the latest.
The logins and passwords are hardcoded so I expect that people will get lost on how to login. It would be good to have
authentication as an option so visualize.js can be started without enforcing logins. If you change the hard coded logins
in the code expect that they will get overwritten whenever you upgrade. Perhaps dirkhh can add login and password
config in a separate file such as ~/.teslams/config.json or a separate ~/.teslams/visualize.json
 
The missing file is now in a new distribution (version 0.7.5). "sudo npm install -g teslams" and you should get the latest.
The logins and passwords are hardcoded so I expect that people will get lost on how to login. It would be good to have
authentication as an option so visualize.js can be started without enforcing logins. If you change the hard coded logins
in the code expect that they will get overwritten whenever you upgrade. Perhaps dirkhh can add login and password
config in a separate file such as ~/.teslams/config.json or a separate ~/.teslams/visualize.json


Thanks, I've got it working now.

EDIT: spoke too soon. How does one get the vin/firmware version etc to show up on the welcome page?
 
Last edited:
I added a new tool called "restla" to the TeslaMS project. It's a simple REST proxy that hides all the Tesla Motors authentication and allows all the functions to be exposed as HTTP GET URLs with no parameters. It also has the side benefit of being a simple HTML browser interface for all the REST calls. Most of what you could do from the command line using "teslacmd" you can now do in a browser or REST calls from any client application.

It would be good to have authentication as an option so visualize.js can be started without enforcing logins.
Perhaps dirkhh can add login and password config in a separate file such as ~/.teslams/config.json or a separate ~/.teslams/visualize.json

You guys are doing awesome work here. I keep thinking I will jump in and add a new feature, but every time I do, you guys beat me to it. These are two such examples so far. Thanks for sharing all your work! Maybe someday I'll get around to implementing an idea faster than you guys can conceive of it and develop it on your own. :)
 
Once I login as a valid user I get my vin/firmware and options displayed on http://localhost:8766/

I edited the visualize.js and put my credentials in. I wen to local host and logged in as me and the Vin is blank. I've also got the streaming app running, and I was able to track my wife's trip to work. I've looked in visualize.js and see that it pulls the information out of the database, but I don't see where it gets put in.
 
I edited the visualize.js and put my credentials in. I wen to local host and logged in as me and the Vin is blank. I've also got the streaming app running, and I was able to track my wife's trip to work. I've looked in visualize.js and see that it pulls the information out of the database, but I don't see where it gets put in.

Solved. Start streaming BEFORE starting visualize (DOH!) Oh and I needed to add "--rest" to the mongod command.

- - - Updated - - -

Two places in visualize.js the ip address for mongo db is "mongodb://127.0.0.01:27017/" instead of "mongodb://127.0.0.1:27017/" which prevents storage & retrieval of trip data. (well when running under windows at least)

I need to learn to use GIT :cool:
 
Thanks, I've got it working now.

EDIT: spoke too soon. How does one get the vin/firmware version etc to show up on the welcome page?
You may have to restart the streaming client, depending how long ago you last restarted it. That's how the VIN/FW ends up in the database :)

- - - Updated - - -

Solved. Start streaming BEFORE starting visualize (DOH!) Oh and I needed to add "--rest" to the mongod command.

- - - Updated - - -

Two places in visualize.js the ip address for mongo db is "mongodb://127.0.0.01:27017/" instead of "mongodb://127.0.0.1:27017/" which prevents storage & retrieval of trip data. (well when running under windows at least)

I need to learn to use GIT :cool:
git is easy:
this is how you see what you changed:
git diff
this is how you create a 'commit' with your changes
git commit -s -a
if you want the developers to include your changes into the upstream project, it gets a bit harder, but it's only a handful more commands. Let me know if you want the short tutorial :)