The dashboard is built on top of Meteor.js. Since the Tessel does not currently support web sockets, it makes http PUT requests to the Meteor app, which stores the temperature and humidity data in the database and renders it to the view.
If you don't have a Tessel, you can simulate one using the file in the localTestFile folder. Just run the JS file inside using node. It will push data to a copy of the Meteor app running locally.
You can view a demo here: http://youtu.be/knJrSxi867M
To get started:
- Using your Terminal, install Meteor.js:
$ curl https://install.meteor.com | /bin/sh
- Again using your terminal, install Meteorite, the Meteor package manager (similar to Node's npm):
$ npm install -g meteorite
- Clone this repository and navigate to the 'meteor' directory.
- Install the package dependencies with:
$ mrt install
- You can check out your app locally using
$ meteorGo to http://localhost:3000 to see it in action. There's nothing exciting going on because it's not receiving any data. You can simulate data by opening another Terminal and going to the localTestFile directory. Run the file using
$ node enviroReportLocalTest.js(If you don't have Node.js, you can get it here)
- Once you see it working, you can deploy the app to Meteor's hosting service.
$ meteor deploy [somename].meteor.com
- In your Terminal, navigate to the 'Tessel' directory.
- In enviro.js, change line 8 to the URL where you deployed your Meteor app.
- Be sure you have installed the npm package for the climate module.
- Plug in your climate module on Port B and start up your Tessel. Make sure it's connected to wifi.
- Run enviro.js on your Tessel:
$ tessel push enviro.js
- You should now see data start appearing in your Meteor app.