Changes_to trigger not working


#1

1) Give a description of the problem
I have a very simple piston that is supposed to turn on lights when motion is detected (or a door opens). However, approximately 1/8 times it just doesn’t work. This has happened both with motion and with the door openning.

2) What is the expected behaviour?
Motion is detected >> lights turn on

3) What is happening/not happening?
Occasionally the lights do not turn on, however most the time they do.

**4) Post a Green Snapshot of the piston!

5) Attach logs after turning logging level to Full
11/15/2020, 6:27:52 AM +594ms
+1ms ╔Received event [Plus Room Motion Sensor].motion = active with a delay of 86ms
+79ms ║RunTime Analysis CS > 20ms > PS > 6ms > PE > 53ms > CE
+82ms ║Runtime (38781 bytes) successfully initialized in 6ms (v0.3.110.20191009) (79ms)
+82ms ║╔Execution stage started
+124ms ║║Comparison (time) 23272680 is_between (time) 1605487440000 … (time) 1605453060000 = true (9ms)
+125ms ║║Time restriction check passed
+127ms ║║Condition #1 evaluated true (40ms)
+128ms ║║Condition group #null evaluated true (state did not change) (42ms)
+138ms ║║Comparison (enum) off is (string) off = true (2ms)
+139ms ║║Cancelling condition #13’s schedules…
+140ms ║║Condition #13 evaluated true (10ms)
+150ms ║║Condition #11 evaluated false (7ms)
+154ms ║║Comparison (enum) active changes_to (string) active = false (0ms)
+155ms ║║Cancelling condition #3’s schedules…
+156ms ║║Condition #3 evaluated false (6ms)
+157ms ║║Cancelling condition #14’s schedules…
+158ms ║║Condition group #14 evaluated false (state changed) (17ms)
+159ms ║║Condition group #2 evaluated false (state did not change) (30ms)
+161ms ║╚Execution stage complete. (79ms)
+163ms ╚Event processed successfully (162ms)


#2

I would place your triggers (lightning bolts) top level… with the Switch 2 condition indented beneath.

We want it to check motion & Contact sensor as soon as the piston runs…
(notice how Condition #11 & 3 evaluated false?)


Pro Tip:

Personally, I would drop Switch 2 condition entirely.
WebCoRE is smart enough to not turn on a device that is already on.


#3

Thanks for your suggestion, I’ve made the changes to my piston and I’ll watch it over the next few days to see if it’s working as expected.