Error with piston


#1


This was working but now I get an error. I don’t know what the error means
10/2/2020, 8:05:28 AM +226ms
+1ms ╔Received event [Motion Computer Monitor].motion = inactive with a delay of 97ms
+77ms ║Runtime (40400 bytes) successfully initialized in 26ms (v0.3.110.20191009) (75ms)
+78ms ║╔Execution stage started
+103ms ║║Error executing virtual command [].setVariable: (1ms) groovy.lang.MissingPropertyException: No such property: result for class: script_app_6c4a97a42cd9c01ed79ae72c875a75bf6c50e82c665272109ecaf6627b713546
+108ms ║╚Execution stage complete. (30ms)
+110ms ║Setting up scheduled job for Fri, Oct 2 2020 @ 9:40:00 PM EDT (in 48871.665s)
+119ms ╚Event processed successfully (119ms)

10/2/2020, 8:04:45 AM +313ms
+1ms ╔Received event [Motion Computer Monitor].motion = active with a delay of 113ms
+90ms ║Runtime (40406 bytes) successfully initialized in 36ms (v0.3.110.20191009) (88ms)
+91ms ║╔Execution stage started
+134ms ║╚Execution stage complete. (43ms)
+136ms ║Setting up scheduled job for Fri, Oct 2 2020 @ 9:40:00 PM EDT (in 48914.552s)
+146ms ╚Event processed successfully (145ms)


#2

Typically this error occurs when you are attempting to set a variable that does not exist. Make sure the variable names used in the piston matches those defined exactly. We can’t see your global variable list so there’s no way for us to compare.

I am a bit confused as to your variable usage in this piston. First, under the every day block, your IF is trying to compare Motion_Active (a local variable) that doesn’t exist.

I would actually suggest creating one local variable, Motion_Active, set it to true on line 24 and false on line 35. If you still want the global variable for use in other pistons, set it to equal the local at the end.


#3

I’ve changed the piston to use a local variable. Still having a problem with it. Logs say setting up a schedule for the correct time but the switch does not turn on


#4

I suspect that your variable is never getting set to true. On line 28, you have an extra IF/THEN that contains the task to set variable. The IF is blank so it will never be true. Move the set variable task outside of that IF/THEN in to the THEN of the first IF.

I suspect you will also have issues with the turn off. The Every Day at 945 timer will execute at 945 and evaluate conditions underneath. One of the being if time is after 1130. Time will never be after 1130 if the timer is executing at 945. That IF block will need to be a sperate trigger. Either another timer, everyday at 1130 or If time happens daily at 1130.


#5

I’m not sure what you’ve done with the condition on line 34. If you are testing if a variable is true it should end up looking like:

If {Motion_Active} is true

You see to be comparing two strings. Did you perhaps select Value instead of Variable?


#6

Something like this


#7

Try this:


#9

Thank you that piston is working great.


#10

Its not very offten that no one is home so I have not being able to verify that It will not come on in the evening. I have noticed in the logs before the 1 pm

10/8/2020, 10:10:32 AM +303ms
+1ms ╔Received event [Motion Computer Monitor].motion = active with a delay of 103ms
+144ms ║Setting up scheduled job for Thu, Oct 8 2020 @ 10:15:00 PM EDT (in 43467.554s), with 1 more job pending
+153ms ╚Event processed successfully (153ms)

Does this not mean that it will turn on even though there will be no motion detected between 1 and 7:30 pm


#11

WebCore subscribes to your motion devices, anytime it detects activity you will get a log event but the time condition should prevent the piston from setting your motion_active variable to true. So at 1015, since motion_active was not set to true, it will not turn on (unless you get another event between 1 and 730)


#12

Thanks