Skip to main content
PyPI-Server Build Status

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:

  1. Create a python virtual environment.

$ python3 -m venv venv
$ source venv/bin/activate
  1. Install arduino-exporter package with pip.

$ pip install arduino-exporter
  1. 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
  1. 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\"}}");
}

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)

Source distribution for arduino-exporter 0.8.15
File Size Uploaded
arduino_exporter-0.8.15.tar.gz 13.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arduino-exporter 0.8.15
File Interpreter ABI Platform
arduino_exporter-0.8.15-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.8.15 This release

2 release files

0.8.14

2 release files

0.8.12

2 release files

0.8.11

2 release files

0.8.10

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page