luup.task() persisting a message after initialization

I want to display a message to the user during luup plugin initialization, and have it remain for an indefinite amount of time, until a later serial event comes in. luup.task looks perfect for this.

But it looks like at the end of the initialization function, the luup engine clears any message that happens to be showing. In the attached example, the message “end of initialize” is never seen.

The documentation for luup.task() doesn’t mention this behaviour, so I’m reporting it here as a bug.

Changing the status (6 in the example code) makes no difference.

(The example uses timers but that is only to simplify the demonstration; the real code has no timers and uses only incoming serial.)

IIRC, returning [tt]false[/tt] will make the message persist. [tt]luup.set_failure[/tt] might be worth a try.

The trouble with both of those ls that they are too extreme, and emblazon a huge red banner across the device in the dashboard.

The one you get with returning false (“Lua startup failed”) never goes away. You also can’t control this text.

luup.set_failure() also puts a red banner on the device (“Lua failed”). Passing true doesn’t make this go away immediately either.

Considering that the message I want to display to the user is a reassuring “Please wait, I’m working”, I think these options will do more harm than good. :slight_smile: