Air Quality Raspberry PI

This project uses a Raspberry PI 3+ and a SDS011 sensor to collect air quality measurements

Install dependencies (raspberry pi)

  1. copy the code into the pi root directory "/home/pi/"
  2. install nodejs (>=12)
  3. go to "air-quality-sensor-backend" and install all dependencies pip3 install -r requirements.txt
  4. go to "air-quality-sensor-frontend/prebuild" and install all dependencies npm install

Install ruuvi tag requirements

  1. sudo apt-get install bluetooth bluez libbluetooth-dev
  2. sudo apt-get install bluez-hcidump libboost-python-dev libboost-thread-dev libglib2.0-dev
  3. sudo python3 -m pip install pybluez
  4. pip3 install gattlib

Install as service

  1. copy the "raspberry-pi/air-quality.service" to "/etc/systemd/system/"
  2. change the permissions sudo chmod 644 /etc/systemd/system/air-quality.service
  3. reload the service sudo systemctl daemon-reload
  4. enable service on boot sudo systemctl enable air-quality.service
  5. start the service sudo systemctl start air-quality.service
  6. check service logs sudo systemctl status air-quality.service

Update hostname

  1. update sudo nano /etc/hostname
  2. update sudo nano /etc/hosts
  3. reboot raspberry

Access server

Access the server either via your new hostname or via http://raspberrypi:9999/