sensor-sen5x

CLI reference

glasgow run sensor-sen5x

Measure PM, NOx, VOC, humidity, and temperature using Sensirion SEN5x sensors connected over the I²C interface.

NOTE: The SEL pin must be connected to ground before startup for the SEN5x to enable the I2C interface.

usage: glasgow run sensor-sen5x [-h] [-V SPEC] [--scl PIN] [--sda 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’)

--scl <pin>

bind the applet I/O line ‘scl’ to PIN (default: ‘A0’, required)

--sda <pin>

bind the applet I/O line ‘sda’ to PIN (default: ‘A1’, required)

glasgow run sensor-sen5x log

usage: glasgow run sensor-sen5x log [-h] DATA-LOGGER ...
-h, --help

show this help message and exit

glasgow run sensor-sen5x log csv

Log data to a comma-separated value (CSV) file.

usage: glasgow run sensor-sen5x 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-sen5x log influxdb

Log data to an InfluxDB 1.x endpoint over HTTP(S).

usage: glasgow run sensor-sen5x 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-sen5x log influxdb2

Log data to an InfluxDB 2.x endpoint over HTTP(S).

usage: glasgow run sensor-sen5x 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-sen5x log stdout

Log data to standard output in a human-readable format.

usage: glasgow run sensor-sen5x log stdout [-h]
-h, --help

show this help message and exit

glasgow run sensor-sen5x measure

usage: glasgow run sensor-sen5x measure [-h]
-h, --help

show this help message and exit

glasgow run sensor-sen5x start

usage: glasgow run sensor-sen5x start [-h]
-h, --help

show this help message and exit

glasgow run sensor-sen5x stop

usage: glasgow run sensor-sen5x stop [-h]
-h, --help

show this help message and exit

API reference

Todo

Add API documentation for sensor-sen5x.