sensor-bmx280

CLI reference

glasgow run sensor-bmx280

Measure temperature and pressure using Bosch BMP280 sensors, or temperature, pressure, and humidity using Bosch BME280 sensors.

Only the I²C communication interface is supported.

usage: glasgow run sensor-bmx280 [-h] [-V SPEC] [--scl PIN] [--sda PIN]
                                 [--i2c-address ADDR] [-T FACTOR] [-P FACTOR]
                                 [-H FACTOR] [-I COEFF] [-p0 PRESSURE] [-a]
                                 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)

--i2c-address {118,119}

I2C address of the sensor (one of: 0x76 0x77, default: 0x76)

-T {0,1,2,4,8,16}, --oversample-temperature {0,1,2,4,8,16}

oversample temperature measurements by FACTOR (default: 1)

-P {0,1,2,4,8,16}, --oversample-pressure {0,1,2,4,8,16}

oversample pressure measurements by FACTOR (default: 1)

-H {0,1,2,4,8,16}, --oversample-humidity {0,1,2,4,8,16}

oversample humidity measurements by FACTOR (default: 1)

-I {0,2,4,8,16}, --iir-filter {0,2,4,8,16}

use IIR filter with coefficient COEFF (default: 0)

-p0 <pressure>, --sea-level-pressure <pressure>

use PRESSURE Pa as sea level pressure (default: 101325.000000)

-a, --altitude

calculate altitude

glasgow run sensor-bmx280 log

usage: glasgow run sensor-bmx280 log [-h] -i TIME DATA-LOGGER ...
-h, --help

show this help message and exit

-i {0.0005,0.0625,0.125,0.25,0.5,1.0,2.0,4.0}, --interval {0.0005,0.0625,0.125,0.25,0.5,1.0,2.0,4.0}

sample each TIME seconds

glasgow run sensor-bmx280 log csv

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

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

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

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

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

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

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

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

show this help message and exit

glasgow run sensor-bmx280 measure

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

show this help message and exit

API reference

Todo

Add API documentation for sensor-bmx280.