Status of Device after Command Sent

I just read (and contributed) to a post where a user was having difficulty with confirming that certain lights were turned on, some of the suggestions for a fix made my realize I don't completely understand how HE works. As an example lets take a zwave switch that is sent a command to turn on. This particular zwave switch does not always follow through on the command (hub issues, device issues, mesh issues, etc...). Let's also say the command to turn on is sent from a line in RM.

As I see it, there are two possibilities for what happens when RM sends a command to turn on.
Possibility 1: The command is sent and the device status is updated to show "on". In this possibility the device has not communicated back to hubitat that it has in fact received the command and turned itself on. It may be on it may be off.
Possibility 2: The command is sent to the device, the hub waits for communication back from the device that it has in fact received the command and turned on, at this point the status of the device is updated to show "on".

If in fact the correct answer to this question is "Possibility 2", then does RM wait for this confirmation before executing its next line of instructions?

It is "fire and forget". RM does not wait for a status report back.

And in terms of what a device shows for its status, that depends on how the driver was written. I've seen some that report immediately when a hub initiated command is sent (to provide faster feedback / dashboard updates), and I've seen some drivers not update the current value until the report comes back from the device (thus providing slower, but more accurate status).

So the end user can't ASSUME which way it works globally, as it is driver dependent.

2 Likes