Hi All, I am running openHAB 1.8 with a mySQL server and am trying to view a chart of how many lights in total are turned on.
I have a group item defined as follows
Group:Switch:OR(ON, OFF) Lights "All Lights [(%d)]" (All)
and a persistence config as:
Strategies {
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
default = everyChange
}
Items {
Lights : strategy = everyChange, everyHour, restoreOnStartup
}
Lights are controlled individually but the counter “%d” works as I would like it to, unfortunately when I try to view the number of lights as a history chart (i.e. chart?items=Lights&period=h&service=mysql) it shows up as empty.
I’m guessing this happens because I should be using type “Number”, if this is the case how do I count the ON states of the group so that I can store it in a new Item which persists?