MainUI Widget with graphical timeline of item historical states

Meanwhile, I made a fresh installation of OpenHAB 5.0.1 on another machine and add a new thing & item to connect to my zwave contact device (I use zwave-js-ui so that it is easy to share a device between OpenHAB instances). With this new instance of OpenHAB, the rrd file seems ok with 0 and 1 since the creation of the item (NaN before the creation).

Thus, may be the rrd file on my production machine (rpi4 with openhabian) was corrupted in the past (I have successively upgraded from OpenHAB 3.x till OpenHAB 5.0.1 over the past years).

Anyway, with the fresh installation, I have still a problem when displaying the oh-state-series:

The status of the door is marked as OPEN at 9:20:23 although the rrd file shows a 0 at that time stamp.

So it seems that it is not only a persistence problem but a problem when using rrd4j with the os-state-series implementation.

Is there a way to log the value when the JS script defined in the mapState is executed ?

I do not want to bother you too much with this problem which is not very critical for me. It is a good opportunity to add a new persistence service such as InfluxDB in my production system.