CO2 and volatile organic compounds measurement using IoT sensors and Raspberry Pi.
- co2
- voc
- co2eq
- temp
- rh
- { ‘device_name’ : (string), ‘co2’ : (float) }
- { ‘device_name’ : (string), ‘co2eq’: (int) }
- { ‘device_name’ : (string), ‘voc’ : (int) }
- { ‘device_name’ : (string), ‘temp’: (float) }
- { ‘device_name’ : (string), ‘rh’ : (float) }
- VOC: 0 - 60,000 [ppb]
- CO2eq: 400 - 60,000 [ppm]
- TEMP: -20 – 85 (+/- 1) [°C]
- RH: 0 - 100 (+/- 5) [% relative humidity]
- CO2: 0 - 40,000 (+/- 30) [ppm]
- MQTT Broker
Install Mosquitto:
sudo apt-get install mosquitto
Add configuration to the end of /etc/mosquitto/mosquitto.conf file:
listener 1850 0.0.0.0
allow_anonymous true
- MQTT clients
pip3 install paho-mqtt
PYTHONPATH=$PYTHONPATH:/path/to/project/workdir/.
export PYTHONPATH
- Start Mosquitto MQTT Broker:
sudo service mosquitto start
- Start publishers on Raspberry Pi:
python3 svm30collector.py --host <ip>:1850 --client_id client_pub_1 --topic_base svm30/
python3 scd30collector.py --host <ip>:1850 --client_id client_pub_2 --topic_base scd30/
- Start subscriber:
python test/testSubscriber.py --host <ip>:1850 --client_id client_sub_1