Trying to create a former Stringify Route in WebCore


#1

1) Give a description of the problem
I want the ability to perform multiple tasks based on two or more triggers. For example, if it is between 11:00 pm and dawn and we are home and motion occurs on my front porch then I would like my dome alarm to ring a bell (simulated door bell), flash my family room desk lamp on an off several times and have the the front porch lights go to 100% for five minutes and then assuming the motion on the porch has stopped, have my front porch lights dim to 30% for two minutes, then turn the lights off. ( I have a camera on the porch and I want of have good visibility of the recorded motion. This is a routine I had set up in stringify. It is not possible to do this level of complexity with Smartthings alone. I use four smart devices, for this routine. These devices are a GE Smart Dimmer for the porch lights, a motion detector, a Dome bell/siren and a smart receptacle to which i connect my desk lamp.

2) What is the expected behaviour?
See above - Note: I have a video the shows the routine in action and the Stringify routine but I did not provide a link b/c I do not want to accused of spamming.

3) What is happening/not happening?
Light is not dimming and turning off. lamp is not flashing

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full
10/5/2019, 9:43:29 PM +59ms
+0ms ╔Received event [Bud’s Home].time = 1570326210776 with a delay of -1718ms
+105ms ║RunTime Analysis CS > 26ms > PS > 66ms > PE > 14ms > CE
+108ms ║Runtime (37897 bytes) successfully initialized in 66ms (v0.3.10f.20190822) (106ms)
+109ms ║╔Execution stage started
+110ms ║╚Execution stage complete. (1ms)
+111ms ╚Event processed successfully (112ms)
10/5/2019, 9:43:18 PM +649ms
+1ms ╔Received event [Porch Motion Sensor].motion = inactive with a delay of 74ms
+74ms ║RunTime Analysis CS > 16ms > PS > 45ms > PE > 13ms > CE
+76ms ║Runtime (37892 bytes) successfully initialized in 45ms (v0.3.10f.20190822) (74ms)
+77ms ║╔Execution stage started
+85ms ║║Comparison (enum) inactive is (string) active = false (2ms)
+86ms ║║Cancelling condition #2’s schedules…
+87ms ║║Condition #2 evaluated false (6ms)
+88ms ║║Cancelling condition #1’s schedules…
+89ms ║║Condition group #1 evaluated false (state changed) (7ms)
+91ms ║╚Execution stage complete. (14ms)
+92ms ╚Event processed successfully (92ms)


#2

This portion can be solved by changing Task Cancellation Policy to Never on the WITH on line 20
(when it comes back from the WAIT, it picks up where it left off)


This portion is inside an empty IF. Perhaps that is why it won’t execute…

Also, the “Flash” command is usually for lightbulbs, not outlets


#3

Something like this maybe:

If motion sensor CHAHGES to ACTIVE (not IS)
and
If time is between 11:00pm and sunrise
then (Never cancel task)
With light bulbs 
Do this do that
wait 5 minutes
set level to 30 with bulbs
wait 2 minutes
turn the bulb OFF

But here is the slight problem, if motion happened and stopped, 30 seconds later motion happend AGAIN, the whole piston will re-execute.
If you don’t want that you need to use variables.