I have a weird issue pertaining to an item and persistance.
I’m using InfluxDB as my persistance provider.
The item i am monitoring is a door reed switch as a “Contact” in openhab items.
I can get previous state and other values no problem via persistance but when i attempt to get the date/time of last change its going way back in time:
The following rule:
rule "vTest" when Item vTest changed then logInfo(filename+".vTest", "Previous State: ["+ vGarageDoor.previousState(true).state +"]") logInfo(filename+".vTest", "Last Opened ["+vGarageDoor.previousState(true).timestamp.until(now, ChronoUnit.SECONDS)) logInfo(filename+".vTest", "Last Update ["+vGarageDoor.lastUpdate +"]") end
The previous state is correct, its the date/time that is incorrect. If i were to rename the item to another name and test persistance it works no problem so it appears there is some error in influxDB.
InfluxDB reports the following:
Is there a way to delete the item “vGarageDoor” from influxdb so all historic data is gone and it creates this item from scratch?
or another idea?