-
-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Historic state updates from bindings #844
Comments
The bounty has also been migrated from ESH! After closing the ESH issue I claimed it myself. 💵 |
I have run into this issue while experimenting with bindings. After reading the related issues, as far as I can tell, no progress has been made on this? Would it still make sense to implement ModifiablePersistenceService? There is one main issue I can think of: Bindings usually do not work with items directly. I think there either needs to be an easy way for bindings to figure out what items new states should be persisted to, or ideally an option to provide historic states directly to channels (although I think that would require a lot more work). I think the best way forward would be to start compiling a list of all persistence services that could implement ModifiablePersistenceService and work with their maintainers? That would solve half of the problem and as the REST API already has the capability to work with these services, it would actually add some improved functionality by itself. |
There hasn't been any progress so far and I think the This issue is about providing the API in the core. The persistence add-ons can already implement a My use case for this would be to store historic state into persistence in the event that my openHAB instance was offline for some reason. Then when it is up and running again, the binding can request missing historic state from devices and persist it using this API. That way I would be less bothered about downtime. 🙂 |
Hi. I just stumbled over I plan to bulid some kind of Energy-Management system for my home working with predictive / forcast data. This data is a forcast for 'good' electrical energy (i.e. from corrently, as Visual or API/JSON) to schedule the operation hours of 'planable consumers' like washing mashine, heat pump, car charging.. An other use-case: weather-forcast data. When there is a temperature-forcast accessible I could pre-calculate the energy required for heating. And an air based Heat-Pump is most efficient during the time of day with the highest outside temperatures - so why not heat up the warm water storage buffer (vessel?) during these hours and fill up some further thermal energy storage for the cold night hours? Okay, mapping it down to OH: I think @wborn's concept might also work for future data - the The next part in the puzzle is: how to access the forcast data? Okay, at the current (quite early) state it would be great to have it accessible in the rule / scripting context. Maybe something like a Is my idea a possible use case or is it to abstract? |
@wborn I just had a look if this could be implemented. The But unfortunately it is only half of what you would need for your use-case. You would need a way to determine what is the last state/timestamp that was persisted through this channel. That's very difficult because a single channel can be linked to different items (which may or may not be persisted on different occasions) and one item may be linked to different channels (e.g. a |
@marvkis Please see a more blunt approach here; openhab/openhab-addons#12935 that does not require changes to core (but more implementation in each binding) |
I had a need for this feature and implemented it here #3000. |
Sounds like exactly the same use case I have @altaroca, so it is very nice of you to create a PR for this. 👍 I'm also planning to use this with influxdb so if there is a PR for implementing I just noticed there is openhab/openhab-addons#12935 for this. 🙂 |
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/update-things-channel-with-timestamp/143413/2 |
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/using-persistenceservice-in-binding/143477/9 |
With the implementation of eclipse-archived/smarthome#1872 there is now some basic infrastructure for handling historic state. However there still seems to be no API for historic state updates from bindings.
Ofcourse to get it all working there also needs to be a
ModifiablePersistenceService
implementation for this.See also:
The text was updated successfully, but these errors were encountered: