Pretty similar to the other python-based project, this time only implemented in JavaScript. And naturally this may be run in any environment, I’m only running it on a RPi2 myself. (and for forum topic naming consistency, had to include it in the title )
Currently it reads ruuvitags every two minutes (didn’t find it necessary to have real-time data) and persists temperature history in memory to draw the graph. The UI is built with mobile usage in mind, though it scales nicely for bigger screens too. The ruuvitag selection tabs in the bottom of the screen do not scale that nicely if you have more than three ruuvitags.
And yes, it would be pretty easy to map the ruuvitag id’s to some more human-readable (maybe user editable) names but I didn’t find it necessary for my own use.
Installation
If you’re using a Raspberry Pi, first make sure that you have bluetooth support installed;
sudo apt-get install bluetooth bluez blueman bluez-hcidump
Install nodejs; either with apt-get or with nvm, I prefer the latter.
Grant the node
binary cap_net_raw
privileges so it can start/stop BLE advertising without root/sudo;
sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)
Clone the repo and install the dependencies
git clone https://github.com/kyyhkynen/node-ruuvitag-weather.git
cd node-ruuvitag-weather
npm install
Start the server
node server.js
The default port is 8000, so you can access the UI in http://[your-raspberrys-ip]:8000
To run in in another port, just use the PORT
env variable;
PORT=8080 node server.js
To start it in test mode with the UI populated with dummy data, start it with
NODE_ENV=test node server.js