Dear Kai,
I'm playing with energy/overload manager and I've to poll every xx-seconds several items.
Googling around searching for solutions I ended-up to this thread.
I do agree with your rationals, but nevertheless I think such a feature would be quite useful.
I played a while and I tried to find an implementation that could fit without screwing-up too many things.
I'm not really happy with what I have right now, but before proceeding I would like share/discuss together.
Find below a brief overview of the proposed solution:
- a new "fake" binding tag "reloadable" is used to tag items that do supports reloading
- at GenericItem level a reloadable property has been added
- a new RefreshCommand type has been added
- instances of item classes extending GenericItem could be created with reloadable set to true or false. Instances having reloadable set to true will return a list with one more command (the RefreshCommand) compared with the not reloadable
- any binding supporting reloadable command will be changed to deal with this new command (I tried with KNX)
Waiting for your feedback.
Best Regards,
Andrea
p.s. a partial very preliminary implementation can be found on my fork jock71/openhab