Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koenvervloesem/m5stack-air-quality-esphome
ESPHome configuration for M5Stack's PM2.5 Air Quality Kit with the PMSA003 particulate matter sensor and the SHT20 temperature and humidity sensor
https://github.com/koenvervloesem/m5stack-air-quality-esphome
air-quality esp32 esp32-arduino esphome esphome-config home-assistant home-automation homeassistant ili9341 m5stack mqtt particulate-matter pm-sensor pm1 pm10 pm25 pmsa003 pmsx003 sensors sht20
Last synced: 14 days ago
JSON representation
ESPHome configuration for M5Stack's PM2.5 Air Quality Kit with the PMSA003 particulate matter sensor and the SHT20 temperature and humidity sensor
- Host: GitHub
- URL: https://github.com/koenvervloesem/m5stack-air-quality-esphome
- Owner: koenvervloesem
- License: mit
- Created: 2020-12-13T11:31:15.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-04T00:52:20.000Z (about 1 year ago)
- Last Synced: 2024-10-03T19:59:34.589Z (about 1 month ago)
- Topics: air-quality, esp32, esp32-arduino, esphome, esphome-config, home-assistant, home-automation, homeassistant, ili9341, m5stack, mqtt, particulate-matter, pm-sensor, pm1, pm10, pm25, pmsa003, pmsx003, sensors, sht20
- Language: C++
- Homepage: https://koenvervloesem.github.io/M5Stack-Air-Quality-ESPHome/
- Size: 2.29 MB
- Stars: 49
- Watchers: 7
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESPHome configuration for the M5Stack PM2.5 Air Quality Kit
[![Build status](https://github.com/koenvervloesem/M5Stack-Air-Quality-ESPHome/workflows/Build/badge.svg)](https://github.com/koenvervloesem/M5Stack-Air-Quality-ESPHome/actions)
[![GitHub license](https://img.shields.io/github/license/koenvervloesem/M5Stack-Air-Quality-ESPHome.svg)](https://github.com/koenvervloesem/M5Stack-Air-Quality-ESPHome/blob/main/LICENSE)This [ESPHome](https://esphome.io) configuration builds firmware for M5Stack's [PM2.5 Air Quality Kit (PMSA003 + SHT20)](https://m5stack.com/products/pm-2-5-sensor-usb-power-sht20). It shows:
* The amount of particulate matter (PM1, PM2.5 and PM10).
* The temperature and humidity, as well as the computed vapour-pressure deficit and dew point.![ESPHome configuration for the M5Stack air quality kit](static/m5stack-air-quality-kit-esphome.jpg)
Note that ESPHome doesn't support the SHT20 sensor natively. This repository adds a custom component that's using the Arduino library [uFire_SHT20](https://github.com/u-fire/uFire_SHT20) which supports the sensor.
## Installation
On a web browser supporting [Web Serial](https://caniuse.com/web-serial) (which is a recent Chrome, Edge or Opera) you can install the latest version of the firmware on your M5Stack air quality kit from our [installation page](https://koenvervloesem.github.io/M5Stack-Air-Quality-ESPHome/) via USB, as well as setting up Wi-Fi and adding the device to Home Assistant.
You can also manually compile and upload the firmware to your M5Stack air quality kit with:
```shell
esphome run m5stack-air-quality-kit.yaml
```## Usage
The middle button is used to toggle the display's backlight on and off.
## Remarks about the temperature and humidity readings
The SHT20 sensor shows a much too high temperature and much too low humidity. This doesn't seem to be a software problem: I tried a couple of other libraries for the SHT20 with the M5Stack air quality kit and they all have the same result.
According to Sensirion's [data sheet of the SHT20](https://www.sensirion.com/SHT20), you shouldn't do more than two measurements per second at 12-bit accuracy, to prevent self-heating of the sensor. In my custom sensor component, I configured polling every second to stay on the safe side.
But even this doesn't solve the problem. I suspect M5Stack's hardware design is faulty and the sensor really reads the heat produced by the other components in the M5Stack Core case.
## TODO
* Change the interface to something nicer. I'm not a designer, so I welcome any suggestions or pull requests.
* Use the left and right buttons for other tasks.## Learn more about ESPHome
If you want to learn more about ESPHome, read my book [Getting Started with ESPHome: Develop your own custom home automation devices](https://koen.vervloesem.eu/books/getting-started-with-esphome/) and the accompanying GitHub repository [koenvervloesem/Getting-Started-with-ESPHome](https://github.com/koenvervloesem/Getting-Started-with-ESPHome/).
## License
This project is provided by [Koen Vervloesem](mailto:[email protected]) as open source software with the MIT license. See the [LICENSE](LICENSE) file for more information.
The Roboto font is licensed under the [Apache License, Version 2.0](https://fonts.google.com/specimen/Roboto#license).
The uFire_SHT20 library is licensed under the MIT license.
The C++/runtime codebase of the ESPHome project (file extensions .c, .cpp, .h, .hpp, .tcc, .ino) are published under the GPLv3 license. The Python codebase and all other parts of the ESPHome codebase are published under the MIT license. See the [ESPHome License](https://github.com/esphome/esphome/blob/dev/LICENSE) for more information.