I have a highly customized version of the Smart Lights app that I’ve bee using for a few years. I’m currently running on 525 for my deployed HA but will be moving to 1.1.15 or later after I’m comfortable enough that it’s stable.
I noticed an issue yesterday on 525 where my app was running but not in the correct mode resulting in things not working. When running correctly the icon is green. In this case the ocon was yellow. Some apps have a blue icon, but all 3 are valid program tun states.
My question is, will the auto-restart code that’s been added to 1.1.15 be able to detect the wrong run state and restart the app?
The smart lights code watches for module activity so it must run in the foreground or background. Yellow would mean the user has to select “run” for it to work which would make it useless (also a good reason it wasn’t functioning).
No, if the program is yellow - that means that it’s not running and it don’t have to.
To prevent this add Program.GoBackground(); at the very end of your program.
If we talk about Smart Lights program, in stock variant it has
var timeout = mod.Parameter(TURNOFF_TIMEOUT).DecimalValue;
block, that evaluates module’s parameters every 5 seconds. And this means that program is running in the foreground and should be green. If an error occurs - it should become red. And because of .Run() command in the program’s startup code it runs immediately after enabling.
So I think you did something special with your customized version of Smart Lights. You can post it’s code (both program code and startup code here) and we’ll able to discuss what may be wrong with it and why the program falls to the “yellow” state.