I'm having a weird problem with a motion based piston. If all lights in the room are off (e.g. left the room for a while), when I walk in the piston fires and all the lights come one like they should. Yeah!
However, if I'm sitting still in room with the lights already on and the lights time out and turn off, and I then immediately waive my arms to activate the motion sensor the "Light - Office Recessed" do NOT turn on but the other two do. This has happened multiple times, not just a one off fluke.
What am I missing?
I think your showing some traces (webcore IDE) may help, with logging on Medium.
In general you are nesting triggers with changes which is not good
You might reorder to have the triggers/changes always get executed (and monitored)
at the very top (in define section)
create a variable hasmotion = false
then at start of execute:
if motion-office motion changes
then hasmotion=true
if fan-office presence changes
(then do nothing)
If Derek combine presence is present
and
(
motion-office motion IS active
or
fan-office present IS present
)
then (all the rest of your stuff)
later change the else if. (make it its own if)
if hasmotion is true and motion-office motion IS inactive
then....
REALLY appreciate the help! Almost there...the lights are turning on with motion, but they aren't turning off correctly (after a test period of 10 seconds). They stay on for a period of time (couple of minutes?), then turn off. Then when motion is re-triggered, the lights do NOT come back on for another couple of minutes..then bam...they are on again.
Ideas?
1/3/2022, 1:37:18 PM +799ms
+2ms ╔Received event [Motion - Office].motion = inactive with a delay of 47ms, canQueue: true, calledMyself: false
+32ms ║Runtime (9152 bytes) successfully initialized in 2ms (v0.3.113.20211120_HE)
+33ms ║╔Execution stage started
+160ms ║║Executed [Light - Office Recessed].on (16ms)
+176ms ║║Executed [Light - Office Recessed].setLevel (11ms)
+182ms ║║Executed [Light - BenQ Desk Light].on (2ms)
+208ms ║║Executed [Light - Office Floor Lamp].setLevel (19ms)
+231ms ║║Executed [Light - Office Floor Lamp].setColorTemperature (17ms)
+244ms ║╚Execution stage complete. (211ms)
+246ms ╚Event processed successfully (245ms)
1/3/2022, 1:36:16 PM +435ms
+1ms ╔Received event [Motion - Office].motion = active with a delay of 63ms, canQueue: true, calledMyself: false
+30ms ║Runtime (9157 bytes) successfully initialized in 1ms (v0.3.113.20211120_HE)
+31ms ║╔Execution stage started
+107ms ║║Executed virtual command setVariable (0ms)
+137ms ║║Executed [Light - Office Recessed].on (1ms)
+143ms ║║Executed [Light - Office Recessed].setLevel (1ms)
+148ms ║║Executed [Light - BenQ Desk Light].on (1ms)
+175ms ║║Executed [Light - Office Floor Lamp].setLevel (20ms)
+197ms ║║Executed [Light - Office Floor Lamp].setColorTemperature (17ms)
+212ms ║╚Execution stage complete. (182ms)
+215ms ╚Event processed successfully (214ms)
1/3/2022, 1:34:16 PM +988ms
+1ms ╔Received event [Motion - Office].motion = inactive with a delay of 32ms, canQueue: true, calledMyself: false
+30ms ║Runtime (9152 bytes) successfully initialized in 2ms (v0.3.113.20211120_HE)
+31ms ║╔Execution stage started
+141ms ║║Executed [Light - Office Recessed].on (1ms)
+146ms ║║Executed [Light - Office Recessed].setLevel (2ms)
+152ms ║║Executed [Light - BenQ Desk Light].on (1ms)
+159ms ║║Executed [Light - Office Floor Lamp].setLevel (2ms)
+183ms ║║Executed [Light - Office Floor Lamp].setColorTemperature (18ms)
+196ms ║╚Execution stage complete. (166ms)
+198ms ╚Event processed successfully (198ms)
1/3/2022, 1:33:46 PM +293ms
+6ms ╔Received event [Motion - Office].motion = active with a delay of 46ms, canQueue: true, calledMyself: false
+35ms ║Runtime (9156 bytes) successfully initialized in 1ms (v0.3.113.20211120_HE)
+36ms ║╔Execution stage started
+111ms ║║Executed virtual command setVariable (0ms)
+139ms ║║Executed [Light - Office Recessed].on (2ms)
+145ms ║║Executed [Light - Office Recessed].setLevel (1ms)
+150ms ║║Executed [Light - BenQ Desk Light].on (2ms)
+158ms ║║Executed [Light - Office Floor Lamp].setLevel (1ms)
+181ms ║║Executed [Light - Office Floor Lamp].setColorTemperature (18ms)
+196ms ║╚Execution stage complete. (160ms)
+199ms ╚Event processed successfully (197ms)
1/3/2022, 1:33:04 PM +429ms
+2ms ╔Received event [Motion - Office].motion = inactive with a delay of 25ms, canQueue: true, calledMyself: false
+26ms ║Runtime (9151 bytes) successfully initialized in 1ms (v0.3.113.20211120_HE)
+27ms ║╔Execution stage started
+141ms ║║Executed [Light - Office Recessed].on (1ms)
+146ms ║║Executed [Light - Office Recessed].setLevel (1ms)
+151ms ║║Executed [Light - BenQ Desk Light].on (2ms)
+159ms ║║Executed [Light - Office Floor Lamp].setLevel (1ms)
+182ms ║║Executed [Light - Office Floor Lamp].setColorTemperature (18ms)
+194ms ║╚Execution stage complete. (167ms)
+197ms ╚Event processed successfully (195ms)
1/3/2022, 1:32:34 PM +48ms
+2ms ╔Received event [Motion - Office].motion = active with a delay of 41ms, canQueue: true, calledMyself: false
+34ms ║Runtime (9156 bytes) successfully initialized in 2ms (v0.3.113.20211120_HE)
+35ms ║╔Execution stage started
+116ms ║║Executed virtual command setVariable (1ms)
+145ms ║║Executed [Light - Office Recessed].on (2ms)
+150ms ║║Executed [Light - Office Recessed].setLevel (2ms)
+156ms ║║Executed [Light - BenQ Desk Light].on (1ms)
+163ms ║║Executed [Light - Office Floor Lamp].setLevel (1ms)
+186ms ║║Executed [Light - Office Floor Lamp].setColorTemperature (18ms)
+201ms ║╚Execution stage complete. (167ms)
+204ms ╚Event processed successfully (202ms)
1/3/2022, 1:31:47 PM +924ms
+1ms ╔Received event [Motion - Office].motion = inactive with a delay of 26ms, canQueue: true, calledMyself: false
+23ms ║Runtime (9151 bytes) successfully initialized in 1ms (v0.3.113.20211120_HE)
+24ms ║╔Execution stage started
+135ms ║║Executed [Light - Office Recessed].on (1ms)
+142ms ║║Executed [Light - Office Recessed].setLevel (1ms)
+152ms ║║Executed [Light - BenQ Desk Light].on (5ms)
+161ms ║║Executed [Light - Office Floor Lamp].setLevel (1ms)
+186ms ║║Executed [Light - Office Floor Lamp].setColorTemperature (19ms)
+198ms ║╚Execution stage complete. (175ms)
+201ms ╚Event processed successfully (200ms)
1/3/2022, 1:31:17 PM +321ms
+2ms ╔Received event [Motion - Office].motion = active with a delay of 41ms, canQueue: true, calledMyself: false
+129ms ║Runtime (12797 bytes) successfully initialized in 109ms (v0.3.113.20211120_HE)
+130ms ║╔Execution stage started
+143ms ║║Executed virtual command setVariable (1ms)
+180ms ║║Executed [Light - Office Recessed].on (13ms)
+195ms ║║Executed [Light - Office Recessed].setLevel (10ms)
+212ms ║║Executed [Light - BenQ Desk Light].on (13ms)
+238ms ║║Executed [Light - Office Floor Lamp].setLevel (20ms)
+265ms ║║Executed [Light - Office Floor Lamp].setColorTemperature (21ms)
+283ms ║╚Execution stage complete. (153ms)
+287ms ╚Event processed successfully (286ms)
You don't want to nest the triggers the way you are currently doing.
My suggestion was to get you to un-nest the triggers.
I think you may want to bring this to the webcore forum as there are a lot of folks there that can offer options or pistons for this.
I got some help on the Webcore forums and this is working perfectly:
system
Closed
January 4, 2023, 2:42am
6
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.