Does anyone know how to "undo" luup.set_failure?

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 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).

You have to restart LuaUPnP

Thanks for the quick reply!

It sounds like set_failure is a bit of overkill for what I am trying to achieve here.

Any suggested patterns for indicating that a device has gone offline?

In Vera Most things that go offline … need to have Vera Restart.

You can use a TASK … It will print a message in the scrolling window at the top. I believe it can also put colored icons on the window … and it can be later removed.
I have used a TASK for messages to the user … I have not tried to use, or understand, the other features.