LOG_DIRspecify directory to where to logPER_DEVICE_BUFFER_SIZEamount of measurements to buffer before batch sending them to the server. Value is multiplied with the amount of sensor that have sent data. Defaults to 30.DATA_INBOUND_API_USERNAMEHTTP Basic username used when sending data to the CloudDATA_INBOUND_API_PASSWORDHTTP Basic password used when sending data to the CloudDATA_INBOUND_API_URLAPI URL used when sending data to the Cloud
These are my instructions to install and get this RuuviTag BLE + Node + Raspberry Pi system up and running. Your mileage may vary.
- Boot up the Raspberry Pi with monitor, mouse and keyboard attached
- Go through the initial setup wizard. Reserve some time to do this as the systme updates itself at first start.
- Open terminal and enable SSH by running
sudo systemctl enable sshandsudo systemctl start ssh - Check the IP of the Raspberry PI by running `ifconfig``
- SSH into the the Raspberry with username
piand the password that you set in phase 2. - Create directory
.sshto the users home directory and create fileauthorized_keysinto that directory. Copy your public SSH key into that file to ease up logging in. Remember set the rights tochmod 600 authorized_keys - Install Node.js with
sudo apt-get install nodejs - Check that Node.js works with
node -v - Install Bluetooth libraries with
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev libcap2-bin - Give rights to Node
sudo setcap cap_net_raw+eip $(eval readlink -f ``which node``) - Go to directory
/usr/local/share/ - Clone repository from git
sudo git clone [repositoryUrl] - Give rights to user
sudo chown -R pi:staff ruuvi-gateway - Create directory for logs
sudo mkdir /var/log/ruuvi-gateway - Give rights to user to logs directory
sudo chown -R pi:staff /var/log/ruuvi-gateway/ - Add Yarn public key
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - - Add Yarn repository
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - Install Yarn
sudo apt-get update && sudo apt-get install yarn - Install application dependencies
yarn install - Copy file from
./templates/ruuvi-gateway.serviceto/etc/systemd/system/ruuvi-gateway.service - Edit the
/etc/systemd/system/ruuvi-gateway.serviceto set the enviroment parameters (or do it otherwise) - Enable the service with
sudo systemctl enable ruuvi-gateway.service - Run the service with
sudo systemctl start ruuvi-gateway.service - See the logs with
journalctl -f -u ruuvi-gateway