Skip to content

EitZei/ruuvi-gateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ruuvi-gateway

Configuration

  • LOG_DIR specify directory to where to log
  • PER_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 Cloud
  • DATA_INBOUND_API_PASSWORD HTTP Basic password used when sending data to the Cloud
  • DATA_INBOUND_API_URL API URL used when sending data to the Cloud

Installing to Raspberry Pi

These are my instructions to install and get this RuuviTag BLE + Node + Raspberry Pi system up and running. Your mileage may vary.

  1. Boot up the Raspberry Pi with monitor, mouse and keyboard attached
  2. Go through the initial setup wizard. Reserve some time to do this as the systme updates itself at first start.
  3. Open terminal and enable SSH by running sudo systemctl enable ssh and sudo systemctl start ssh
  4. Check the IP of the Raspberry PI by running `ifconfig``
  5. SSH into the the Raspberry with username pi and the password that you set in phase 2.
  6. Create directory .ssh to the users home directory and create file authorized_keys into that directory. Copy your public SSH key into that file to ease up logging in. Remember set the rights to chmod 600 authorized_keys
  7. Install Node.js with sudo apt-get install nodejs
  8. Check that Node.js works with node -v
  9. Install Bluetooth libraries with sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev libcap2-bin
  10. Give rights to Node sudo setcap cap_net_raw+eip $(eval readlink -f ``which node``)
  11. Go to directory /usr/local/share/
  12. Clone repository from git sudo git clone [repositoryUrl]
  13. Give rights to user sudo chown -R pi:staff ruuvi-gateway
  14. Create directory for logs sudo mkdir /var/log/ruuvi-gateway
  15. Give rights to user to logs directory sudo chown -R pi:staff /var/log/ruuvi-gateway/
  16. Add Yarn public key curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
  17. Add Yarn repository echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
  18. Install Yarn sudo apt-get update && sudo apt-get install yarn
  19. Install application dependencies yarn install
  20. Copy file from ./templates/ruuvi-gateway.service to /etc/systemd/system/ruuvi-gateway.service
  21. Edit the /etc/systemd/system/ruuvi-gateway.service to set the enviroment parameters (or do it otherwise)
  22. Enable the service with sudo systemctl enable ruuvi-gateway.service
  23. Run the service with sudo systemctl start ruuvi-gateway.service
  24. See the logs with journalctl -f -u ruuvi-gateway

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •