Display event logs in BasicUI


My OpenHAB is integrated with my alarm.
I have the following items that register who has armed/disarmed the alarm and when:

Number Tex_Alarm_Status			"Alarm status [MAP(tex_alarmstatus.map):%s]"					<alarm>		(gAlarm, gAlarmlogging)
Number Tex_Alarm_User			"User[MAP(tex_alarmusers.map):%s]"						<man_3>		(gAlarm, gAlarmlogging)
DateTime Tex_Alarm_Status_Update 	"Timestamp of arming/disarming the alarm [%1$td.%1$tm.%1$tY %1$tT]"		<clock>		(gAlarm, gAlarmlogging)

I want to show a table in BasicUI showing the last arm/disarm events. Something like:
User Status Time
John Armed 26.05.2017 19:27:39
Kate Disarmed 26.05.2017 18:20:30
John Armed 25.05.2017 19:27:39

Obviously sorted on “time” (newest record first).

Does anyone have an idea how to pull this of?

All three items are persisted in InfluxDB (EveryChange).
I first considered Grafana, but that seems to be more for graphs.

Also, I think the challenge is that these three items are technically independent from each other. They don’t have a common key field. They are updated ‘almost’ at the same time (by a rule), but there could be some milliseconds time difference between their updates…

Thank you for ideas!

I’d make three String Items, and have a rule triggered from your master item updating that populates the appropriate string with name and timestamp.

1 Like

Hi rossko57,
Thank you for your reply.

I’m not sure if I understand your proposal.
You mean, I should have these items:

String Tex_Alarm_Status_with_Timestamp
String Tex_Alarm_User_with_Timestamp
String Tex_Alarm_Status_Update_with_Timestamp

I can do that. But how do I go from there?

One scenario I was considering, was to have one new item, that is populated by concatenating the following items.
String Tex_Alarm_Logging = Tex_Alarm_Status + Tex_Alarm_User

Save updates of this item in influxDB and just use a Grafana table graph to display this particular item. But since this data is aggregated, I loose some filtering/sorting options.

That was essentially what I was suggesting for ‘special items’, if you only wanted the last three or four, or the last per user. No faffing with database and graphs, where only recent action is of interest.

If monthly analysis or whatever is really needed, then go with your variation.

Thank you for your input.

If I would need to see the last 10 records, I would have to add 10 additional items.
Each item being a string and containing user name, arm/disarm status and a time-stamp.
A rule (triggered by arming/disarming the alarm) would update these values (oldest value removed, newest value added).
I realize this could work.

I was just wondering, is there no way to leverage persistence for this? I would like apply this approach to multiple items (not just the alarm), and maybe keep more than 10 records. My number of items would explode with this approach.