LOG_DIR
specify directory to where to logPER_DEVICE_BUFFER_SIZE
amount 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_USERNAME
HTTP Basic username used when sending data to the CloudDATA_INBOUND_API_PASSWORD
HTTP Basic password used when sending data to the CloudDATA_INBOUND_API_URL
API 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 ssh
andsudo systemctl start ssh
- Check the IP of the Raspberry PI by running `ifconfig``
- SSH into the the Raspberry with username
pi
and the password that you set in phase 2. - Create directory
.ssh
to the users home directory and create fileauthorized_keys
into 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.service
to/etc/systemd/system/ruuvi-gateway.service
- Edit the
/etc/systemd/system/ruuvi-gateway.service
to 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