What does “Refresh” Do on Automation?

When creating an Automation or a Scene some devices include a Refresh option - what the heck is it’s purpose? Pic below for reference.

It calls the refresh command, part of the Refresh capability. What this does is up to the author(s) of the device integration but it might typically poll the device for its latest information.

It also gets called when you pull down the page in the device detail view in the app, just like refreshing a web page. It has been suggested it is also called when the page is opened but I see no evidence that is true.

Interesting, why would one NOT want the device to refresh when being actioned in an automation? Why is it only available on some devices.

Either way, thanks - I will enable it when I see it

The option is going to be removed given the lack of value it offers. It was only surfaced due to a backend change.

The refresh command polls the device itself for device status. Devices should be proactively reporting their state and would only be useful if SmartThings had an incorrect state for a device which would indicate a device or platform error. As this is rare, rarer than people might think, there isn’t much value to the capability in an automation.

@Brad_ST ,
Now that the refresh issue comes up in the new app I’m going to abuse your kindness!
Smartthings removed the “refresh” and “configure” tiles in the new app. Now if you want to make a new configuration of the zigbee device, for example changes in the intervals and thresholds of the temperature or humidity report cannot be done including calling the configure () method in the dth code itself.
With the classic app, clicking on the confugure tile and it would run.
Many of us want to be able to change the frequency of the temperature or humidity reports and we have to be changing the dth version in IDE to “Draft” and back to “published” so that the configuration of these custom reports is executed and not having to change the sensor batteries every 3 months or throw them away.
I put a link to one of the posts on this topic, which was tagged by smartthings in November and I don’t know anything else and you will see in the post, which I asked again.
Thanks again @Brad_ST .

2 Likes

Why can’t you call the configure() method from the DTH? It should work fine as long as you remember that if it returns hub commands it is down to you to send them.

That said, there really ought to be a way of running it manually as there is for refresh(). Not necessarily a tile, but something, somewhere. Perhaps there is and I haven’t noticed. Otherwise why even make it a capability?

Possibly not, but we have device configs just so we can make that call where it needs to be made.

It does not work, I have already tried it and other users too. For example @mvevitsis
Way it does not work? I do not know.
The device does not answer when a call to configure () is made from update () after changing preferences in the app.
But if you install the dth in the IDE simulator, which works like the classic app, on a real device and click on the “configure” tile of the simulator device, the configuration is always executed perfectly and the refresh also.
I gave up …
IDE simulator with dth installled in real device:


Device response to configure command by simlator device tile or DTH version change:

Device does not respond to configure command from dth call to configure():

The DTHs linked, have created “configure” and refresh" tiles if you want try.
The dth SmartSense Temp / Humidity Sensor does not have them created

Wouldn’t totally surprise me. I found that deleting child devices from configure() broke things in weird ways and setting the DNI from update() had to be done by scheduling a separate method to run a second later.

As @Mariano_Colmenarejo said, calling configure() from updated() by changing preferences does not work as expected when it involves zigbee commands. I didn’t believe it myself at first, but essentially any variable zigbee preferences will not work due to this. I’ve resorted to hard coding everything e.g. reporting intervals, etc.

@Brad_ST

1 Like

I tried a scheduling for call configure() some seconds after call refresh() or ping() and device does not answer anything to none, refresh(), ping() and configure().
As the dth run locally, need set the dth versión to “Draft” in order to can see the liveligging in ide

see you tomorrow I’m going to sleep

Well reading the post of the beta version of firmware 0.36.X, we can intuit that just as for z-wave the hub will control and generate certain commands to the devices, the most logical thing that is happening with zigbee is that the hub is who controls when configure, refresh and ping commands can be sent to devices instead of dth