Thank you guys for the reply.
futzle could you please advice what should I use for the debugging? and I do not understand why the test said error code even from local x = 1. there should be no issue.
garrettwp thank you very much also for the info. I was not aware that I’m running the old firmware as according to the firmware tab in my vera lite I was running the latest one. I just upgraded to 1.5.622 as you recommended.
Unfortunately the behavior of the test luup code is the same. It looks to me like after putting one wrong there it’s “frozen” and ever the right code then is ending with code failed. Which is really not good. Could this be a bug?
This is just a guess: A statement like “local x” or an if-statement is neither true nor false. Try an indisputably true statement like “return true” and see what it does.
I normally advise that you just bang the Luup code straight into the scene you want it to live in. You’ll need to watch the Luup log to see what’s going on, but learning to read the Luup log is IMO unavoidable so you may as well get used to it.
If you want to keep using the Test Luup Code box, be aware of its limitations. Stick a “return true” at the end and don’t return anywhere else. Use luup.log() if you want to see the value of a variable, and inspect the Luup log to see what it prints.
thank you very much
you were right.
the return false caused it. I most probably did not know correctly how it works. I though it’s for checking the code → if the syntax is ok.
So I was waiting for some code ok, result is false (of the code run). Thank you again for your help it’s working ok now.
Is there some other tools for luup development? for example for vim or something else or what are you using please?