Wait for confirmation from device
Last updated
Last updated
For some critical actions it is very important to know that hardware actually received the command and applied the received value from the user input.
For such use cases Datastream has confirmation property. It allows you to setup the interval during which user can wait for the response from the device, while the widget used to send the value will be disabled.
For example, let's assume you have a garage door and which you can open by sending the 1
value via the button that is assigned to the Virtual Datastream on V1
and you have set the Wait for confirmation
period for 5 seconds.
When you click on the button - it sends 1
value to the hardware. In case hardware is online and accepts the value - it can send back the applied value (telling us that door was successfully opened). If hardware wasn't online or haven't send any confirmation sue to error or non acceptable value - Datastream value will be reverted to the previous value.
Here is a simplest code example that shows how you can make it work: