Skip to content

[timeseries] states not changing for a non-thing timeseries-item, but are shown in graph #19510

@binderth

Description

@binderth

Expected Behavior

I'm using a timeseries-item and let future states persist on that item. The item is not linked to a thing.
The graph is drawn as I told the persistence to: for past and future timestamps.
I used a rule for that, something like that:

      items.getItem("EMS_TibberPreisInterval").persistence.persist(futureTimestamp1, "3");
      items.getItem("EMS_TibberPreisInterval").persistence.persist(futureTimestamp2, "4");
      items.getItem("EMS_TibberPreisInterval").persistence.persist(futureTimestamp3, "1");
...

I would expect the item to change state accordingly
Example:

  • futureTimestamp1 is 15min in the future and different from current state
  • 15mins go by and item automatically changes to the futureTimestamp1 value
  • the graph is shown as the timeseries was built by the rule

Current Behavior

The item does not change the value, even if it has a timeseries, the standard persistence is jdbc and both the update is done via jdbc and persistence strategy for jdbc is forecast for that item.
The state of the items stays at the latest .postUpdate I triggered (via API or rule).
Example:

  • futureTimestamp1 is 15min in the future and different from current state
  • 15mins go by and item retains the "old" value
  • there is no change in state over time
  • but the graph is shown as "it should"

see more/context:
https://community.openhab.org/t/understanding-selfmade-timeseries-states-not-changing-for-future-persisted-states/166842

Possible Solution

somehow bind either the standard persistence to an automatic use of timeseries, also for for non-thing items.
or have some "special configuration" ready at item-level for those non-thing items.

Steps to Reproduce (for Bugs)

  1. create an item without a link to a binding
  2. have a rule in place to update future states for specific timestamps for that item (in the standard persistence)
  3. wait for future timestamps to go by
  4. item states don't change

Context

I'm trying to use my own logic for future states to solve issues facing with known or predicted states of items, which are not in the control of a binding.
I have two use cases:

  1. the obvious "dynamic pricing" for energy. I want a self-defined "level of cost", which then triggers specific actions once the item is asked. I don't want to repeat the logic for said level everytime some rule/script asks for it.
  2. the next thing on my list is to have a "consumption plan" ready, meaning, the future item states will represent actions I have planned for future timestamps like "starting the heating", "charging the EV", ...

for both scenarios (and surely more) I need the non-thing items to change states based on my "predictions" or "plans".

Your Environment

  • Version used: openHAB 5.0.1.
  • Environment name and version (e.g. Chrome 76, Java 8, Node.js 12.9, ...): current docker (openhab/openhab:latest)
  • Operating System and version (desktop or mobile, Windows 10, Raspbian Buster, ...): host is Linux Debian 12 (bookworm)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn unexpected problem or unintended behavior of an add-on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions