“Analyze” string items

Hey everyone, I wasn’t sure where to put this one so if anyone has any suggestions I’ll happily delete this post and create a new one in the correct place.

Right so , we have the nifty “analyze” graph in OH which works great with switches and all kinds of values:

But for string items I haven’t been able to figure out how to get a similar graph view. For example:


I have a bme688 that has an item that switches between calibrating, calibrated, uncertain, stabalyzing. And I would like to have a graph showing the ins and outs of these values directly on OpenHAB exactly like I can see how long a switch was on or off.

Is this something that I can work natively in OpenHAB?

Not a pretty solution, but it works: Write a rule that maps the string values ​​into numbers and store them in a new number item.

2 Likes

@ThomasM102 suggestion is ornament the best approach.

Another would be to create switch Items for each state and flip them ON/OFF as the device transitions through the various states.

Instead of a line graph you’ll get the bars of color (each switch will get it’s own color) like in your screenshot.

But as I’m sure you surmise by now, directly charting String Items is not supported. You’ll need to transform them into something that can be charted.

2 Likes

Good solutions indeed and both solve the core of the question. I might go with the numbers simply because I can make it work with just one rule and one number item.
It’s a shame though that we don’t have it native.
I might take the time to think and create a feature request in GitHub and see if it sticks :slight_smile: thank you both, @ThomasM102 and @rlkoshak !

1 Like

With the Switches you can make it work with no rules and Profiles with the MAP transformation.