AirQuality PM2.5 SDS011 Raspberry Pi Python3 MQTT publisher
sensor:
# SDS011 at bedroom
- platform: mqtt
name: "AirQuality PM2.5 Bedroom"
state_topic: "/bedroom/weather/pm"
unit_of_measurement: "µg/m³"
value_template: "{{ value_json.pm2_5 }}"
- platform: mqtt
name: "AirQuality PM10 Bedroom"
state_topic: "/bedroom/weather/pm"
unit_of_measurement: "µg/m³"
value_template: "{{ value_json.pm10 }}"
docs: https://www.home-assistant.io/integrations/sensor.mqtt/
todo: use ha auto-config mqtt topics:
homeassistant/sensor/airquality_bedroom/pm2_5/config
homeassistant/sensor/airquality_bedroom/pm10/config
It's the best cheap air particles sensor
https://github.com/zefanja/aqi
cron
@reboot sleep 80; cd /home/pi/services/air-quality-pm2.5-sds011; python3 mqtt_pusher.py >log
pip
pip3 install pyserial adafruit-io
apt
sudo apt update && sudo apt install python3-paho-mqtt