Best way to monitor "spike" external events like sensor restart?

  • Platform information:
    • openHAB version: 2.4.0 Release

I use a bunch of tasmotas, mqtt and HABPabel.

One of my tasmotas is rebooting from time to time and I’d like to put that on a timeline to see if it correlates to any other activity in the system. But I don’t find the right type of Item for this.
Tasmota sends the message to the “tele/” topic upon startup, reporting the reason for restart: {“RestartReason”:""}. No time is present in the message.
I can monitor this topic and extract the reason as String, but that produces something with a state. I.e. basically I will know the last reboot reason, but if there were several of the same type – the state will not change. I can create a rule that will monitor item update, but what kind of information shall it send? My issue is that (as far as I can see) the whole system is more state-oriented. DateTime may be what I need, but I don’t see the way to show a series of DateTimes in HABPanel.
A trivial solution would be to set some Item to On and then to Off in a rule. This transition will be visible on the timeline. Is there is a more elegant way?

I don’t use HABPanel but you can BasicUI to give you a timestamp when something occurs.

Here’s an example item that lets me know when the garage door has been opened/closed.

DateTime Garage_update "Last change [%1$tm/%1$td %1$tH:%1$tM]" <door>

You can use a rule with proxy item and do the same to give you the timestamp of when your device does something.

A typical way to do this would be to configure persistence on the Item and use Grafana, perhaps with the discrete plugin, to generate charts.