significance of device attribute "status"

Couple of questions if anybody knows.

I noticed that ALTUI displays a device attribute called status. A quick search on the forum lead me to this thread:
http://forum.micasaverde.com/index.php?topic=78151.0

To this I wanted to ask:

  1. It seems like UI7 sometimes displays this attribute on the UI and sometimes not depending on the device. How does it determine whether or not to display it? Luckily ALTUI always shows it.
  2. It seems like the default value for this attribute should be -1. I noticed that when the device is in error state (example, if the node failed to execute a command because it was busy) then the value becomes 2. This is one of the absurdities of the vera since it should be queuing that command and do a retry and wipeout that error instead of setting the device in error state. This error state apparently can’t be changed even if the device later on is actuated and responded correctly. It requires a dreadful luup reload to be removed. Anyone knows what significance other values have for this attribute? Now for ALTUI, whenever I tried to change the value of this attribute, I get a luup reload as well. I don’t believe it is a behavior built into ALTUI but I want to ask anyway if one could change it without causing a luup reload?

Edit: Related question/suggestion to amg0, could we get a list of devices in ALTUI for which this attribute is not -1 shown in a shortcut with a red color if it is not -1? The idea would be to mimick the vera UI failed device list.

AFAIK, status is best controlled by the [tt]luup.set_failure()[/tt] function.

http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_set_failure

Luup maintains a 'failure' flag for every device to indicate if it is not functioning. You can set the flag to 1 if the device is failing, 0 if it's working, and 2 if the device is reachable but there's an authentication error. If device is a string it is interpreted as a udn, if it's a number, as a device id. The lu_status URL will show for the device: and Lua Failure is shown in red in UI5 for the device.

In the openLuup implementation, the flag values 0,1,2 are mapped to status values -1,2,2.

See also this discussion on other variables modified by [tt]set_failure()[/tt]

openLuup : set_failure

Thanks AK. Unfortunately I have tried this function for this error without success. When the device has responded that it is busy, the luup.set_failure(false,devid) doesn’t remove the error. I have had it work on other errors before.