sensor-pmsx003¶
CLI reference¶
glasgow run sensor-pmsx003¶
Measure PM2.5 air quality with Plantower PMx003 family sensors.
This applet has been tested with PMS5003 and PMS7003.
usage: glasgow run sensor-pmsx003 [-h] [-V SPEC] [--rx PIN] [--tx PIN]
OPERATION ...
- -h, --help¶
show this help message and exit
- -V <spec>, --voltage <spec>¶
configure I/O port voltage to SPEC (e.g.: ‘3.3’, ‘A=5.0,B=3.3’, ‘A=SA’)
- --rx <pin>¶
bind the applet I/O line ‘rx’ to PIN (default: ‘A0’, required)
- --tx <pin>¶
bind the applet I/O line ‘tx’ to PIN (default: ‘A1’, optional)
glasgow run sensor-pmsx003 log¶
usage: glasgow run sensor-pmsx003 log [-h] DATA-LOGGER ...
- -h, --help¶
show this help message and exit
glasgow run sensor-pmsx003 log csv¶
Log data to a comma-separated value (CSV) file.
usage: glasgow run sensor-pmsx003 log csv [-h] [--dialect DIALECT] CSV-FILE
- csv-file¶
write data to CSV-FILE
- -h, --help¶
show this help message and exit
- --dialect {excel,excel-tab,unix}¶
format CSV file according to DIALECT
glasgow run sensor-pmsx003 log influxdb¶
Log data to an InfluxDB 1.x endpoint over HTTP(S).
usage: glasgow run sensor-pmsx003 log influxdb [-h] [-r POLICY] [-t TAG=VALUE]
-p PRECISION
[--batch-size BATCH-SIZE]
ENDPOINT DATABASE SERIES
- endpoint¶
write to endpoint URL //ENDPOINT/write
- database¶
write to database DATABASE
- series¶
write to measurement SERIES
- -h, --help¶
show this help message and exit
- -r <policy>, --retention-policy <policy>¶
write to retention policy POLICY
- -t <tag=value>, --tag <tag=value>¶
attach TAG=VALUE to all data points
- -p {ns,us,ms,s,m,h}, --precision {ns,us,ms,s,m,h}¶
set timestamp precision to PRECISION
- --batch-size <batch-size>¶
submit data in groups of BATCH-SIZE points
glasgow run sensor-pmsx003 log influxdb2¶
Log data to an InfluxDB 2.x endpoint over HTTP(S).
usage: glasgow run sensor-pmsx003 log influxdb2 [-h] [-t TAG=VALUE]
-p PRECISION
[--batch-size BATCH-SIZE]
--token TOKEN
ENDPOINT ORGANIZATION BUCKET
SERIES
- endpoint¶
write to endpoint URL //ENDPOINT/api/v2/write
- organization¶
write to Organization ORGANIZATION (can be either the name or the id)
- bucket¶
write to bucket BUCKET
- series¶
write to measurement SERIES
- -h, --help¶
show this help message and exit
- -t <tag=value>, --tag <tag=value>¶
attach TAG=VALUE to all data points
- -p {ns,us,ms,s,m,h}, --precision {ns,us,ms,s,m,h}¶
set timestamp precision to PRECISION
- --batch-size <batch-size>¶
submit data in groups of BATCH-SIZE points
- --token <token>¶
set the Token to use for Authentication
glasgow run sensor-pmsx003 log stdout¶
Log data to standard output in a human-readable format.
usage: glasgow run sensor-pmsx003 log stdout [-h]
- -h, --help¶
show this help message and exit
glasgow run sensor-pmsx003 measure¶
usage: glasgow run sensor-pmsx003 measure [-h]
- -h, --help¶
show this help message and exit
API reference¶
- exception glasgow.applet.sensor.pmsx003.PMSx003Error¶
- class glasgow.applet.sensor.pmsx003.PMSx003Interface(logger: Logger, uart_iface: UARTInterface)¶