The current iteration of my LED light plugin currently makes child devices that are no longer responding invisible (by setting the invisible attribute to true). However, I’m not thrilled with this behavior, especially in the case of a device that is permanently gone, since the user has no means of getting rid of the now useless child device.
I’ve been partly successful implementing an alternative behavior using luup.set_failure (true, device_number) when a device goes AWOL. This puts a nice red ball in the banner of the device UI, along with red “Lua Failure” footer.
My problem is that is the device comes back online, using luup.set_failure (false, device_number) doesn’t set the device UI back to a normal state.
Does anyone know how to “undo” the set_failure? I’ve search the forums and the wiki, but to no avail. The wiki documentation at [url=http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_set_failure]http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_set_failure[/url] actually seems to be wrong - it states that the first parameter of set_failure in an int, when it’s a boolean (and Lua doesn’t have an integer type).