I want to receive an updated position every 10 minutes, so I created these two rules, but “Rule2” never gets triggered:
rule "Rule1"
when
Time cron "0 */10 * * * ?"
then
zr9.sendCommand(REFRESH)
end
rule "Rule2"
when
Item zr9 received update
then
logInfo("UPDATE ZR9", "Success")
end
Logfile:
2021-02-17 16:06:06.713 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'zr9' received command REFRESH
If instead of REFRESH I use STOP (zr9.sendCommand(STOP)), the “Rule2” is triggered correctly, but of course it’s not what I want.
@chris: Is this a bug of the REFRESH command? What is the REFRESH command supposed to do on the Item?
That’s entirely up to the binding, and technology dependent.
You could not, for example, expect a REFRESH to wake up a sleeping battery zwave device and demand a current status report.
What the zwave binding does about REFRESH to a mains powered device, I do not know.
Your general idea of listening for an Item update is sound, but note that it will also respond to any periodic routine updates that zwave devices give.
Do you ever get any of those? You should. You may need to configure your device.
I don’t really understand what you’re reporting? What does the log show? Is it being updated? I’ve not looked to see exactly what is implemented for this channel, but it would certainly help to understand what is happening.
Hi rossko57.
I chnaged the polling period of the device and now I get the status updated every 10 minutes.
I have been searching for the explanation of the REFRESH command, but I couldn’t find in the documentation. Does someone know where it is explained? At least I know what I should expect from this command.