v0.0.028.20170308 - ALPHA - Scheduler fixes
That is exactly what I was looking for, now I have an understanding of how this is going to work, thank you I really appreciate.
Ok @ady624, updated to the latest and with chrome did a clear cache and hard reload several times. I set up a test piston with some basic things. Couple of waits, refreshes, turn on, set level, turn off all mixed in. Do not see anything crazy popping up error wise. I really enjoy being able to whip up a ‘complex’ piston in a matter of moments just being able to click around.
Here is what I came up with so far.
nothing over the top. None of the waits exceed 5 seconds.
When I am selecting a wait time frame the list never drops down to display anything. I must use the arrow keys up and down to make a selection. It almost looks like the height of each one is only a couple pixels.
I was able to watch the trace a couple times but it seems incredibly finicky about when it likes to show up. I do not know if I am doing something wrong or what?
Lastly one thing I noticed is the graph is scalable… I am sure this is intentional but caught me off guard while trying to scroll down the page and my graph was getting tiny.
Yeah, the params are not initialized woth existing values (editing an old task does not reveal current values). The select shows those thin lines if a default value does not exist (will get that fixed) and the tasks only show their “name”, they need to start showing real text with parameters. Maybe I’ll get those done tomorrow night for now I am trying to get the execution to work.
Thank you
Just trying to point out everything I see.
Good job on the execution! Like I said I didn’t see any errors. Will continue to test when you need it
That’s good, write them down please and make sure I fix them
thank you
Reality check: Sync vs Async.
Using this piston in full sync mode:
What it does is, when the light turns on, it waits 10 seconds and then turns off the light and refreshes it. When the light turns off, it waits 10 seconds, runs a poll and then refreshes it.
Here are the traces:
3/8/2017, 11:19:04 PM +824ms
+004ms ╔Received event [Utility Door Light].switch = on with a delay of 155ms
+080ms ║Runtime successfully initialized (done in 80ms)
+081ms ║╔Execution stage started
+098ms ║║Executed virtual command [Utility Door Light].wait (done in 1ms)
+100ms ║║Requesting a wake up in 10000ms
+174ms ║╚Execution stage complete. (done in 93ms)
+211ms ║Setting up scheduled job in 9.009s
+228ms ╚Event processed successfully (done in 234ms)
3/8/2017, 11:19:14 PM +811ms
+012ms ╔Received event [time].time = 1489076354043 with a delay of 749ms
+070ms ║Runtime successfully initialized (done in 73ms)
+072ms ║╔Execution stage started
+484ms ║║Executed [Utility Door Light].off (done in 18ms)
+507ms ║║Executed [Utility Door Light].refresh (done in 19ms)
+591ms ║╚Execution stage complete. (done in 519ms)
+643ms ╚Event processed successfully (done in 655ms)
3/8/2017, 11:19:17 PM +496ms
+013ms ╔Received event [Utility Door Light].switch = off with a delay of 781ms
+067ms ║Runtime successfully initialized (done in 69ms)
+069ms ║╔Execution stage started
+159ms ║║Executed virtual command [Utility Door Light].wait (done in 5ms)
+164ms ║║Requesting a wake up in 10000ms
+200ms ║╚Execution stage complete. (done in 131ms)
+268ms ║Setting up scheduled job in 9.902s
+281ms ╚Event processed successfully (done in 293ms)
3/8/2017, 11:19:27 PM +22ms
+0011ms ╔Received event [time].time = 1489076367665 with a delay of -661ms
+0106ms ║Runtime successfully initialized (done in 107ms)
+0108ms ║╔Execution stage started
+0182ms ║║Time event fired early, waiting for 466ms...
+0741ms ║║Executed [Utility Door Light].poll (done in 45ms)
+0764ms ║║Executed [Utility Door Light].refresh (done in 19ms)
+1019ms ║╚Execution stage complete. (done in 912ms)
+1077ms ╚Event processed successfully (done in 1089ms)
You can see that the .refresh command happens 10s after the light turned on and 10s after the light turned off. All good 
Now consider making the IF statement asynchronous, this means that it won’t interrupt the regular flow of the piston. So, click on the IF, click on advanced options, choose Asynchronous, save:
Note the little blue icon next to the if.
Here are the logs:
3/8/2017, 11:30:12 PM +763ms
+0013ms ╔Received event [Utility Door Light].switch = on with a delay of 729ms
+0105ms ║Runtime successfully initialized (done in 106ms)
+0107ms ║╔Execution stage started
+0194ms ║║Executed virtual command [Utility Door Light].wait (done in 4ms)
+0200ms ║║Requesting a wake up in 10000ms
+1173ms ║║Executed [Utility Door Light].refresh (done in 964ms)
+1207ms ║╚Execution stage complete. (done in 1100ms)
+1266ms ║Setting up scheduled job in 8.94s
+1281ms ╚Event processed successfully (done in 1294ms)
3/8/2017, 11:30:22 PM +902ms
+0011ms ╔Received event [time].time = 1489077022968 with a delay of -84ms
+0888ms ║Runtime successfully initialized (done in 891ms)
+0890ms ║╔Execution stage started
+1166ms ║║Executed [Utility Door Light].off (done in 174ms)
+1258ms ║╚Execution stage complete. (done in 368ms)
+1313ms ╚Event processed successfully (done in 1325ms)
3/8/2017, 11:30:25 PM +245ms
+0013ms ╔Received event [Utility Door Light].switch = off with a delay of 920ms
+0097ms ║Runtime successfully initialized (done in 100ms)
+0099ms ║╔Execution stage started
+0178ms ║║Executed virtual command [Utility Door Light].wait (done in 4ms)
+0183ms ║║Requesting a wake up in 10000ms
+1073ms ║║Executed [Utility Door Light].refresh (done in 882ms)
+1106ms ║╚Execution stage complete. (done in 1008ms)
+1162ms ║Setting up scheduled job in 9.026s
+1174ms ╚Event processed successfully (done in 1187ms)
3/8/2017, 11:30:35 PM +355ms
+001ms ╔Received event [time].time = 1489077035432 with a delay of -81ms
+093ms ║Runtime successfully initialized (done in 93ms)
+095ms ║╔Execution stage started
+400ms ║║Executed [Utility Door Light].poll (done in 255ms)
+669ms ║╚Execution stage complete. (done in 575ms)
+712ms ╚Event processed successfully (done in 715ms)
Notice how the refresh happened when the light turned on and off, without waiting the 10 seconds like it did the first time?
Is this making sense to anyone else?
Thank you
v0.0.029.20170309 - ALPHA - More execution flow fixes, sticky trace lines fixed
I was able to build with no problem, starting to understand the flow. Curious, is is possible for the wait to show the time instead of clicking into it? So have it show wait 2 min on the actual piston instead of wait?
Happy? lol
And it appears that 1 + 2 makes 3…
Update to latest, you need to edit all parameters please, they need to be reset, all of them.
I was surprised the graph was zooming in/out 
And using the celsius() function, it appears I need to set some default formatting for floats?
And the result:
And formatting it properly:
And the result:
Good job,how is it? Is it easier than CoRE? I am sure the esiting part is…
It is faster, lights come on much faster than core. I think it is easier because I can see it all on one screen while building.
Good, that’s the plan
learnt a few tricks in the meantime
I joined The ST bandwagon in March 2016 and by end of May or beginning of June CoRE was in beta, so my experience with Groovy was 0. And now the trick I am trying is to have javascript parse the expressions and have Groovy simply walk through them, less CPU stress on ST…
Can’t seem to get the switch attribute of a virtual switch, not working yet?
What do you mean? Make sure to refresh the page after adding devices. Also, there is a known bug when using multiple devices/browsers to access the dashboard. After selecting new devices, only the first browser to refresh will get the updated list, will fix that, eventually…
This is a virtual switch using the simulated switch dth. I have another virtual switch using a uri switch dth and ‘switch’ attribute comes up.





