Error message if a set function fails from the GUI

If a user clicks one of the actuators (lights, switches, thermostat controls) in the web page, that action may fail. Currently (at least in my experience), nothing happens when it fails. The state just stays the same. For example, radio thermostats notoriously time out some times when they’re busy doing something else. The thermostat API in the web page is great, but if I change the temperature and the call times out, there is no notification of that error. Basically I have to change the temperature and wait 10 seconds to see if the value updates. If it doesn’t, I have to try it again. This can also occur if any actuator is off line or non-responsive. I know it writes an error to the log file, but my wife is NOT going to read the log file to see why she can’t raise the thermostat temperature from her phone.

I consider this to be a basic user interface problem. If the user clicks an action “do something” and that something fails, there should be a notification.

I’m not sure what the best way to implement this is since the set functions are scheduled as async callbacks (I think). As a general Python coder, having the the set function throw an error that gets caught and displayed seems simplest. But I could also see requiring components to signal an error via some other means. Or perhaps there should be a custom logger that uses a handler to push errors to the web clients. Components could grab a handle to the “error_gui” logger and send whatever they want to the screen.

Another idea for this: When you click on a button/slider, have the GUI change the icon to spinning wheel (or some kind of waiting cursor). When the actual succeeds, restore the icon. If it fails, change the icon to a red error triangle which shows the message when you click on it.