Currently I am using the pimatic-homeduino that will get the gpio status of the devices connected like door sensors, PIR sensors. Each movement by a person, the gpio pin (using commands DHT/DR/AR) will be triggered. Each trigger should be shown in the graphic.

How to add an event (value 1 or higher) of this trigger in the database? A collection of events should be displayed in shape of a bargraph, indicated per hour or day. A good example is the bargraphs of the home automation Bwired ( See bargraphs “Doors & Windows”, “Freezer” and “Fridge” as examples. Is there an example (like an event generator via rules, apply an accumulator as variable)? How can we realize the accumulator per hour/day?

Any suggestion is welcome.