Arduino Prometheus Exporter
You can run this exporter on a device (PC or Raspberry PI) connected to an arduino. The exporter will listen to messages sent over the serial port and update the metrics exposed to prometheus. I used this project to visualize and trigger alerts for a lot of sensors values like sound, temperature and water level … etc
To use the exporter, follow the following steps:
Create a python virtual environment.
$ python3 -m venv venv
$ source venv/bin/activate
Install arduino-exporter package with pip.
$ pip install arduino-exporter
To run the arduino exporter process. You can use systemd to run the process on PC or Raspberry PI. The serial port value can be retrieved from arduino IDE.
$ arduino_exporter server run -s $serial_port -p $http_port
$ arduino_exporter server run -s /dev/cu.usbmodem14101 -p 8000
Upload a sketch to the arduino to send the metrics to the serial port.
#define LED 13
void setup() {
Serial.begin(9600);
pinMode(LED, OUTPUT);
}
void loop() {
digitalWrite(LED, HIGH);
delay(1000);
digitalWrite(LED, LOW);
delay(1000);
Serial.write("{\"type\": \"gauge\", \"name\": \"room_temp\", \"help\": \"the room temperature.\", \"method\": \"set\", \"value\": 14.3, \"labels\": {\"place\": \"us\"}}");
}
Metadata
Release files for arduino-exporter 0.8.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| arduino_exporter-0.8.15.tar.gz | 13.8 kB | Without provenance | Details for arduino_exporter-0.8.15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| arduino_exporter-0.8.15-py3-none-any.whl | Python 3 | none | any | Details for arduino_exporter-0.8.15-py3-none-any.whl |
Total release size: 24.5 kB
Release files / arduino_exporter-0.8.15.tar.gz
| Download URL | arduino_exporter-0.8.15.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca59bdd94edba6ad34cb29a709d5517e992d00f5046ba6246532cb96460b1170
|
|
BLAKE2b-256 checksum How to use checksums |
69e8a0d16cd57537ff7ddc266b4ce8498899489cb492ff33c93c36d0f3c3e4bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.22
|
Release files / arduino_exporter-0.8.15-py3-none-any.whl
| Download URL | arduino_exporter-0.8.15-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a4e6aa34ae1eeaef20c7cd35428f1646cb561bfc3741686a1e747a037193335
|
|
BLAKE2b-256 checksum How to use checksums |
e0ad2a7c1607d901cbd8f019af8257c6b0b6f66afbdd8cfb778eeebbea2228bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.22
|
Security for arduino-exporter 0.8.15
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.