Browse Source

Clean up a little.

master
flabbergast 8 years ago
parent
commit
26235a89f1
  1. 8
      README.md
  2. 2
      TODO.md
  3. 9
      modules/socket_server.js
  4. 2
      package.json

8
README.md

@ -2,6 +2,8 @@
A [node.js](http://nodejs.org) app for collecting and displaying LLAP messages from sensors (a-la [Ciseco sensors](http://http://shop.ciseco.co.uk/sensor/)).
Hopefully it should not be too hard for you to poke around the sources, figuring out what code does what and how to modify it to one's needs.
### Setup
The basic hardware setup is:
@ -32,6 +34,12 @@ Since it's veery unlikely that you'll have the same setup as me, some editing of
- The sources for the web page are `views/{index.jade,layout.jade}`, `public/css/style.styl` and `public/js/index.js`. Clicking on buttons (code in `index.js`) `socket.emit`'s, received messages are `socket.on`-listened to in `socket_client.js`, which then updates the page using [jquery](http://jquery.org).
- All received messages are logged to [winston](https://github.com/flatiron/winston)'s file backend on receipt (function `onDataOverSerial` in `socket_server.js`).
### Changelog
#### [0.1.0](https://github.com/flabbergast/node-llap/releases/tag/v0.1.0)
Working code (on my machines). Running elsewhere will likely need some source modifications.
### Credits
Originally inspired by [Node-LEDS](http://www.quietless.com/kitchen/controlling-24-leds-with-node-js-and-a-raspberry-pi/).

2
TODO.md

@ -1,4 +1,5 @@
## Immediate ##
### LLAP sensor message handling ###
- remember timestamp (when was the last message received)
- allow for "disabling" the display/processing the messages?
@ -6,5 +7,4 @@
- do something about STARTED/AWAKE/SLEEPING messages?
## Eventually ##
- Implement Log section (last couple of things pulled when connected, then each time a message comes, add it to the log locally)
- Phone-friendly version of the site

9
modules/socket_server.js

@ -1,3 +1,12 @@
/*
* socket_server.js
*
* This code runs on the server, maintaining the socket, taking care of
* connecting to clients and processing the incoming LLAP messages (by
* passing them down to individual handlers), logging the messages to
* a file.
*/
var sockets;
var serport = require('./serial_node');
var lhelper = require('./llap_helper');

2
package.json

@ -1,6 +1,6 @@
{
"name": "node-llap",
"version": "0.0.1",
"version": "0.1.0",
"author": {
"name": "flabbergast",
"email": "s3+flabbergast@sdfeu.org"

Loading…
Cancel
Save