jordyv / prometheus-p1-exporter Goto Github PK
View Code? Open in Web Editor NEWPrometheus exporter for metrics fetched from a smart meter with a P1 cable.
Prometheus exporter for metrics fetched from a smart meter with a P1 cable.
Hoi,
Zou je de metric namen aan willen passen volgens de regeltjes/best practices?
https://prometheus.io/docs/practices/naming/
Dus allemaal prefixen met dsmr_
of p1_
:)
I just started to use this exporter (thanks!) on a RPI 3B with Raspbian. After successful compilation all runs fine as a systemd service but I noticed that after the first "poll" all values are zero and exported as such, except for the gas reading, snippet of the verbose output (truncated):
Start listening at 127.0.0.1:8888
Line to parse map[0-0:1.0.0:221013213043S 0-0:96.1.1:XXXXXXXXXXXXXXXXXXXX 0-0:96
{Timestamp:221013213043 ElectricityUsageLow:2697.465 ElectricityUsageHigh:2967.323 Electricity
Line to parse map[0-0:96.13.0: 0-0:96.14.0:0002 0-0:96.7.21:00008 0-0:96.7.9:00002 0-1:24.1.0:
{Timestamp:0 ElectricityUsageLow:0 ElectricityUsageHigh:0 ElectricityReturnedLow:0 Electricity
Line to parse map[0-0:96.13.0: 0-0:96.7.21:00008 0-0:96.7.9:00002 0-1:24.1.0:003 0-1:24.2.1:01
{Timestamp:0 ElectricityUsageLow:0 ElectricityUsageHigh:0 ElectricityReturnedLow:0 Electricity
Line to parse map[0-0:96.13.0: 0-0:96.14.0:0002 0-0:96.7.21:00008 0-0:96.7.9:00002 0-1:24.1.0:
{Timestamp:0 ElectricityUsageLow:0 ElectricityUsageHigh:0 ElectricityReturnedLow:0 Electricity
The first "Timestamp" lines is correct but all the others are 0...
Before I try to troubleshoot myself (kinda new to go) I wonder if that rings a bell that can point me in the right direction (otherwise I'll fork the code and try to fix/understand it).
PS: after a reboot and serve restart (just for the sake of completeness) I'm now getting correct values everytime...
Hello!
First of all, thank you for this very nice piece of free software.
You owe me absolutely nothing, but I'd very much appreciate if you could make the usb serial device configurable. It's not always /dev/ttyUSB0...
Here's an anecdote. I tested your software on two laptops; same make, same model, same software stack. prometheus-p1-exporter worked on the first one but not on the second. Five seconds of head scratching. Turns out the second one had a modem on board. That made the usb serial device identify not as /dev/ttyUSB0, but as /dev/ttyUSB3 !
Thanks again for your work on free software. Much appreciated!
Mark
P.S. A more common scenario might be the device collecting the metrics reading logs from two usb serial ports...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.