This project uses a Raspberry PI 3+ and a SDS011 sensor to collect air quality measurements
- copy the code into the pi root directory "/home/pi/"
- install nodejs (>=12)
- go to "air-quality-sensor-backend" and install all dependencies
pip3 install -r requirements.txt
- go to "air-quality-sensor-frontend/prebuild" and install all dependencies
npm install
- sudo apt-get install bluetooth bluez libbluetooth-dev
- sudo apt-get install bluez-hcidump libboost-python-dev libboost-thread-dev libglib2.0-dev
- sudo python3 -m pip install pybluez
- pip3 install gattlib
- copy the "raspberry-pi/air-quality.service" to "/etc/systemd/system/"
- change the permissions
sudo chmod 644 /etc/systemd/system/air-quality.service
- reload the service
sudo systemctl daemon-reload
- enable service on boot
sudo systemctl enable air-quality.service
- start the service
sudo systemctl start air-quality.service
- check service logs
sudo systemctl status air-quality.service
- update sudo nano /etc/hostname
- update sudo nano /etc/hosts
- reboot raspberry
Access the server either via your new hostname or via http://raspberrypi:9999/