There have been older posts which talk about using external to openHAB tools in order to be able to see and modify Item values stored in a RRD4J database. However with openHAB 4 we have the API Explorer available and there is a REST interface for Persistence. This is why I would like to stick to system provided tools.
On the Item Level you can find “Get”, “PUT” and “DELETE”.
I was able to manage to query a current items state and was also able to do this for a specific time e.g.:
(http://192.168.0.250:8080/rest/persistence/items/MY_Odometer?serviceId=rrd4j&starttime=2023-08-06T02%3A00%3A00.000&endtime=2023-08-06T03%3A01%3A00.000)
With that result I tried to use the Delete function but what I get back is this:
(http://192.168.0.250:8080/rest/persistence/items/MY_Odometer?serviceId=rrd4j&starttime=2023-08-06T02%3A00%3A00.000&endtime=2023-08-06T03%3A00%3A00.000)
{
"error": {
"message": "Persistence service not modifiable: rrd4j",
"http-code": 400
}
}
The reason I want or have to delete or modify the already stored values up to August 6th is that the values stored before where like in “meters” and now they are stored (as I want it and finally works well with 4.x) in “kilometers”.
Is there a way with openHAB standard abilities to delete the older values?
(I am currently running openHAB 4.0.2)
Thanks for any hint.