Yes - I think this should be part of openHAB. We have item.state, we should have item.lastupdate (or something similar).
Chris
I don't think it can easily be handled in the persistence model. The persistence model doesn't get called when there is an update - only when there's a change, hence the PersistenceExtensions class has a "last updated" method, but not a "last changed" method.
Personally, I'd like to put it in the persistence model since then it can be restored on startup, but I think it just doesn't work unless there's a significant change to the model.
Chris
I'm reasonably sure what I said is correct. Certainly the persistence services themselves are only called when there's an update - maybe something in the persistence core could be a bit smarter, but the basic problem then becomes that you have to do one of the following -:
1) Store ALL updates of the persisted item - this increases the database a LOT.
2) Separately store another table that holds the last update time. This could be done in the mysql store at least, but there would have to be another method to do this.
In the persistence models, you have the "all changes" strategy - if there was an "all updates", this might do #1, but I don't think it would be a recommended method...
Chris
I think so - it could also (one day) be linked to the persistence system so that you get the last update time restored on startup, but I suspect that this is a bigger job....
Good man - well volunteered :)
Great - thanks Ben.
--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/3qCESoIBeEU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
Thanks for sharing your custom action, it works perfectly. Will the action ever become part of the official OpenHAB repository, and nightly builds (snapshots)? Will you continue to post updates for new releases of OpenHAB, like the current 1.6.1 release?
Regards
kl. 17:28:54 UTC+2 fredag 26. september 2014 skrev Eugene Schava følgende: