LM5 Resident scripts can rarely freeze - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: LM5 Resident scripts can rarely freeze (/showthread.php?tid=2107) |
LM5 Resident scripts can rarely freeze - buuuudzik - 05.06.2019 Yesterday, my client give me the feedback that function OFF isn't now working. This function works in Resident 0s and its switch off near all lights in home and delays switch off of the lights on stairs. And script was halted, its status was "green" but this was a day so if it will be switched on at day it starts, do simple job and immediately disable itself so it was not working. I've found similar issue on other LM a few times but it was connected with HTTP or calculating statuses and small CPU power of devices. At this time this occured on LM5 with 20180523 firmware. I think it should be for sure solved, at least distinguish if some script is halted. This is a script (if during day it immediatelly should switch of): Code: -- Gdy noc, wtedy wyłącz całe oświetlenie wewn. oprócz korytarza i schodów, które wyłącz z opóźnieniem (od wywołania lub ostatniego ruchu w strefie dziennej). RE: LM5 Resident scripts can rarely freeze - admin - 05.06.2019 Try adding log calls before sleep (with sleep time to make sure that script is not just sleeping for too long) and disableScript. At least you will know where exactly your script stops working. RE: LM5 Resident scripts can rarely freeze - buuuudzik - 05.06.2019 Thanks for response? I can check this from OFF_signalling variable. But this I can check only in the future because now was updated. How os.sleep() works? Maybe there is some edge case and some mechanism cannot go back to script after os.sleep exceeded? Offset is 45s now and it is a number from 0-255. RE: LM5 Resident scripts can rarely freeze - admin - 05.06.2019 os.sleep calls C nanosleep internally. It has a built-in check that sleep time must be positive, so the issue is not there. |