RRD4J item store problem

  • Platform information:
    • Hardware: ARM/1GB Cubieboard
    • OS: Arch LINUX ARM
    • Java Runtime Environment: OpenJDK Client VM (Zulu Embedded 8.20.0.42-linux-aarch32hf) (build 25.121-b42, m ixed mode, Evaluation)

I have a problem with one of my items in persitence.
I store in rrd4j only 2 items.
Bath_Humi item stored in rrd4 without problems. Bath_Temp item stored in rrd4j database allways 0.

My configs bellow:
rrd4.persist:

Strategies {
        everyMinute     : "0 * * * * ?"
        everyHour       : "0 0 * * * ?"
        everyDay        : "0 0 0 * * ?"
        default = everyChange
}

Items {

	Bath_Humi  : strategy = everyMinute, restoreOnStartup, everyChange
        Bath_Temp  : strategy = everyMinute, restoreOnStartup, everyChange
}

rrd4j.cfg

rrd4j.def=COUNTER,120,-20,40,300
rrd4j.archives=AVERAGE,0.5,1,365
#rrd4j.items = Bath_Temp, Bath_Humi 

part of myhome.items

Number Bath_Humi                   "Ванная Humidity [%.1f °C]"      (Weather_Chart) {souliss="T53:0:0",autoupdate="true"}
Number Bath_Temp                   "Ванная Temperature [%.1f °C]"   (Weather_Chart) {souliss="T52:0:2",autoupdate="true"}  

Try that one:
Your may have to restart OH to kickstart it

Strategies {
        everyMinute     : "0 * * * * ?"
        everyHour       : "0 0 * * * ?"
        everyDay        : "0 0 0 * * ?"
        default = everyChange
}

Items {

	Bath_Humi, Bath_Temp  : strategy = everyMinute, restoreOnStartup, everyChange
}

Thank you! I try this before but this is not resolve problem. This problem appear after migration from OH1 to OH2.
I just copy config files/

Change

Number Bath_Humi "Ванная Humidity [%.2f]" (Weather_Chart) {souliss="T53:0:0",autoupdate="true"}

and restart OH.

Try simplifying it first:

Strategies {
        everyMinute     : "0 * * * * ?"
        everyHour       : "0 0 * * * ?"
        everyDay        : "0 0 0 * * ?"
        default = everyChange
}

Items {

	Bath_Humi, Bath_Temp : strategy = everyMinute
}
Number Bath_Humi                   "Ванная Humidity [%.2f °C]"      (Weather_Chart) {souliss="T53:0:0",autoupdate="true"}
Number Bath_Temp                   "Ванная Temperature [%.2f °C]"   (Weather_Chart) {souliss="T52:0:2",autoupdate="true"} 

does not help this-(

You don’t need °C for Humidity. You don’t see that, because you have a label in the sitemap.
But what about the restart.

@hr3,
The problem is not the formatting, that’s trivial
It’s the persistence

Number Bath_Humi                   "Ванная Humidity [%d %%]"      (Weather_Chart) {souliss="T53:0:0",autoupdate="true"}

Yes? of course.
systemctl restart openhab2.service
Bath_Temp and Bath_Humi identidal items. Humi works fine but temp not work.

Exactly in persisstence.
Responce in REST:

{
  "name": "Bath_Temp",
  "datapoints": "285",
  "data": [
    {
      "time": 1531214700000,
      "state": "0"
    },
    {
      "time": 1531215000000,
      "state": "0"
    },
    {
      "time": 1531215300000,
      "state": "0"
    },
    {
      "time": 1531215600000,
      "state": "0"
    },
    {

What do you mean?
What is the current value of Bath_Temp?

Current data both items is ok. Problem only in persistense Bath_Temp

events.log part:

2018-07-11 12:24:48.039 [vent.ItemStateChangedEvent] - Bath_Humi changed from 62.1875 to 63.59375
2018-07-11 12:24:48.059 [thome.event.ItemStateEvent] - TIMESTAMP_Node0 updated to 2018-07-11T12:24:47.000+0300
2018-07-11 12:24:48.085 [thome.event.ItemStateEvent] - Light updated to OPEN
2018-07-11 12:24:48.103 [thome.event.ItemStateEvent] - Fan_High updated to OFF
2018-07-11 12:24:48.150 [vent.ItemStateChangedEvent] - Received event of type ‘ItemStateChangedEvent’ under the topic ‘smarthome/items/TIMESTAMP_Node0/statechanged’ with payload: ‘{“type”:“DateTime”,“value”:“2018-07-11T12:24:47.000+0300”,“oldType”:“DateTime”,“oldValue”:“2018-07-11T12:24:37.000+0300”}’
2018-07-11 12:24:48.156 [vent.ItemStateChangedEvent] - TIMESTAMP_Node0 changed from 2018-07-11T12:24:37.000+0300 to 2018-07-11T12:24:47.000+0300
2018-07-11 12:24:48.175 [thome.event.ItemStateEvent] - Fan_Low updated to OFF
2018-07-11 12:24:48.192 [thome.event.ItemStateEvent] - Bath_Temp updated to 28.796875

Remove the autoupdate in your items you don’t need them.

Number Bath_Humi                   "Ванная Humidity [%d %%]"      (Weather_Chart) { souliss="T53:0:0" }
Number Bath_Temp                   "Ванная Temperature [%.1f °C]"   (Weather_Chart) { souliss="T52:0:2" }  

Try that:

Strategies {
        everyMinute     : "0 * * * * ?"
        everyHour       : "0 0 * * * ?"
        everyDay        : "0 0 0 * * ?"
        default = everyChange
}

Items {
	Weather_Chart* : strategy = everyMinute
}

And what does the openhab.log show when you change the persist file?

only one record:
2018-07-11 12:33:20.251 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘rrd4j.persist’

Good, (I thought there may have been some hidden character or something creating an error in the persist file. but there isn’t. that’s good news)

Is the temperature persisted now?

Unfortunatelly all adviсes can not resolve this problem. May be this is a bug? I try to persist another item and it work fine.

Is rrd4j the default persictense and do you use other persistence-services?
Do you post the whole rrd4j.persist?

I try to make mistakes (add ‘d’ symbol and ‘2’ symbol to my items) in rrd4j.persist :
Items {

Bath_Humid, Bath_Temp2  : strategy = everyMinute, everyChange

}
but log cannot recognize mistake: only one record:
2018-07-11 13:56:08.477 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘rrd4j.persist’

It’s persistence\rrd4j.persist