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
Many bindings have built virtual channels with some hairy logic to keep the "last update time". There is also dedicated profile which allows to track that items which do not have dedicated channels. While both are fair ways I believe there might be a support coming from framework core (read as openhab core) to retain this information in a volatile way without major complications to user setup.
This way could involve dedicated metadata provider which could track state changes and/or updates and make sure timestamps are retained and later provided to the UI and other elements.
Few reasons for metadata provider:
Using metadata does not require creation of additional items.
It exists and is associated with item already.
Can be consumed in limited way by UI (by using oh-repeater).
What is currently missing is disclosing metadata values further through SSE, so eventual update of metadata will not be reflected in all places in a same way. I am also not sure how metadata could be consumed in rules, yet this is so far proposal to provide an unified way to track update time across all bindings.
The text was updated successfully, but these errors were encountered:
Now when I think of it, making it part of the item would make more sense. Update time could be streamed via SSE and utilized just like state and displayState. Not sure of how much impact it would have on openhab cloud, but adding an attribute to SSE stream is not a problem. Having it as part of state is fine on backend side too, but then encoding of state might be affected. I don't have a clear idea how we could pass a state from now and now -1 so TypeParser can deal with it.
I think the TypeParser should set the timestamp to null and whoever calls the type parser could add that information via a setTimestamp method. Another way would be to extend the parseCommand/parseState methods with an additional parameter for the timestamp.
Many bindings have built virtual channels with some hairy logic to keep the "last update time". There is also dedicated profile which allows to track that items which do not have dedicated channels. While both are fair ways I believe there might be a support coming from framework core (read as openhab core) to retain this information in a volatile way without major complications to user setup.
This way could involve dedicated metadata provider which could track state changes and/or updates and make sure timestamps are retained and later provided to the UI and other elements.
Few reasons for metadata provider:
What is currently missing is disclosing metadata values further through SSE, so eventual update of metadata will not be reflected in all places in a same way. I am also not sure how metadata could be consumed in rules, yet this is so far proposal to provide an unified way to track update time across all bindings.
The text was updated successfully, but these errors were encountered: