Can anyone please give me an overview of when the core sends the command RefreshType.Refresh to a binding? I know that it can be sent from a rule, but are there any circumstances when the core sends it? For example, is it sent if you hit the refresh button on the browser (e.g. in PaperUI, Basic UI or other UI…)

It is sent when linking a channel to an item for example.

1 Like

@Lolodomo many thanks for the response. Is it sent when for example you refresh the UI app in a browser?



It seems to me that this would be a useful feature to have (i.e. to add). That refreshing the browser screen, where an Item is displayed, should cause a Refresh command to be sent to the handler for the Thing/Channel to which that Item is bound.

=> What do you think?

No thanks.

Some technologies like zwave react poorly to a flood of active poll requests.
Some services like weather limit the amount of daily requests.

What problem are you trying to overcome here?
If you must, you can add a button to your UI that invokes a rule to REFRESH whatever you want.

I think there are technical hurdles to overcome here as well. In sitemap based UIs, a browser refresh gets “the sitemap” anew and re-renders it, starting at the “home” page. If you were on a sub-page, that’s lost. This is how it should work - it’s a browser operation on “the sitemap”, the mix of html and code that gets delivered to the browser.
I imagine HABpanel would be expected to do much the same. Don’t know about phone apps.

I’m don’t think there is any means at the OH end to tell a “refresh” from any other webpage request.

@rossko57 thanks for the insights.

I am doing some work to extend the features of the HD PowerView binding. In this system the hub keeps a cache of the states of its shades.

Obviously whenever you issue a command to one of the shades (via OH or via the HD App), the hub is involved in the command so it updates its cache. But if you position a shade via the HD remote, the remote talks directly to the shades and the hub is not in the loop. And in that case you have to tell the hub to do a full “discovery scan” of the shades in order to refresh its cache.

This “discovery scan” is time consuming, so it cannot be done every 60 sec (which is the polling interval), since if you had over 10 shades the discovery scan might exceed the polling interval.

So I have coded it so that the regular polling just queries the hub’s cache, and a Refresh command initiates the full “discovery scan”. As you say, the Refresh can be issued via a rule, and I have also added a Refresh switch type channel.

But nevertheless it would be cool if the user could trigger the Refresh by dragging down the screen in the UI (as it does in many other applications).