You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect that when I persist a state or timeseries with timestamps in the future, then the item will transition to these states at the future time.
Current Behavior
When there always exists a future state in the persistence layer for an item, then the item continues to update to the persisted state values at the future timestamps. As soon as that chain of future states no longer exists, the item stops updating. When more future states are added, the item does not update to these states.
Workaround: My fix to this is renaming the item and then renaming it back (I'm on file based config). Restarting openHAB also cures this.
Possible Solution
I wasn't sure where to log this issue, but I can also reproduce this adding a future state via the REST API where no future states exist. I wasn't expecting this as #4087 is resolved, which suggests this might be multiple issues or a common one.
var usageSeries = new items.TimeSeries('REPLACE');
usageSeries.add(time.toZDT().plusMinutes(1), '1');
usageSeries.add(time.toZDT().plusMinutes(2), '2');
usageSeries.add(time.toZDT().plusMinutes(3), '3');
items.MyItem.persistence.persist(usageSeries);
Create item and persistence, run script, see that state remains NULL (or previously restored state).
Rerun script, quickly rename item MyItem to MyItem1 and back to MyItem. See states are updated at timestamps.
Context
I retrieve future half hourly electricity prices, which I retrieve from an API ~ 16h00 every day, and they have the following day's prices through to 22h30. The retrieval is done by JS scripting, which generates a time series from API data, and stores this in an item, with a persistence strategy of forecast. As the price changes over time the item is updated with the current price.
In the rare event the prices are not available from the API until after 2230, the prices often eventually arrive, and are successfully persisted, but the item remains out of date, stuck on the previous value, despite their being database values for the current and future timestamps.
Your Environment
openHAB Docker openhab/openhab:latest on linux/amd64
InfluxDB 2.0
The text was updated successfully, but these errors were encountered:
I realise next steps are probably increasing debug levels on org.openhab.core.persistence.internal.PersistenceManager and the influxdb addon, will investigate further in time.
Expected Behavior
I expect that when I persist a state or timeseries with timestamps in the future, then the item will transition to these states at the future time.
Current Behavior
When there always exists a future state in the persistence layer for an item, then the item continues to update to the persisted state values at the future timestamps. As soon as that chain of future states no longer exists, the item stops updating. When more future states are added, the item does not update to these states.
Workaround: My fix to this is renaming the item and then renaming it back (I'm on file based config). Restarting openHAB also cures this.
Possible Solution
I wasn't sure where to log this issue, but I can also reproduce this adding a future state via the REST API where no future states exist. I wasn't expecting this as #4087 is resolved, which suggests this might be multiple issues or a common one.
Steps to Reproduce (for Bugs)
my.items
:influxdb.persist
script:
Create item and persistence, run script, see that state remains NULL (or previously restored state).
Rerun script, quickly rename item
MyItem
toMyItem1
and back toMyItem
. See states are updated at timestamps.Context
I retrieve future half hourly electricity prices, which I retrieve from an API ~ 16h00 every day, and they have the following day's prices through to 22h30. The retrieval is done by JS scripting, which generates a time series from API data, and stores this in an item, with a persistence strategy of forecast. As the price changes over time the item is updated with the current price.
In the rare event the prices are not available from the API until after 2230, the prices often eventually arrive, and are successfully persisted, but the item remains out of date, stuck on the previous value, despite their being database values for the current and future timestamps.
Your Environment
openHAB Docker
openhab/openhab:latest
onlinux/amd64
InfluxDB 2.0
The text was updated successfully, but these errors were encountered: