I have got several devices which produce a bad battery status with value=1 when bad. These tags were combined in one plot to save space on my web page.
Originally I created line plots varying from 0 (batt. ok) to 1 (batt. low). The disadvantage of this plot type is that only one low battery status is shown. The other low battery line plots (when they exists) are overwritten by the first one.
So I searched a way to overcome this problem. The solution is to use the sum value for each plot with each a unique aggregate_interval.
See the code below of my skin.conf file and the attached plots of the old and new presentation.
[[[weekbattery]]]
image_height = 140
# Make the y-axis increment at least 0.02 for the battery plot:
yscale = None, None, 0.02
plot_type = bar
[[[[txBatteryStatusSum]]]]
label = Battery status Davis tx
data_binding = vpro_binding
data_type = txBatteryStatus
aggregate_type = sum
aggregate_interval = 1200 # == 20 minutes
[[[[inTempBatteryStatusSum]]]]
label = Opus console
data_binding = ws28_binding
data_type = inTempBatteryStatus
aggregate_type = sum
aggregate_interval = 1800 # == 30 minutes
[[[[outTempBatteryStatusSum]]]]
label = tmp/hum
data_binding = ws28_binding
data_type = outTempBatteryStatus
aggregate_type = sum
aggregate_interval = 2400 # == 40 minutes
[[[[windBatteryStatusSum]]]]
label = wind
data_binding = ws28_binding
data_type = windBatteryStatus
aggregate_type = sum
aggregate_interval = 3000 # == 50 minutes
[[[[rainBatteryStatusSum]]]]
label = rain
data_binding = ws28_binding
data_type = rainBatteryStatus
aggregate_type = sum
aggregate_interval = 3600 # == 60 minutes
Cheers,
Luc