SLightliMon examples
Index
Usage examples
Text input example
Output example
Usage examples
Example 1
- Three-phase system to be analyzed
- from 9 a.m. of Sun, 13 Sep 2015 to 9.00 a.m of Mon, 14 Sep 2015 (GMT+2 DST)
- with three different OFF-state power consumptions: 180W, 50W and 75W for phases 1, 2 and 3, respectively
- without using averaging (-at 1)
- comparing with 5 previous reference days
- detecting power anomalies greater than 400W AND the 2% of the reference profile, which must have a minimum duration of 30 minutes, and which are separated from ON and OFF events by at least 10 minutes
python slightlimon_alarm-detector.py -ts 1442127600 -te 1442214000 -p1 p1_p_filename.rrd -v1 p1_v_filename.rrd -p2 p2_p_filename.rrd -v2 p2_v_filename.rrd -p3 p3_p_filename.rrd -v3 p3_v_filename.rrd -po1 180 -po2 50 -po3 75 -at 1 -rd 5 -aps 400 -arps 2 -atm 30 -agt 10 -e e_filename.rrd -c pf_filename.rrd
Example 2
- Single-phase system to be analyzed
- from 4 p.m. of Sun, 18 Oct 2015 to 9 a.m. of Mon, 19 Oct 2015 (GMT+2 DST)
- with an OFF-state power consumption of 30W
- using an average time of 5 minutes
- comparing with 3 previous reference days
- detecting power anomalies greater than 100W AND the 1% of the reference profile, which must have a minimum duration of 20 minutes, and which are separated from ON and OFF events by at least 10 minutes
- without checking energy and power factor data
python slightlimon_alarm-detector.py -ts 1445176800 -te 1445238000 -p1 p1_p_filename.rrd -v1 p1_v_filename.rrd -po1 30 -at 5 -rd 3 -aps 100 -arps 1 -atm 20 -agt 10
Text input example
On the GitHub repository, here, you can find a ZIP file containing example power and voltage data of a single-phase system. The files span the period from 9.00 a.m. of a certain day N till 8.59 a.m. of day N+1, and contain also the profiles of 5 reference days.
Output example
The following output example is presented only for explaining the fields of the output JSON string. It should not be considered as a real case. The actual output does not contain indentation spaces nor comments, and field order may be different depending on your system.
{
# list of errors, if any
"errors": [],
# list of warnings, if any
"warnings": [],
# all results are contained here
"results": {
# results of power/voltage analysis
"phases": {
# each phase has a dedicated structure
"0": {
# power/voltage data availability
"availability": 1.0,
# switch ON and OFF timestamp lists. Each
# timestamp is associated to a value which
# represents the expected time precision
# of the detection, in minutes.
# 0 indicates the highest precision (certain detection)
"switch_markers": {
"on": {
"t": [
[
1442165040,
0
],
[
1442208060,
0
]
]
},
"off": {
"t": [
[
1442207940,
0
],
[
1442208240,
0
]
]
}
},
# results of the voltage anomaly analysis
# indicates the number of minutes showing
# over- and under-threshold voltage values
# and an alarm flag
"v": {
"high_dt": 0,
"low_dt": 0,
"alarm": 0
},
# results of the comparison with reference data
"reference": {
# reference data availability
"availability": 1.0,
# list of power anomalies
# on/off: actual profile is higher/lower than
# reference profile
# results are contained in three lists
# which indicate
# t: the beginning timestamp of anomalies
# dt: their duration
# dp: the maximum power offset during
# the anomaly period
"anomaly_markers": {
"on": {
"t": [1442172240],
"dt": [49],
"dp": [782]
},
"off": {
"t": [],
"dt": [],
"dp": []
}
}
}
},
"1": {
"availability": 1.0,
"switch_markers": {
"on": {
"t": [
[
1442165040,
0
]
]
},
"off": {
"t": [
[
1442208660,
0
]
]
}
},
"v": {
"high_dt": 0,
"low_dt": 0,
"alarm": 0
},
"reference": {
"availability": 1.0,
"anomaly_markers": {
"on": {
"t": [],
"dt": [],
"dp": []
},
"off": {
"t": [],
"dt": [],
"dp": []
}
}
}
},
"2": {
"availability": 1.0,
"switch_markers": {
"on": {
"t": [
[
1442165040,
0
],
[
1442208120,
0
]
]
},
"off": {
"t": [
[
1442207940,
0
],
[
1442208180,
0
]
]
}
},
"v": {
"high_dt": 0,
"low_dt": 0,
"alarm": 0
},
"reference": {
"availability": 1.0,
"anomaly_markers": {
"on": {
"t": [],
"dt": [],
"dp": []
},
"off": {
"t": [],
"dt": [],
"dp": []
}
}
}
}
},
# results of the analysis of energy data
"energy": {
"availability": 1.0,
# energy consumption in the analyzed period
"offset": 192.25,
# results of the comparison with reference data
"reference": {
"availability": 1,
# median energy consumption calculated from
# reference data
"offset": 184.0966669999998,
# alarm flag if actual energy consumption is
# -1 / 1: lower/higher than in the reference data
"alarm": 0
}
},
# results of the analysis of power factor data
"cosphi": {
"availability": 1.0,
# total duration of low cos(phi) periods during ON state
"low_dt": 0,
# average cos(phi) value during low_dt periods
"low_avg": null,
# alarm flag
"alarm": 0
}
}
}