Persistence method to store historical data [message #1730566] |
Tue, 26 April 2016 16:59 |
Chris Jackson Messages: 256 Registered: December 2013 |
Senior Member |
|
|
I would like to suggest adding a new PersistenceService method -: store(HistoricState), or, store(time, state)...
I have two use cases for this -:
1) A number of devices these days provide an internal storage of historic data, and to conserve battery, it is recommended not to poll the data regularly, but to grab it in slower time. This sort of function is not currently possible as we can only store data with the current time. Some ZWave devices do this, and quite a few BLE devices look like they request this to reduce battery. (AMR devices being a good example here).
2) If we want to aggregate data, for example to store a daily value, it would have to be stored at the end of the day, and would actually be stored with the next days date. I know we can get around this by adjusting the times after the query, but it's not nice.
I appreciate this may not work on all persistence services (e.g. rrd), but I still think it's a useful feature as devices become more complex and feature rich.
Of course, for OH2 there is no persistence defined other than the OH1 API - I'm not sure if there's something completely new planned, either way, I think this ought to be included...
This is just for discussion at the moment - not urgent - but I wanted to throw it in to the pipeline for future consideration.
Chris
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02604 seconds