Graphing sensors (open/closed)

Hello all,

I have a few motion sensors and a few door open/closed sensros that I implement in openHAB via the Contact tiem. Contact items are either “open” or “Closed”. I want to graph their historical states, but not sure how since there is not a numerical value. I know I can write a rule to set some variable to 1 or 0 based on open/closed and plot that variable, but wasn’t sure if there was a better way to do this.



Set up persistence and chart the Item. This should work in OH 1 as I believe it stores CLOSED as 0 and OPEN as 100. However, this appears to have changed in OH 2 so if you want a more future proof solution you need to create a Number Item that you persist and rules to populate the Number Item when you contact changes.

Thanks - I’ll have to verify, but that is what I had done. It didn’t work so I had suspected an issue with trying to plot open/closed, but maybe I had another issue. Thanks for the help!

That still is an issue not been fixed