sorry if I ask a rather stupid question, but my logs are full of lines like this
[ERROR] [.script.engine.ScriptExecutionThread] - Rule 'Light on PIR': null
and I have no idea, where in the script the null occurs, neither what the reason is for it. Is it possible to somehow find out where exactly in the script the “null” has been, similar to the NullPointerException in Java, where it’s pretty easy to figure out the reason?
thanks for your reply. Oh - okay, so I really have to do logging before each statement, which is, however when using multiple statements in a line not possible, so I have to split up a line like
val pir = gPIRLight.allMembers.filter[s|s!=null].sortBy[lastUpdate].last
to see what’s happening (I currently suspect this line to produce a null as the next line is just a log output and sending a email with pir.label).