Power monitor status


#21

29 PM


#22

its hard to read that without trace and a green snapshot … dont know what the line numbers refer to.


#23


#24

30 second is probably too short an interval … how about trying 5 mins? :slight_smile:


#25

Ok…but what do you think about the logs vs. how I programmed it?

I’m giving the 5 minute interval a whirl…


#26

the log says condition #4 evaluated true from the log. but if i look at the trace it shows condition #4 was false. is the trace and log from the same run?


#27

I believe so…that is why I am mystified, who knows…


#28

ok. lets look at the 5 min output both with the trace and full logs and lets see if we can figure it out.


#29

So it did the same thing…30 seconds or 5 minutes, the result was the same…the wattage is coming in at 1 minute increments…the first one it used to compare and the final one at 5 minutes were different…Obviously programming it this way doesn’t work lol!

Also, even if it did work, is it supposed to compare each variable it receives (once a minute) to see if any of them are different? I assume so…but if it only looks at one variable at the beginning of the 5 minutes and then one at 5 minutes, it’s always possible they match (in this case, they didn’t.)

I only did a medium trace, so I am not sure if that helps.


#30

if you dont mind lets do another run with the full logs. and post both the trace the logs please.

if the condition is not working right it will help to understand why or why not.


#31

Here’s what I have so far:

10/12/2017, 9:19:58 PM +286ms
+1ms ╔Received event [Power monitor].power = 364 with a delay of -84ms
+66ms ║RunTime Analysis CS > 13ms > PS > 40ms > PE > 13ms > CE
+76ms ║Runtime (36853 bytes) successfully initialized in 40ms (v0.2.0fa.20171011) (75ms)
+77ms ║╔Execution stage started
+86ms ║║Comparison (decimal) 364.0 stays_unchanged = true (0ms)
+88ms ║║Condition #4 evaluated false (5ms)
+89ms ║║Condition group #1 evaluated false (state did not change) (6ms)
+91ms ║╚Execution stage complete. (15ms)
+93ms ║Setting up scheduled job for Thu, Oct 12 2017 @ 9:23:58 PM PDT (in 240.073s)
+108ms ╚Event processed successfully (107ms)
10/12/2017, 9:18:58 PM +356ms
+1ms ╔Received event [Power monitor].power = 380 with a delay of 112ms
+71ms ║RunTime Analysis CS > 13ms > PS > 42ms > PE > 16ms > CE
+79ms ║Runtime (36850 bytes) successfully initialized in 42ms (v0.2.0fa.20171011) (77ms)
+80ms ║╔Execution stage started
+93ms ║║Comparison (decimal) 380.0 stays_unchanged = true (5ms)
+95ms ║║Adding a timed trigger schedule for condition 4
+97ms ║║Cancelling condition #4’s schedules…
+98ms ║║Condition #4 evaluated false (13ms)
+99ms ║║Cancelling condition #1’s schedules…
+100ms ║║Condition group #1 evaluated false (state changed) (14ms)
+102ms ║╚Execution stage complete. (22ms)
+104ms ║Setting up scheduled job for Thu, Oct 12 2017 @ 9:23:58 PM PDT (in 299.992s)
+118ms ╚Event processed successfully (118ms)
10/12/2017, 9:18:49 PM +364ms
+0ms ╔Starting piston… (v0.2.0fa.20171011)
+156ms ║╔Subscribing to devices…
+177ms ║║Subscribing to Power monitor.power…
+305ms ║╚Finished subscribing (151ms)
+334ms ║Comparison (decimal) 347.0 stays_unchanged = true (5ms)
+335ms ║Cancelling condition #4’s schedules…
+335ms ║Cancelling condition #1’s schedules…
+352ms ╚Piston successfully started (352ms)
10/12/2017, 9:18:49 PM +364ms
+0ms ╔Starting piston… (v0.2.0fa.20171011)
+156ms ║╔Subscribing to devices…
+177ms ║║Subscribing to Power monitor.power…
+305ms ║╚Finished subscribing (151ms)
+334ms ║Comparison (decimal) 347.0 stays_unchanged = true (5ms)
+335ms ║Cancelling condition #4’s schedules…
+335ms ║Cancelling condition #1’s schedules…
+352ms ╚Piston successfully started (352ms)


#32

thanks. so far everything looks right.


#33

Except this. The wattage is fluctuating (as it should,) but it is still executing the notification:

