RRD4J for Contact item

Hi,

I am wondering whether you have tried logging Open/Closed states of Contact item on RRD4J? Switch’s ON/OFF states are automatically converted to 1 and 0. How about Contact? I could’t get it to work as no RRD files are created for Contact items. Thanks

It sounds as if you have tried to persist your contact item with rrd4j already. Since it doesn’t work I 'd suggest to create a new number item that is set by a rule each time the contact item changes ( case On set to 1 , care Off set to 0). Persisting that number item should be no problem.

Hi,

I’ve tried exactly what @lsafelix75 has asked for, in a little bit different way, @opus described.

The Item is purely

Number Fenster_SZ_Datenbank "Schlafzimmerfenster" <contact> (gContact)	{channel="max:shuttercontact:KEQ0532414:NEQ0847239:contact_state"}

The .persistence file then looks like this:

Items{
	
	gTemp* : strategy = everyMinute, restoreOnStartup
	gContact* : strategy = everyMinute, restoreOnStartup
}

The chart shows “0” for a closed contact and “1” for a opened window. It is not necessary to put it into a rule, because the contact item is updated at changes, and the persistence contains the group, the contact belongs to.

For showing in the stiemap, of course there is another item (type Contact). At the beginning, I had both in one item anyhow working, but I struggled with the mapping, so I created the database item.

But in the future (depending on the rrd4j-setup), the values will be “averaged”, what will lead to 0.xx-values in longer timeframes.

Regards,
Thorsten

This database has this feature build in in order the limit the size of it. The feature of averaging values is either selected by using the default setup or by selecting it deliberately. In other words YOU can setup rrd4j in a way that no averaging is done. For example: If you want to have an exact value for each minute over the last week just use only one archive which holds those value for that time frame.