# Serial Air Quality Sensors
Data acquisition and logging for Air Quality Sensors with UART interface
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pypms)](https://pypi.org/project/pypms)
[![PyPI](https://img.shields.io/pypi/v/pypms)](https://pypi.org/project/pypms)
[![Build Status](https://github.com/avaldebe/PyPMS/actions/workflows/test.yml/badge.svg)](https://github.com/avaldebe/PyPMS/actions)
[![GitHub issues](https://img.shields.io/github/issues/avaldebe/PyPMS)](https://github.com/avaldebe/PyPMS/issues)
[![GitHub license](https://img.shields.io/github/license/avaldebe/PyPMS)](https://github.com/avaldebe/PyPMS/blob/master/LICENSE)
[![DOI](https://zenodo.org/badge/203110737.svg)](https://zenodo.org/badge/latestdoi/203110737)
[project site]: https://avaldebe.github.io/PyPMS
## Installation
This package can be pip installed.
Please visit [project site] for detailed instructions.
## Command Line Tools
This package provides tools for requesting new measurements from the sensors
and print them on different formats, save them to a CSV file,
or push them to an external service such as an MQTT or InfluxDB server.
MQTT or InfluxDB server support requires additional packages.
Please visit [project site] for details.
## Particulate Matter Sensors
| Sensor | `--sensor-model` | PM1 | PM2.5 | PM4 | PM10 | size bins | Other | Tested |
| ----------------- | ---------------- | :---: | :---: | :---: | :---: | :-------: | ---------------------- | :----: |
| [Plantower] |
| PMS1003 (aka G1) | [PMSx003] | ✔️ | ✔️ | | ✔️ | 6 | | |
| PMS3003 (aka G3) | [PMS3003] | ✔️ | ✔️ | | ✔️ | | | ✔️ |
| PMS5003 (aka G5) | [PMSx003] | ✔️ | ✔️ | | ✔️ | 6 | | |
| PMS5003T | [PMS5003T] | ✔️ | ✔️ | | ✔️ | 4 | temp. & rel.hum. | ✔️ |
| PMS5003S | [PMS5003S] | ✔️ | ✔️ | | ✔️ | 6 | HCHO concentration | |
| PMS5003ST | [PMS5003ST] | ✔️ | ✔️ | | ✔️ | 6 | HCHO, temp. & rel.hum. | |
| PMS7003 (aka G7) | [PMSx003] | ✔️ | ✔️ | | ✔️ | 6 | | ✔️ |
| PMSA003 (aka G10) | [PMSx003] | ✔️ | ✔️ | | ✔️ | 6 | | ✔️ |
| [NovaFitness] |
| SDS011 | [SDS01x] | | ✔️ | | ✔️ | | | ✔️ |
| SDS018 | [SDS01x] | | ✔️ | | ✔️ | | | |
| SDS021 | [SDS01x] | | ✔️ | | ✔️ | | | |
| SDS198 | [SDS198] | | | | | | PM100 | ✔️ |
| [Honeywell] |
| HPMA115S0 | [HPMA115S0] | | ✔️ | | ✔️ | | | |
| HPMA115C0 | [HPMA115C0] | ✔️ | ✔️ | ✔️ | ✔️ | | | ✔️ |
| [Sensirion] |
| SPS30 | [SPS30] | ✔️ | ✔️ | ✔️ | ✔️ | 5 | typical particle size | ✔️ |
| [Winsen] |
| ZH03B | [ZH0xx] | ✔️ | ✔️ | ✔️ | | | | |
| ZH06-I | [ZH0xx] | ✔️ | ✔️ | ✔️ | | | | |
[plantower]: https://avaldebe.github.io/PyPMS/sensors/Plantower
[PMS3003]: https://avaldebe.github.io/PyPMS/sensors/Plantower/#pms3003
[PMSx003]: https://avaldebe.github.io/PyPMS/sensors/Plantower/#pmsx003
[PMS5003T]: https://avaldebe.github.io/PyPMS/sensors/Plantower/#pms5003t
[PMS5003S]: https://avaldebe.github.io/PyPMS/sensors/Plantower/#pms5003s
[PMS5003ST]: https://avaldebe.github.io/PyPMS/sensors/Plantower/#pms5003st
[NovaFitness]:https://avaldebe.github.io/PyPMS/sensors/NovaFitness
[SDS01x]: https://avaldebe.github.io/PyPMS/sensors/NovaFitness/#sds01x
[SDS198]: https://avaldebe.github.io/PyPMS/sensors/NovaFitness/#sds198
[Honeywell]: https://avaldebe.github.io/PyPMS/sensors/Honeywell
[HPMA115S0]: https://avaldebe.github.io/PyPMS/sensors/Honeywell/#hpma115s0
[HPMA115C0]: https://avaldebe.github.io/PyPMS/sensors/Honeywell/#hpma115c0
[Sensirion]: https://avaldebe.github.io/PyPMS/sensors/Sensirion
[SPS30]: https://avaldebe.github.io/PyPMS/sensors/Sensirion/#sps30
[Winsen]: https://avaldebe.github.io/PyPMS/sensors/Winsen
[ZH0xx]: https://avaldebe.github.io/PyPMS/sensors/Winsen/#zh0xx
[MHZ19B]: https://avaldebe.github.io/PyPMS/sensors/Winsen/#mhz19b
## Other Sensors
- [MCU680]:
chinese module with a [BME680] sensor, a mirocontroller (μC) and 3.3V low-dropout regulator (LDO).
The μC acts as I2C/UART bridge, providing outputs from the [closed source integration library][BSEC].
- [MHZ19B]:
infrared CO2 sensor module from [Winsen].
[MCU680]: https://avaldebe.github.io/PyPMS/sensors/mcu680/#mcu680
[BME680]: https://avaldebe.github.io/PyPMS/sensors/mcu680/#bme680
[BSEC]: https://www.bosch-sensortec.com/software-tools/software/bsec/
## Want More Sensors
For more Air Quality sensors [open an issue][issue].
[issue]: https://github.com/avaldebe/PyPMS/issues
## Use as a library
PyPMS/pms is meant as a command line application.
The [project site] contain some help for those brave enough to use its internals as a [library].
[library]: https://avaldebe.github.io/PyPMS/library_usage
## Changelog
- 0.7.1
- disable logging unless CLI is running [PR#37](https://github.com/avaldebe/PyPMS/pull/37)
- 0.7.0
- add Python 3.11 support and drop Python 3.7 support
- pre-heat for PMSx003 sensors [PR#35](https://github.com/avaldebe/PyPMS/pull/35)
- `open`/`close` methods for granular SensorReader operation [PR#33](https://github.com/avaldebe/PyPMS/pull/33)
- fix HPMA115C0 header [#26](https://github.com/avaldebe/PyPMS/issues/26)
- 0.6.2
- move logger config to CLI module [PR#28](https://github.com/avaldebe/PyPMS/pull/28)
- 0.6.1
- fix `pms.sensors.sensirion` module name and docs
- reliably recognize SPS30 sensor [#25](https://github.com/avaldebe/PyPMS/issues/25)
- 0.6.0
- [project site]
- reorganize internal modules
- `pms.core`: core functionality, such as `Sensor` and `SensorReader`
- `pms.sensors`: sensor modules grouped by manufacturer
- `pms.extra`: extra cli utilities, such as `pms influxdb` and `influxdb mqtt`
- importing from `pms.sensor` is deprecated, import from `pms.core` instead
- plugin architecture
- load sensor modules from entry points advertized as `"pypms.sensors"`
- load extra cli commands from entry points advertized as `"pypms.extras"`
- support [Winsen] PM sensors and [MHZ19B] infrared CO2 sensor.
- pm1/pm4/raw2_5/pm2_5 properties, [#17](https://github.com/avaldebe/PyPMS/issues/17)
- 0.5.0
- set username/password with environment variables:
- `$MQTT_USER` sets `--mqtt-user` on `pms mqtt` and `pms bridge`
- `$MQTT_USER` sets `--mqtt-user` on `pms mqtt` and `pms bridge`
- `$DB_USER` sets `--db-user` on `pms influxdb` and `pms bridge`
- `$DB_PASS` sets `--db-pass` on `pms influxdb` and `pms bridge`
- 0.4.1
- info about the sensor observations with `pms info`
- fix [MCU680] obs.pres typo [#16](https://github.com/avaldebe/PyPMS/issues/16)
- 0.4.0
- capture raw messages with `pms csv --capture`
- decode captured messages with `pms serial --capture`
- hexdump format with `pms serial --format hexdump`
- deprecate subset observation method
- 0.3.1
- fix influxdb default tags
- 0.3.0
- option for a fix number of samples
- PMSx003 consistency check after sleep/wake
- 0.2.*
- widen project scope from PM sensors to AQ sensors in general
- support [BME680] sensor ([MCU680] module)
- 0.1.*
- widen project scope beyond [Plantower] PM sensors
- support [NovaFitness], [Honeywell] and [Sensirion] PM sensors
- cli for logging to csv file, InfluxDB server or MQTT server
Raw data
{
"_id": null,
"home_page": "https://avaldebe.github.io/PyPMS",
"name": "pypms",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "air quality,particulate matter",
"author": "Alvaro Valdebenito",
"author_email": "avaldebe@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/fd/03/3beb3ca812d7e022644fef58cb39f846cdde67331aa93cfbe46b28f45551/pypms-0.7.1.tar.gz",
"platform": null,
"description": "# Serial Air Quality Sensors\n\nData acquisition and logging for Air Quality Sensors with UART interface\n\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pypms)](https://pypi.org/project/pypms)\n[![PyPI](https://img.shields.io/pypi/v/pypms)](https://pypi.org/project/pypms)\n[![Build Status](https://github.com/avaldebe/PyPMS/actions/workflows/test.yml/badge.svg)](https://github.com/avaldebe/PyPMS/actions)\n[![GitHub issues](https://img.shields.io/github/issues/avaldebe/PyPMS)](https://github.com/avaldebe/PyPMS/issues)\n[![GitHub license](https://img.shields.io/github/license/avaldebe/PyPMS)](https://github.com/avaldebe/PyPMS/blob/master/LICENSE)\n[![DOI](https://zenodo.org/badge/203110737.svg)](https://zenodo.org/badge/latestdoi/203110737)\n\n[project site]: https://avaldebe.github.io/PyPMS\n\n## Installation\n\nThis package can be pip installed.\nPlease visit [project site] for detailed instructions.\n\n## Command Line Tools\n\nThis package provides tools for requesting new measurements from the sensors\nand print them on different formats, save them to a CSV file,\nor push them to an external service such as an MQTT or InfluxDB server.\nMQTT or InfluxDB server support requires additional packages.\nPlease visit [project site] for details.\n\n## Particulate Matter Sensors\n\n| Sensor | `--sensor-model` | PM1 | PM2.5 | PM4 | PM10 | size bins | Other | Tested |\n| ----------------- | ---------------- | :---: | :---: | :---: | :---: | :-------: | ---------------------- | :----: |\n| [Plantower] |\n| PMS1003 (aka G1) | [PMSx003] | \u2714\ufe0f | \u2714\ufe0f | | \u2714\ufe0f | 6 | | |\n| PMS3003 (aka G3) | [PMS3003] | \u2714\ufe0f | \u2714\ufe0f | | \u2714\ufe0f | | | \u2714\ufe0f |\n| PMS5003 (aka G5) | [PMSx003] | \u2714\ufe0f | \u2714\ufe0f | | \u2714\ufe0f | 6 | | |\n| PMS5003T | [PMS5003T] | \u2714\ufe0f | \u2714\ufe0f | | \u2714\ufe0f | 4 | temp. & rel.hum. | \u2714\ufe0f |\n| PMS5003S | [PMS5003S] | \u2714\ufe0f | \u2714\ufe0f | | \u2714\ufe0f | 6 | HCHO concentration | |\n| PMS5003ST | [PMS5003ST] | \u2714\ufe0f | \u2714\ufe0f | | \u2714\ufe0f | 6 | HCHO, temp. & rel.hum. | |\n| PMS7003 (aka G7) | [PMSx003] | \u2714\ufe0f | \u2714\ufe0f | | \u2714\ufe0f | 6 | | \u2714\ufe0f |\n| PMSA003 (aka G10) | [PMSx003] | \u2714\ufe0f | \u2714\ufe0f | | \u2714\ufe0f | 6 | | \u2714\ufe0f |\n| [NovaFitness] |\n| SDS011 | [SDS01x] | | \u2714\ufe0f | | \u2714\ufe0f | | | \u2714\ufe0f |\n| SDS018 | [SDS01x] | | \u2714\ufe0f | | \u2714\ufe0f | | | |\n| SDS021 | [SDS01x] | | \u2714\ufe0f | | \u2714\ufe0f | | | |\n| SDS198 | [SDS198] | | | | | | PM100 | \u2714\ufe0f |\n| [Honeywell] |\n| HPMA115S0 | [HPMA115S0] | | \u2714\ufe0f | | \u2714\ufe0f | | | |\n| HPMA115C0 | [HPMA115C0] | \u2714\ufe0f | \u2714\ufe0f | \u2714\ufe0f | \u2714\ufe0f | | | \u2714\ufe0f |\n| [Sensirion] |\n| SPS30 | [SPS30] | \u2714\ufe0f | \u2714\ufe0f | \u2714\ufe0f | \u2714\ufe0f | 5 | typical particle size | \u2714\ufe0f |\n| [Winsen] |\n| ZH03B | [ZH0xx] | \u2714\ufe0f | \u2714\ufe0f | \u2714\ufe0f | | | | |\n| ZH06-I | [ZH0xx] | \u2714\ufe0f | \u2714\ufe0f | \u2714\ufe0f | | | | |\n\n[plantower]: https://avaldebe.github.io/PyPMS/sensors/Plantower\n[PMS3003]: https://avaldebe.github.io/PyPMS/sensors/Plantower/#pms3003\n[PMSx003]: https://avaldebe.github.io/PyPMS/sensors/Plantower/#pmsx003\n[PMS5003T]: https://avaldebe.github.io/PyPMS/sensors/Plantower/#pms5003t\n[PMS5003S]: https://avaldebe.github.io/PyPMS/sensors/Plantower/#pms5003s\n[PMS5003ST]: https://avaldebe.github.io/PyPMS/sensors/Plantower/#pms5003st\n\n[NovaFitness]:https://avaldebe.github.io/PyPMS/sensors/NovaFitness\n[SDS01x]: https://avaldebe.github.io/PyPMS/sensors/NovaFitness/#sds01x\n[SDS198]: https://avaldebe.github.io/PyPMS/sensors/NovaFitness/#sds198\n\n[Honeywell]: https://avaldebe.github.io/PyPMS/sensors/Honeywell\n[HPMA115S0]: https://avaldebe.github.io/PyPMS/sensors/Honeywell/#hpma115s0\n[HPMA115C0]: https://avaldebe.github.io/PyPMS/sensors/Honeywell/#hpma115c0\n\n[Sensirion]: https://avaldebe.github.io/PyPMS/sensors/Sensirion\n[SPS30]: https://avaldebe.github.io/PyPMS/sensors/Sensirion/#sps30\n\n[Winsen]: https://avaldebe.github.io/PyPMS/sensors/Winsen\n[ZH0xx]: https://avaldebe.github.io/PyPMS/sensors/Winsen/#zh0xx\n[MHZ19B]: https://avaldebe.github.io/PyPMS/sensors/Winsen/#mhz19b\n\n## Other Sensors\n\n- [MCU680]:\n chinese module with a [BME680] sensor, a mirocontroller (\u03bcC) and 3.3V low-dropout regulator (LDO).\n The \u03bcC acts as I2C/UART bridge, providing outputs from the [closed source integration library][BSEC].\n- [MHZ19B]:\n infrared CO2 sensor module from [Winsen].\n\n[MCU680]: https://avaldebe.github.io/PyPMS/sensors/mcu680/#mcu680\n[BME680]: https://avaldebe.github.io/PyPMS/sensors/mcu680/#bme680\n[BSEC]: https://www.bosch-sensortec.com/software-tools/software/bsec/\n\n## Want More Sensors\n\nFor more Air Quality sensors [open an issue][issue].\n\n[issue]: https://github.com/avaldebe/PyPMS/issues\n\n## Use as a library\n\nPyPMS/pms is meant as a command line application.\nThe [project site] contain some help for those brave enough to use its internals as a [library].\n\n[library]: https://avaldebe.github.io/PyPMS/library_usage\n\n## Changelog\n\n- 0.7.1\n - disable logging unless CLI is running [PR#37](https://github.com/avaldebe/PyPMS/pull/37)\n- 0.7.0\n - add Python 3.11 support and drop Python 3.7 support\n - pre-heat for PMSx003 sensors [PR#35](https://github.com/avaldebe/PyPMS/pull/35)\n - `open`/`close` methods for granular SensorReader operation [PR#33](https://github.com/avaldebe/PyPMS/pull/33)\n - fix HPMA115C0 header [#26](https://github.com/avaldebe/PyPMS/issues/26)\n- 0.6.2\n - move logger config to CLI module [PR#28](https://github.com/avaldebe/PyPMS/pull/28)\n- 0.6.1\n - fix `pms.sensors.sensirion` module name and docs\n - reliably recognize SPS30 sensor [#25](https://github.com/avaldebe/PyPMS/issues/25)\n- 0.6.0\n - [project site]\n - reorganize internal modules\n - `pms.core`: core functionality, such as `Sensor` and `SensorReader`\n - `pms.sensors`: sensor modules grouped by manufacturer\n - `pms.extra`: extra cli utilities, such as `pms influxdb` and `influxdb mqtt`\n - importing from `pms.sensor` is deprecated, import from `pms.core` instead\n - plugin architecture\n - load sensor modules from entry points advertized as `\"pypms.sensors\"`\n - load extra cli commands from entry points advertized as `\"pypms.extras\"`\n - support [Winsen] PM sensors and [MHZ19B] infrared CO2 sensor.\n - pm1/pm4/raw2_5/pm2_5 properties, [#17](https://github.com/avaldebe/PyPMS/issues/17)\n- 0.5.0\n - set username/password with environment variables:\n - `$MQTT_USER` sets `--mqtt-user` on `pms mqtt` and `pms bridge`\n - `$MQTT_USER` sets `--mqtt-user` on `pms mqtt` and `pms bridge`\n - `$DB_USER` sets `--db-user` on `pms influxdb` and `pms bridge`\n - `$DB_PASS` sets `--db-pass` on `pms influxdb` and `pms bridge`\n- 0.4.1\n - info about the sensor observations with `pms info`\n - fix [MCU680] obs.pres typo [#16](https://github.com/avaldebe/PyPMS/issues/16)\n- 0.4.0\n - capture raw messages with `pms csv --capture`\n - decode captured messages with `pms serial --capture`\n - hexdump format with `pms serial --format hexdump`\n - deprecate subset observation method\n- 0.3.1\n - fix influxdb default tags\n- 0.3.0\n - option for a fix number of samples\n - PMSx003 consistency check after sleep/wake\n- 0.2.*\n - widen project scope from PM sensors to AQ sensors in general\n - support [BME680] sensor ([MCU680] module)\n- 0.1.*\n - widen project scope beyond [Plantower] PM sensors\n - support [NovaFitness], [Honeywell] and [Sensirion]\u00a0PM sensors\n - cli for logging to csv file, InfluxDB server or MQTT server\n",
"bugtrack_url": null,
"license": "",
"summary": "Data acquisition and logging for Air Quality Sensors with UART interface",
"version": "0.7.1",
"split_keywords": [
"air quality",
"particulate matter"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "da8b32a50e2afb64d19cdda677c028125f62ce62fa1a68db82050a7ceff9519e",
"md5": "b6b57416b34bd9964dc71aaf55515e9b",
"sha256": "76be1d1c1b26b75292bc2fef0b70718c43ec67dfe80a41d7a5d24feeb4d9ffca"
},
"downloads": -1,
"filename": "pypms-0.7.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b6b57416b34bd9964dc71aaf55515e9b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 36765,
"upload_time": "2023-01-11T10:42:43",
"upload_time_iso_8601": "2023-01-11T10:42:43.700798Z",
"url": "https://files.pythonhosted.org/packages/da/8b/32a50e2afb64d19cdda677c028125f62ce62fa1a68db82050a7ceff9519e/pypms-0.7.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fd033beb3ca812d7e022644fef58cb39f846cdde67331aa93cfbe46b28f45551",
"md5": "6e6736628796e7ec5a66028abca02ff8",
"sha256": "7d6f6353616aaa7adc2629deb904ba3ba431321e7bbbcf0c72c29b47834761b9"
},
"downloads": -1,
"filename": "pypms-0.7.1.tar.gz",
"has_sig": false,
"md5_digest": "6e6736628796e7ec5a66028abca02ff8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 24699,
"upload_time": "2023-01-11T10:42:44",
"upload_time_iso_8601": "2023-01-11T10:42:44.949175Z",
"url": "https://files.pythonhosted.org/packages/fd/03/3beb3ca812d7e022644fef58cb39f846cdde67331aa93cfbe46b28f45551/pypms-0.7.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-11 10:42:44",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "pypms"
}