10/12/2017, 9:23:58 PM +357ms
+2ms ╔Received event [Power monitor].power = 361 with a delay of 112ms
+92ms ║RunTime Analysis CS > 16ms > PS > 55ms > PE > 21ms > CE
+100ms ║Runtime (36848 bytes) successfully initialized in 55ms (v0.2.0fa.20171011) (98ms)
+101ms ║╔Execution stage started
+114ms ║║Comparison (decimal) 361.0 stays_unchanged = true (0ms)
+116ms ║║Adding a timed trigger schedule for condition 4
+118ms ║║Cancelling condition #4’s schedules…
+119ms ║║Condition #4 evaluated false (11ms)
+120ms ║║Cancelling condition #1’s schedules…
+121ms ║║Condition group #1 evaluated false (state changed) (13ms)
+124ms ║╚Execution stage complete. (23ms)
+126ms ║Setting up scheduled job for Thu, Oct 12 2017 @ 9:28:58 PM PDT (in 299.991s)
+140ms ╚Event processed successfully (140ms)
10/12/2017, 9:23:57 PM +125ms
+1ms ╔Received event [Home].time = 1507868638451 with a delay of -1326ms
+99ms ║RunTime Analysis CS > 17ms > PS > 59ms > PE > 22ms > CE
+109ms ║Runtime (36855 bytes) successfully initialized in 59ms (v0.2.0fa.20171011) (108ms)
+112ms ║╔Execution stage started
+118ms ║║Cancelling condition #4’s schedules…
+119ms ║║Condition #4 evaluated true (1ms)
+120ms ║║Cancelling condition #1’s schedules…
+121ms ║║Condition group #1 evaluated true (state changed) (4ms)
+123ms ║║Cancelling statement #2’s schedules…
+142ms ║║Executed virtual command sendSMSNotification (14ms)
+148ms ║╚Execution stage complete. (38ms)
+155ms ╚Event processed successfully (155ms)


#34

lets try this. clear the logs. pause the piston. resume the piston. turn on log to full. hit the test button. then wait 6 mins and upload the full logs till that point.

that will help us see what is happening from start to finish. thanks.


#35

10/12/2017, 9:39:29 PM +334ms
+68ms ╔Stopping piston…
+174ms ╚Piston successfully stopped (106ms)
10/12/2017, 9:39:21 PM +447ms
+1ms ╔Received event [Home].time = 1507869562441 with a delay of -994ms
+76ms ║RunTime Analysis CS > 14ms > PS > 41ms > PE > 21ms > CE
+87ms ║Runtime (36854 bytes) successfully initialized in 41ms (v0.2.0fa.20171011) (86ms)
+88ms ║╔Execution stage started
+95ms ║║Cancelling condition #4’s schedules…
+95ms ║║Condition #4 evaluated true (1ms)
+96ms ║║Cancelling condition #1’s schedules…
+97ms ║║Condition group #1 evaluated true (state changed) (3ms)
+99ms ║║Cancelling statement #2’s schedules…
+113ms ║║Executed virtual command sendSMSNotification (8ms)
+116ms ║╚Execution stage complete. (28ms)
+123ms ╚Event processed successfully (123ms)
10/12/2017, 9:39:02 PM +864ms
+1ms ╔Received event [Power monitor].power = 365 with a delay of 730ms
+96ms ║RunTime Analysis CS > 29ms > PS > 44ms > PE > 23ms > CE
+109ms ║Runtime (36853 bytes) successfully initialized in 44ms (v0.2.0fa.20171011) (106ms)
+109ms ║╔Execution stage started
+118ms ║║Comparison (decimal) 365.0 stays_unchanged = true (1ms)
+123ms ║║Condition #4 evaluated false (9ms)
+124ms ║║Condition group #1 evaluated false (state did not change) (10ms)
+126ms ║╚Execution stage complete. (17ms)
+128ms ║Setting up scheduled job for Thu, Oct 12 2017 @ 9:39:22 PM PDT (in 19.45s)
+441ms ╚Event processed successfully (441ms)
10/12/2017, 9:37:58 PM +936ms
+1ms ╔Received event [Power monitor].power = 354 with a delay of 117ms
+98ms ║RunTime Analysis CS > 18ms > PS > 58ms > PE > 22ms > CE
+112ms ║Runtime (36853 bytes) successfully initialized in 58ms (v0.2.0fa.20171011) (110ms)
+113ms ║╔Execution stage started
+124ms ║║Comparison (decimal) 354.0 stays_unchanged = true (1ms)
+129ms ║║Condition #4 evaluated false (10ms)
+130ms ║║Condition group #1 evaluated false (state did not change) (11ms)
+132ms ║╚Execution stage complete. (19ms)
+134ms ║Setting up scheduled job for Thu, Oct 12 2017 @ 9:39:22 PM PDT (in 83.372s)
+157ms ╚Event processed successfully (157ms)
10/12/2017, 9:36:58 PM +353ms
+2ms ╔Received event [Power monitor].power = 342 with a delay of 124ms
+91ms ║RunTime Analysis CS > 17ms > PS > 55ms > PE > 18ms > CE
+103ms ║Runtime (36853 bytes) successfully initialized in 55ms (v0.2.0fa.20171011) (99ms)
+104ms ║╔Execution stage started
+114ms ║║Comparison (decimal) 342.0 stays_unchanged = true (0ms)
+116ms ║║Condition #4 evaluated false (7ms)
+117ms ║║Condition group #1 evaluated false (state did not change) (8ms)
+119ms ║╚Execution stage complete. (16ms)
+121ms ║Setting up scheduled job for Thu, Oct 12 2017 @ 9:39:22 PM PDT (in 143.968s)
+136ms ╚Event processed successfully (136ms)
10/12/2017, 9:35:58 PM +557ms
+1ms ╔Received event [Power monitor].power = 370 with a delay of 132ms
+91ms ║RunTime Analysis CS > 17ms > PS > 57ms > PE > 18ms > CE
+302ms ║Runtime (36853 bytes) successfully initialized in 57ms (v0.2.0fa.20171011) (299ms)
+303ms ║╔Execution stage started
+315ms ║║Comparison (decimal) 370.0 stays_unchanged = true (1ms)
+317ms ║║Condition #4 evaluated false (7ms)
+318ms ║║Condition group #1 evaluated false (state did not change) (8ms)
+321ms ║╚Execution stage complete. (19ms)
+322ms ║Setting up scheduled job for Thu, Oct 12 2017 @ 9:39:22 PM PDT (in 203.562s)
+394ms ╚Event processed successfully (394ms)
10/12/2017, 9:34:58 PM +494ms
+1ms ╔Received event [Power monitor].power = 354 with a delay of 114ms
+89ms ║RunTime Analysis CS > 17ms > PS > 57ms > PE > 16ms > CE
+100ms ║Runtime (36852 bytes) successfully initialized in 57ms (v0.2.0fa.20171011) (98ms)
+101ms ║╔Execution stage started
+112ms ║║Comparison (decimal) 354.0 stays_unchanged = true (1ms)
+114ms ║║Condition #4 evaluated false (7ms)
+115ms ║║Condition group #1 evaluated false (state did not change) (8ms)
+117ms ║╚Execution stage complete. (16ms)
+119ms ║Setting up scheduled job for Thu, Oct 12 2017 @ 9:39:22 PM PDT (in 263.829s)
+133ms ╚Event processed successfully (133ms)
10/12/2017, 9:34:22 PM +299ms
+1ms ╔Received event [Home].test = 1507869262216 with a delay of 82ms
+112ms ║RunTime Analysis CS > 20ms > PS > 75ms > PE > 17ms > CE
+120ms ║Runtime (36850 bytes) successfully initialized in 75ms (v0.2.0fa.20171011) (119ms)
+121ms ║╔Execution stage started
+131ms ║║Comparison (decimal) 348.0 stays_unchanged = true (1ms)
+142ms ║║Adding a timed trigger schedule for condition 4
+145ms ║║Cancelling condition #4’s schedules…
+146ms ║║Condition #4 evaluated false (21ms)
+147ms ║║Cancelling condition #1’s schedules…
+148ms ║║Condition group #1 evaluated false (state changed) (23ms)
+170ms ║╚Execution stage complete. (49ms)
+175ms ║Setting up scheduled job for Thu, Oct 12 2017 @ 9:39:22 PM PDT (in 299.968s)
+192ms ╚Event processed successfully (192ms)
10/12/2017, 9:34:17 PM +544ms
+1ms ╔Starting piston… (v0.2.0fa.20171011)
+326ms ║╔Subscribing to devices…
+345ms ║║Subscribing to Power monitor.power…
+583ms ║╚Finished subscribing (264ms)
+617ms ║Comparison (decimal) 348.0 stays_unchanged = true (5ms)
+621ms ║Cancelling condition #4’s schedules…
+622ms ║Cancelling condition #1’s schedules…
+791ms ╚Piston successfully started (791ms)


#36

What should the task execution policy, etc be? Maybe that’s wrong?


#37

checking … you have not changed any of the TCP or TEP policy, have you?


#38

It looks like everything is default on this piston


#39

change the stays unchanged to did not change and try please.

here i tried this and it works:


#40

I’ll try it, thanks…did you unplug your unit to see if it would trip the notification? I’m trying it now. I’m thinking now the timer will be necessary?

With your help, I figured it out. The power did not change was the key, combined with what you said earlier about adding a timer. Having both the timer and your above statement works, thanks!

The problem, aside from what you just figured out in how to word it is that once the unit stops reporting, WebCoRE is not getting further readings and has nothing to compare it to. But, with what you said to do earlier with the timer, coupled with your newest piston version, even if the unit goes offline and stops reporting, the timer causes another polling to be done and then WebCoRE figures out something isn’t right…it might take a couple passes for it to figure it out, depending on what the wattage was before it went offline, but WebCoRE picks it up within a couple timer passes…It looks like what it does is look at what the power reading is, the timer counts down, then it takes another look at what the reading is. If those two are the same, it believes nothing has changed between those times. I’m not sure the amount of minutes is actually needed in the ‘if’ section, sense the timer is causing WebCoRE to look at each interval and comparing the values.

The only issue I can see is a false reading if the power reading happens to end up being the same between the two readings and the unit is still plugged in, and the readings, by luck, were the same. I think that’s unlikely, but possible…Not sure if there is an additional line we can add to have it make multiple comparisons over several minutes before it deduces the readings are the same over a longer period of time…

Question: Once the piston fires after it determines the situation is ‘true’ how do we limit how many messages are sent?