I have a situation that when a user swipe a switch button on openhab, the command is propagated to the end device via wifi. Unfortunately, the wireless network can be unreliable sometime and the command does not reach the end device to do the job. I have tried the following approaches in my custom binding but without satisfactory user experience
- On Openhab, wait for the response (let’s say 2sec) from the end device. If no response, rollback the switch state to previous state. Verdict: every swipe on openhab, user needs to stare on the screen in a hope that it does not rollback to previous state
- After user swipe on a switch on openhab, leave the state as it is. Then poll on the background to get the latest state from end device. Verdict: resourceful and on/off on openhab does not guarantee tht the command has reached the end device.
Apart from the above options, what other built in features that I can use on openhab to reliably ensure tht swiping on/off on a light switch is actually on/off on end device? The idea is really to rely on openhab/smarthome framework to check and resend command automatically until both the openhab and end device states matched. Otherwise , what other approaches would you suggest to get around this and yet provide a good user experience?