1) Give a description of the problem
I want to create a piston that turns off devices that have been left on. For example, turn off my PC if consumption is less then 500watts for 1 minute.
The piston i have made just seems to loop itself refreshing the power stats.
**5) Attach any logs
( 11/25/2018, 6:18:55 PM +603ms
+1ms ╔Received event [My Gaming Rig].power = 246.03 with a delay of 43ms
+88ms ║RunTime Analysis CS > 16ms > PS > 51ms > PE > 20ms > CE
+90ms ║Runtime (38548 bytes) successfully initialized in 51ms (v0.3.108.20180906) (88ms)
+91ms ║╔Execution stage started
+102ms ║║Comparison (enum) on is (string) on = true (2ms)
+103ms ║║Condition #2 evaluated true (7ms)
+105ms ║║Condition group #1 evaluated true (state did not change) (9ms)
+111ms ║║Comparison (decimal) 246.03 is_less_than (integer) 500 = true (2ms)
+113ms ║║Condition #4 evaluated true (5ms)
+114ms ║║Condition group #3 evaluated true (state did not change) (8ms)
+116ms ║║Cancelling statement #5’s schedules…
+738ms ║║Executed physical command [My Gaming Rig].getEnergyStats() (618ms)
+739ms ║║Executed [My Gaming Rig].getEnergyStats (621ms)
+1312ms ║║Executed physical command [My Gaming Rig].refresh() (571ms)
+1313ms ║║Executed [My Gaming Rig].refresh (573ms)
+1317ms ║║Executed virtual command [My Gaming Rig].wait (0ms)
+1318ms ║║Requesting a wake up for Sun, Nov 25 2018 @ 6:19:06 PM AEST (in 10.0s)
+1323ms ║╚Execution stage complete. (1232ms)
+1325ms ║Setting up scheduled job for Sun, Nov 25 2018 @ 6:19:06 PM AEST (in 9.995s)
+1335ms ╚Event processed successfully (1335ms)
11/25/2018, 6:18:56 PM +692ms
+99ms ╔Stopping piston…
+173ms ╚Piston successfully stopped (74ms)
11/25/2018, 6:18:51 PM +602ms
+1ms ╔Received event [My Gaming Rig].power = 243.76 with a delay of 37ms
+88ms ║RunTime Analysis CS > 11ms > PS > 58ms > PE > 19ms > CE
+91ms ║Runtime (38548 bytes) successfully initialized in 58ms (v0.3.108.20180906) (88ms)
+92ms ║╔Execution stage started
+104ms ║║Comparison (enum) on is (string) on = true (1ms)
+106ms ║║Condition #2 evaluated true (10ms)
+107ms ║║Condition group #1 evaluated true (state did not change) (11ms)
+114ms ║║Comparison (decimal) 243.76 is_less_than (integer) 500 = true (1ms)
+115ms ║║Condition #4 evaluated true (6ms)
+116ms ║║Condition group #3 evaluated true (state did not change) (7ms)
+119ms ║║Cancelling statement #5’s schedules…
+741ms ║║Executed physical command [My Gaming Rig].getEnergyStats() (619ms)
+742ms ║║Executed [My Gaming Rig].getEnergyStats (621ms)
+1328ms ║║Executed physical command [My Gaming Rig].refresh() (584ms)
+1329ms ║║Executed [My Gaming Rig].refresh (586ms)
+1333ms ║║Executed virtual command [My Gaming Rig].wait (1ms)
+1334ms ║║Requesting a wake up for Sun, Nov 25 2018 @ 6:19:02 PM AEST (in 10.0s)
+1340ms ║╚Execution stage complete. (1248ms)
+1341ms ║Setting up scheduled job for Sun, Nov 25 2018 @ 6:19:02 PM AEST (in 9.995s)
+1358ms ╚Event processed successfully (1358ms)
11/25/2018, 6:18:46 PM +596ms
+1ms ╔Received event [My Gaming Rig].power = 241.77 with a delay of 38ms
+82ms ║RunTime Analysis CS > 12ms > PS > 51ms > PE > 19ms > CE
+84ms ║Runtime (38548 bytes) successfully initialized in 51ms (v0.3.108.20180906) (83ms)
+85ms ║╔Execution stage started
+96ms ║║Comparison (enum) on is (string) on = true (2ms)
+98ms ║║Condition #2 evaluated true (8ms)
+99ms ║║Condition group #1 evaluated true (state did not change) (10ms)
+106ms ║║Comparison (decimal) 241.77 is_less_than (integer) 500 = true (1ms)
+107ms ║║Condition #4 evaluated true (6ms)
+109ms ║║Condition group #3 evaluated true (state did not change) (7ms)
+111ms ║║Cancelling statement #5’s schedules…
+965ms ║║Executed physical command [My Gaming Rig].getEnergyStats() (851ms)
+967ms ║║Executed [My Gaming Rig].getEnergyStats (853ms)
+1542ms ║║Executed physical command [My Gaming Rig].refresh() (573ms)
+1544ms ║║Executed [My Gaming Rig].refresh (575ms)
+1547ms ║║Executed virtual command [My Gaming Rig].wait (0ms)
+1549ms ║║Requesting a wake up for Sun, Nov 25 2018 @ 6:18:58 PM AEST (in 10.0s)
+1554ms ║╚Execution stage complete. (1469ms)
+1556ms ║Setting up scheduled job for Sun, Nov 25 2018 @ 6:18:58 PM AEST (in 9.995s)
+1571ms ╚Event processed successfully (1570ms)
11/25/2018, 6:18:33 PM +637ms
+1ms ╔Received event [My Gaming Rig].power = 243.67 with a delay of 44ms
+8664ms ║RunTime Analysis CS > 20ms > PS > 8619ms > PE > 26ms > CE
+8665ms ║Piston waited at a semaphore for 8565ms
+8668ms ║Runtime (38623 bytes) successfully initialized in 8619ms (v0.3.108.20180906) (8665ms)
+8669ms ║╔Execution stage started
+8681ms ║║Comparison (enum) on is (string) on = true (1ms)
+8682ms ║║Condition #2 evaluated true (9ms)
+8683ms ║║Condition group #1 evaluated true (state did not change) (10ms)
+8690ms ║║Comparison (decimal) 243.67 is_less_than (integer) 500 = true (2ms)
+8692ms ║║Condition #4 evaluated true (6ms)
+8693ms ║║Condition group #3 evaluated true (state did not change) (8ms)
+8695ms ║║Cancelling statement #5’s schedules…
+9351ms ║║Executed physical command [My Gaming Rig].getEnergyStats() (652ms)
+9352ms ║║Executed [My Gaming Rig].getEnergyStats (654ms)
+9958ms ║║Executed physical command [My Gaming Rig].refresh() (603ms)
+9959ms ║║Executed [My Gaming Rig].refresh (605ms)
+9964ms ║║Executed virtual command [My Gaming Rig].wait (0ms)
+9965ms ║║Requesting a wake up for Sun, Nov 25 2018 @ 6:18:53 PM AEST (in 10.0s)
+9970ms ║╚Execution stage complete. (1302ms)
+9972ms ║Setting up scheduled job for Sun, Nov 25 2018 @ 6:18:53 PM AEST (in 9.995s)
+9991ms ╚Event processed successfully (9991ms)
11/25/2018, 6:18:40 PM +605ms
+1ms ╔Received event [My Gaming Rig].power = 248.42 with a delay of 42ms
+104ms ║RunTime Analysis CS > 15ms > PS > 71ms > PE > 18ms > CE
+106ms ║Runtime (38549 bytes) successfully initialized in 71ms (v0.3.108.20180906) (104ms)
+107ms ║╔Execution stage started
+120ms ║║Comparison (enum) on is (string) on = true (1ms)
+121ms ║║Condition #2 evaluated true (9ms)
+122ms ║║Condition group #1 evaluated true (state did not change) (10ms)
+129ms ║║Comparison (decimal) 248.42 is_less_than (integer) 500 = true (1ms)
+131ms ║║Condition #4 evaluated true (6ms)
+132ms ║║Condition group #3 evaluated true (state did not change) (8ms)
+136ms ║║Cancelling statement #5’s schedules…
+768ms ║║Executed physical command [My Gaming Rig].getEnergyStats() (628ms)
+769ms ║║Executed [My Gaming Rig].getEnergyStats (631ms)
+1345ms ║║Executed physical command [My Gaming Rig].refresh() (572ms)
+1346ms ║║Executed [My Gaming Rig].refresh (574ms)
+1349ms ║║Executed virtual command [My Gaming Rig].wait (1ms)
+1351ms ║║Requesting a wake up for Sun, Nov 25 2018 @ 6:18:51 PM AEST (in 10.0s)
+1356ms ║╚Execution stage complete. (1249ms)
+1358ms ║Setting up scheduled job for Sun, Nov 25 2018 @ 6:18:51 PM AEST (in 9.995s)
+1374ms ╚Event processed successfully (1374ms)
11/25/2018, 6:18:36 PM +600ms
+1ms ╔Received event [My Gaming Rig].power = 240.64 with a delay of 40ms
+85ms ║RunTime Analysis CS > 14ms > PS > 55ms > PE > 17ms > CE
+88ms ║Runtime (38548 bytes) successfully initialized in 55ms (v0.3.108.20180906) (87ms)
+89ms ║╔Execution stage started
+100ms ║║Comparison (enum) on is (string) on = true (1ms)
+102ms ║║Condition #2 evaluated true (8ms)
+103ms ║║Condition group #1 evaluated true (state did not change) (10ms)
+109ms ║║Comparison (decimal) 240.64 is_less_than (integer) 500 = true (1ms)
+111ms ║║Condition #4 evaluated true (6ms)
+112ms ║║Condition group #3 evaluated true (state did not change) (7ms)
+116ms ║║Cancelling statement #5’s schedules…
+729ms ║║Executed physical command [My Gaming Rig].getEnergyStats() (610ms)
+730ms ║║Executed [My Gaming Rig].getEnergyStats (612ms)
+1308ms ║║Executed physical command [My Gaming Rig].refresh() (576ms)
+1309ms ║║Executed [My Gaming Rig].refresh (578ms)
+1313ms ║║Executed virtual command [My Gaming Rig].wait (1ms)
+1315ms ║║Requesting a wake up for Sun, Nov 25 2018 @ 6:18:47 PM AEST (in 10.0s)
+1320ms ║╚Execution stage complete. (1232ms)
+1322ms ║Setting up scheduled job for Sun, Nov 25 2018 @ 6:18:47 PM AEST (in 9.995s)
+1341ms ╚Event processed successfully (1341ms)
11/25/2018, 6:18:32 PM +179ms
+1ms ╔Received event [Home].test = 1543133912179 with a delay of 0ms
+145ms ║RunTime Analysis CS > 20ms > PS > 101ms > PE > 23ms > CE
+149ms ║Runtime (38547 bytes) successfully initialized in 101ms (v0.3.108.20180906) (147ms)
+151ms ║╔Execution stage started
+167ms ║║Comparison (enum) on is (string) on = true (2ms)
+170ms ║║Condition #2 evaluated true (12ms)
+171ms ║║Condition group #1 evaluated true (state did not change) (14ms)
+183ms ║║Comparison (decimal) 248.35 is_less_than (integer) 500 = true (2ms)
+185ms ║║Condition #4 evaluated true (10ms)
+186ms ║║Condition group #3 evaluated true (state did not change) (12ms)
+190ms ║║Cancelling statement #5’s schedules…
+1083ms ║║Executed physical command [My Gaming Rig].getEnergyStats() (888ms)
+1084ms ║║Executed [My Gaming Rig].getEnergyStats (892ms)
+1666ms ║║Executed physical command [My Gaming Rig].refresh() (578ms)
+1667ms ║║Executed [My Gaming Rig].refresh (581ms)
+1672ms ║║Executed virtual command [My Gaming Rig].wait (1ms)
+1675ms ║║Requesting a wake up for Sun, Nov 25 2018 @ 6:18:43 PM AEST (in 10.0s)
+1684ms ║╚Execution stage complete. (1534ms)
+1686ms ║Setting up scheduled job for Sun, Nov 25 2018 @ 6:18:43 PM AEST (in 9.991s)
+1705ms ╚Event processed successfully (1705ms))
