Hi guys!
I’d like to use persistence with a door sensor (for other items it’s working) but I don’t know how to set this up…
I’m using mysql persistence.
I tried with 2 item definition like this:
But some times when you change type of item from number to string, mysql do not change it.
I have to manualy delete it from DB, or try give item another name.
Well, I figured it out…
I defined the door/window as number and the chart works.
Not at first, because I kept changing the item definition between switch, string and number and the mysql table was holding a mix of ‘ON’/‘OFF’/0/1, but I cleared the table corresponding to my item and everything work properly.
Yeah. Sorry, I missed this thread. Charts in OH2 can’t display SWITCH or CONTACT anymore (as they do not translate ON/OFF to 0/1 anymore like OH1 did).
So you need to have a numeric item type to get the chart displayed.