Hi,
I am looking for a special way to count/measure and analyse binary and analog signals.
My current software is a TIG stack and MQTT on a raspberry pi 3.0 (Grafana v5.0.0, InfluxDB 1.8.3, Telegraf 1.16.1)
I did a lot of research, but at the moment I am a little bit lost :-/
For simplicity I would like start with some graphics.
I get two different types of signals from my home automation system:
Binary signals (on/off) from doors, various switches, valves, etc. (the first 6 signals in the graph above).
Analog signals such as the power/current consumption of e.g. an refridgerator (the last signal in the graph).
I would like to do for all signals:
-
count the number of “on” events of each signal (analog/binary)
-
count the number of “off” events of each signal (analog/binary)
-
measure the over all “on” time of each signal (analog/binary) (Ton1+Ton2+Ton3+…)
-
measure the over all “off” time of each signal (analog/binary) (Toff1+Toff2+Toff3+…)
I would like to show these values in “Singlestat” panels and also in some “Graph” panels too - but not in the “Discrete Panel” addon.
- after some maintenance work (e.g. defrosting the fridge or replace a water valve after 100.000 switching times) I would like to compare the on/off times of the refrigerator/water valve before and after defrosting/replacement to prove how successful the maintenance work was.
So I am thinking to reset the counting and the time measurement to zero, and start again.
The external reset could be a button in Grafana, or maybee a http event from “outside” ?
While writing it down, I realized that it is very difficult to explain my special case
When topics 1 to 4 have been solved, I need a “marker” to identify the exact time of the event when some maintenance was performed. This “marker” should be a “hard” one so I was thinking about resetting all counts to zero.
The best solution would be to automatically switch between the different maintenance events, but I have no idea how this could be possible …
- Perhaps it is better not to do a “reset”, but to use a parallel signal/value as a “marker” (e.g. a time stamp that only changes when the maintenance work is finished) so that I can navigate between the events.
Could this “time stamp” be used to navigate in Grafana?
If some one can give me some advice how I can solve topics 1 to 5/6 I would be very happy.
Thank you in advance, Armin