Yes, here’s the full log of the latest run.
8/21/2020, 4:27:37 PM +71ms
+0ms ╔Received event [Home].time = 1598052457766 with a delay of -696ms
+130ms ║RunTime Analysis CS > 24ms > PS > 45ms > PE > 61ms > CE
+133ms ║Runtime (46780 bytes) successfully initialized in 45ms (v0.3.110.20191009) (132ms)
+134ms ║╔Execution stage started
+157ms ║║Comparison (enum) idle is (string) idle = true (1ms)
+165ms ║║Condition #10 evaluated true (23ms)
+166ms ║║Condition group #9 evaluated true (state did not change) (24ms)
+190ms ║║Comparison (dynamic) 70837.7 is_greater_than (integer) 90000 = false (1ms)
+192ms ║║Cancelling condition #6's schedules...
+193ms ║║Condition #6 evaluated false (14ms)
+195ms ║║Cancelling condition #12's schedules...
+196ms ║║Condition group #12 evaluated false (state changed) (16ms)
+220ms ║║Comparison (dynamic) 76207.4 is_greater_than (integer) 90000 = false (2ms)
+222ms ║║Condition #6 evaluated false (12ms)
+223ms ║║Condition group #12 evaluated false (state did not change) (13ms)
+247ms ║║Comparison (dynamic) 99370.1 is_greater_than (integer) 90000 = true (1ms)
+249ms ║║Cancelling condition #6's schedules...
+250ms ║║Condition #6 evaluated true (13ms)
+252ms ║║Cancelling condition #12's schedules...
+253ms ║║Condition group #12 evaluated true (state changed) (15ms)
+255ms ║║Cancelling statement #15's schedules...
+357ms ║║Calculating (decimal) 0.0 + (decimal) 99370.1 >> (decimal) 99370.1
+360ms ║║Executed virtual command setVariable (1ms)
+367ms ║║Calculating (integer) 0 + (integer) 1 >> (integer) 1
+370ms ║║Executed virtual command setVariable (1ms)
+395ms ║║Comparison (dynamic) 99407.6 is_greater_than (integer) 90000 = true (1ms)
+397ms ║║Condition #6 evaluated true (12ms)
+398ms ║║Condition group #12 evaluated true (state did not change) (13ms)
+401ms ║║Cancelling statement #15's schedules...
+413ms ║║Calculating (decimal) 99370.1 + (decimal) 99407.6 >> (decimal) 198777.7
+416ms ║║Executed virtual command setVariable (1ms)
+421ms ║║Calculating (integer) 1 + (integer) 1 >> (integer) 2
+425ms ║║Executed virtual command setVariable (1ms)
+450ms ║║Comparison (dynamic) 99304 is_greater_than (integer) 90000 = true (2ms)
+452ms ║║Condition #6 evaluated true (11ms)
+453ms ║║Condition group #12 evaluated true (state did not change) (12ms)
+455ms ║║Cancelling statement #15's schedules...
+467ms ║║Calculating (decimal) 198777.7 + (decimal) 99304.0 >> (decimal) 298081.7
+471ms ║║Executed virtual command setVariable (1ms)
+476ms ║║Calculating (integer) 2 + (integer) 1 >> (integer) 3
+479ms ║║Executed virtual command setVariable (1ms)
+504ms ║║Comparison (dynamic) 99370.2 is_greater_than (integer) 90000 = true (1ms)
+506ms ║║Condition #6 evaluated true (11ms)
+507ms ║║Condition group #12 evaluated true (state did not change) (13ms)
+510ms ║║Cancelling statement #15's schedules...
+521ms ║║Calculating (decimal) 298081.7 + (decimal) 99370.2 >> (decimal) 397451.9
+524ms ║║Executed virtual command setVariable (1ms)
+530ms ║║Calculating (integer) 3 + (integer) 1 >> (integer) 4
+533ms ║║Executed virtual command setVariable (1ms)
+557ms ║║Comparison (dynamic) 99547.7 is_greater_than (integer) 90000 = true (1ms)
+558ms ║║Condition #6 evaluated true (10ms)
+559ms ║║Condition group #12 evaluated true (state did not change) (12ms)
+562ms ║║Cancelling statement #15's schedules...
+573ms ║║Calculating (decimal) 397451.9 + (decimal) 99547.7 >> (decimal) 496999.60000000003
+576ms ║║Executed virtual command setVariable (1ms)
+582ms ║║Calculating (integer) 4 + (integer) 1 >> (integer) 5
+585ms ║║Executed virtual command setVariable (1ms)
+609ms ║║Comparison (dynamic) 99356.6 is_greater_than (integer) 90000 = true (2ms)
+611ms ║║Condition #6 evaluated true (10ms)
+612ms ║║Condition group #12 evaluated true (state did not change) (13ms)
+614ms ║║Cancelling statement #15's schedules...
+626ms ║║Calculating (decimal) 496999.60000000003 + (decimal) 99356.6 >> (decimal) 596356.2000000001
+629ms ║║Executed virtual command setVariable (1ms)
+635ms ║║Calculating (integer) 5 + (integer) 1 >> (integer) 6
+638ms ║║Executed virtual command setVariable (1ms)
+648ms ║║Comparison (integer) 6 is_greater_than (integer) 0 = true (2ms)
+649ms ║║Condition #19 evaluated true (5ms)
+651ms ║║Condition group #18 evaluated true (state did not change) (6ms)
+653ms ║║Cancelling statement #2's schedules...
+659ms ║║Calculating (decimal) 596356.2000000001 / (decimal) 6.0 >> (decimal) 99392.70000000001
+663ms ║║Executed virtual command setVariable (1ms)
+685ms ║║Executed virtual command setState (1ms)
+696ms ║║Executed virtual command writeToFuelStream (6ms)
+700ms ║╚Execution stage complete. (565ms)
+701ms ║Setting up scheduled job for Fri, Aug 21 2020 @ 4:28:37 PM PDT (in 59.994s)
+709ms ╚Event processed successfully (708ms)
I wasn’t having any luck using $device as the counter variable, so I created the device vent variable.
I found I could also iterate and get the values with arrayItem(index,[Vents:pressure]), for example.
BTW, there was a bug in the code above (which I edited). The attribute was coming into WebCore as a string, and the sum = sum + vent:pressure wasn’t working right. I had to change it to sum=sum+decimal(vent:pressure), and now it works.
I had tried changing it from “number” to “NUMBER” and to “string” but nothing worked. I wasn’t removing and re-adding the device, though, so perhaps my changes weren’t propagating through in time. I didn’t know I needed to. Thanks for that!