Categorygithub.com/go-sensors/rpi-sensor-exporter
module
0.0.0-20230614150748-ca5fd310ee6c
Repository: https://github.com/go-sensors/rpi-sensor-exporter.git
Documentation: pkg.go.dev

# README

go-sensors/rpi-sensor-exporter

A program to read data from sensors using the go-sensors libraries and reporting with Prometheus.

Quickstart

Deploy with Balena

By default, no sensors are enabled. When deploying with Balena, set the *_ENABLED environment variables for your sensors to start reading from them.

Environment variableDescriptionDefault valueValid values
EXPORTER_METRICS_SERVER_ADDRAddress (host:port) to which to bind for hosting the Prometheus metrics server:9000Any valid host and port combination; host may be empty to bind on all available addresses
EXPORTER_LOG_LEVELDetermines the amount of detail included in the log outputwarnfatal, error, warn, info, debug
EXPORTER_ASAIRAHT10_ENABLEDEnable the Asair AHT10/AHT20 temperature and relative humidity sensorsfalsetrue, false
EXPORTER_ASAIRAHT10_I2C_BUSNumber of I2C bus on which to find the sensor1Any valid I2C bus available to the device. On Raspberry Pi, I2C buses 0 and 1 are typically configured on the GPIO header
EXPORTER_ASAIRAHT10_I2C_ADDR7-bit I2C address of the sensor0x38 (dec 56)A valid 7-bit I2C address. May be specified in decimal or in hexadecimal when prefixed with 0x
EXPORTER_CUBICPM1003_ENABLEDEnable the Cubic PM1003 particulate matter sensor for measuring air qualityfalsetrue, false
EXPORTER_CUBICPM1003_DEVICE_PATHPath or name of block device through which to communicate with the sensor's UART interface/dev/ttyAMA0Any valid path to a block device where the sensor is connected. Depending on the Raspberry Pi model, there may be two or four UARTs configured on the GPIO header.
EXPORTER_PLANTOWERPMS5003_ENABLEDEnable the Plantower PMS5003 particulate matter sensor for measuring air qualityfalsetrue, false
EXPORTER_PLANTOWERPMS5003_DEVICE_PATHPath or name of block device through which to communicate with the sensor's UART interface/dev/ttyAMA0Any valid path to a block device where the sensor is connected. Depending on the Raspberry Pi model, there may be two or four UARTs configured on the GPIO header.
EXPORTER_SENSIRONSCD30_ENABLEDEnable the Sensiron SCD30 gas sensorfalsetrue, false
EXPORTER_SENSIRONSCD30_I2C_BUSNumber of I2C bus on which to find the sensor1Any valid I2C bus available to the device. On Raspberry Pi, I2C buses 0 and 1 are typically configured on the GPIO header
EXPORTER_SENSIRONSCD30_I2C_ADDR7-bit I2C address of the sensor0x61 (dec 97)A valid 7-bit I2C address. May be specified in decimal or in hexadecimal when prefixed with 0x
EXPORTER_SENSIRONSGP30_ENABLEDEnable the Sensiron SGP30 gas sensorfalsetrue, false
EXPORTER_SENSIRONSGP30_I2C_BUSNumber of I2C bus on which to find the sensor1Any valid I2C bus available to the device. On Raspberry Pi, I2C buses 0 and 1 are typically configured on the GPIO header
EXPORTER_SENSIRONSGP30_I2C_ADDR7-bit I2C address of the sensor0x58 (dec 88)A valid 7-bit I2C address. May be specified in decimal or in hexadecimal when prefixed with 0x

Building

TBD

Code of Conduct

We are committed to fostering an open and welcoming environment. Please read our code of conduct before participating in or contributing to this project.

Contributing

We welcome contributions and collaboration on this project. Please read our contributor's guide to understand how best to work with us.

License and Authors

Daniel James logo Daniel James

license GitHub contributors

This software is made available by Daniel James under the MIT license.

# Packages

No description provided by the author