I was under the impression, that if said “futureTimestamp” was reached, the item would automatically change the state to that value (here: 3)?
The corresponding chart looks like this:
but the item itself still has some state given to it (via postUpdate without the persist-stuff) a long time ago? It still has the value 5 despite having the chart telling me it should have 3…
Do I need to configure something or doesn’t it work that way?
currently I’m running a rule, which regularly updates the state at the start of an interval (luckily the interval is known beforehand: every 15 minutes - dynamic spot prices). But is there something I could do, so a non-thing timeseries-item will update itself automatically?
I’m thinking that is a Bug (or at least a “missing feature”), so I opened an issue. I’m thinking the state of a “timeseries-item” will only be updated, because the binding told it to. As I’m using non-thing items, that mechanism isn’t in place…?
I bumped in this recently and what I ended up doing is systematically postUpdate(‘NULL’) to the state if it is changing to non NULL (e.g. restart)… this way NULL does not get persisted and the item value does not pollute my graphs.
I only update the persistency of the item in the past because I have access to the value only with a delay so I need to “fix the past”.
Not sure if it helps or not, but thought I’d share.
There are a few things that need to be in place for time series updates to work, most notably that the Item need to have forecast persistence strategy configured.
If you have that, have you tried creating a TimeSeries object in the rule and postUpdate that to the Item instead of using the persist action?
If it was for me!
Yes, of course the item is in the forecast strategy as are all my other binding-bouond items (like Tibber or ForecastSolar).
I’m not aware of a syntax for writing an object to a item, can you point me to the correct documentation for that? On the other hand, I’m wondering, what difference it would make to write a batch of timestamp-value objects instead writing everything seperate? But I can certainly try!
From what I can see it seems it’s not supported natively in jsscripting, so would have to be done by accessing the raw java types. I know jruby have support for TimeSeries, so if you would want to test it out quickly that might be easier.