[SOLVED] Counter for on command in the gui of grafana

Dear community,

i have a Sonoff with tasmota (ON,OFF command) that open close an actuator.
Now i will create an singlestat in grafana, but have no experience with it.

i have add the item into the influxdb.persist:

Items {
        ...
	Actuator_* : strategy = everyChange
}

My item called Switch Actuator_FF_Bath

And now i will have a counter in grafana that i can see how often the sonoff get the ON command (than the actuator is opening).

Does someone know how i need to configure grafana for that, and it should also work with the custom range (only today, the last 7 days, this month …)

2019-01-08_12h52_30

That wrong then
Should be:

Items {
        ...
	Actuator_FF_Bath : strategy = everyChange
}

For your grafana config:
Datasource: openhab
SELECT/field(value)/distinct()

Then play around, your can’t break anything
If you get too confused, delete the panel and create a new one
There are lots and lots of options
The Grafana website help is very good

Play around, that’s how I learned, it’s the best way

1 Like

Thank you for the reply.

about the influxdb.persist, i will add more Actuators later and will not add every item individually.
So i have done this * that he will also write data into the database when i add a item called Actuator_GF_Bath for example, or do I still have an error?

You need to add your items in a group and persist the group:

Group myGroup
Number myItem1 (myGroup)
Number myItem2 (myGroup)

Persistence:

Items {
        ...
	myGroup* : strategy = everyChange
}

See:


And

1 Like

Put simply, the * does not mean wildcard in this use. Docs explain.

1 Like

oh ok, thank you