Skip to content

AirQuality PM2.5 SDS011 Raspberry Pi MQTT publisher

License

Notifications You must be signed in to change notification settings

home-things/rpi-pm2.5-sds011-mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rpi-pm2.5-sds011-mqtt

AirQuality PM2.5 SDS011 Raspberry Pi Python3 MQTT publisher

Home Assistant configuration

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

Why sds011

It's the best cheap air particles sensor

Thanks

https://github.com/zefanja/aqi


raw debug data and mqtt sniffer

photo_2021-02-10_21-43-39

Home Assistant built-in sensor widget

IMG_1256

other settings

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

About

AirQuality PM2.5 SDS011 Raspberry Pi MQTT publisher

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages