Hi All,
I've created a simple rule that monitors the energy usage of a sump pump, to notify me when it runs and to notify again if it runs for more than two minutes. To stop the rule from sending multiple notifications for the same event, I implemented private boolean in the rule to only send the notification once. Here's my rule:
However, I notice after the two minute wait, the rule does not set the private boolean back to true. Looking in the logs, I have found this:
app:2682020-12-14 08:37:59.380 pm errorjava.util.NoSuchElementException: Cannot pop() an empty List on line 6918 (delayedActs)
I turned on action logging, and this is how the rule plays out whenever I simulate the sump pump running (below). Any thoughts on what I'm doing wrong and how to correct the rule? Thanks!
app:2682020-12-14 08:37:59.380 pm errorjava.util.NoSuchElementException: Cannot pop() an empty List on line 6918 (delayedActs)
app:2682020-12-14 08:37:59.357 pm infoAction: END-IF
app:2682020-12-14 08:37:59.355 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump is OFF' (skipped)
app:2682020-12-14 08:37:59.351 pm infoAction: Wait for condition: Power level of Basement - Sump Pump(0.000) is <= 0.0 TRUE (skipped)
app:2682020-12-14 08:37:59.335 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump has been running for more than 2min' (skipped)
app:2682020-12-14 08:37:59.332 pm infoAction: IF (Power level of Basement - Sump Pump(0.000) is >= 100.0(F) [FALSE]) THEN (skipping)
app:2682020-12-14 08:37:59.313 pm infoAction: Set Private Boolean True
app:2682020-12-14 08:37:59.280 pm infoDelay Over: Delay 0:02:00
app:2682020-12-14 08:36:06.400 pm infoAction: END-IF
app:2682020-12-14 08:36:06.398 pm infoAction: END-IF (skipped)
app:2682020-12-14 08:36:06.395 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump is OFF' (skipped)
app:2682020-12-14 08:36:06.392 pm infoAction: Wait for condition: Power level of Basement - Sump Pump(744.363) is <= 0.0 FALSE (skipped)
app:2682020-12-14 08:36:06.374 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump has been running for more than 2min' (skipped)
app:2682020-12-14 08:36:06.370 pm infoAction: IF (Power level of Basement - Sump Pump(744.363) is >= 100.0(T) [TRUE]) THEN (skipped)
app:2682020-12-14 08:36:06.349 pm infoAction: Set Private Boolean True (skipped)
app:2682020-12-14 08:36:06.334 pm infoAction: Delay 0:02:00 (skipped)
app:2682020-12-14 08:36:06.331 pm infoAction: Notify Mike's Phone: 'Sump Pump RUNNING' (skipped)
app:2682020-12-14 08:36:06.328 pm infoAction: Set Private Boolean False (skipped)
app:2682020-12-14 08:36:06.311 pm infoAction: IF (Power level of Basement - Sump Pump(744.363) is >= 100.0(T) AND Private Boolean is true(F) [FALSE]) THEN (skipping)
app:2682020-12-14 08:36:06.063 pm infoAction: END-IF
app:2682020-12-14 08:36:06.061 pm infoAction: END-IF (skipped)
app:2682020-12-14 08:36:06.059 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump is OFF' (skipped)
app:2682020-12-14 08:36:06.048 pm infoAction: END-IF
app:2682020-12-14 08:36:06.043 pm infoAction: END-IF (skipped)
app:2682020-12-14 08:36:06.028 pm infoAction: Wait for condition: Power level of Basement - Sump Pump(744.363) is <= 0.0 FALSE (skipped)
app:2682020-12-14 08:36:06.028 pm infoAction: END-IF
app:2682020-12-14 08:36:06.027 pm infoAction: END-IF (skipped)
app:2682020-12-14 08:36:06.024 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump is OFF' (skipped)
app:2682020-12-14 08:36:06.020 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump is OFF' (skipped)
app:2682020-12-14 08:36:06.016 pm infoAction: Wait for condition: Power level of Basement - Sump Pump(744.363) is <= 0.0 FALSE (skipped)
app:2682020-12-14 08:36:06.016 pm infoAction: Wait for condition: Power level of Basement - Sump Pump(744.363) is <= 0.0 FALSE (skipped)
app:2682020-12-14 08:36:05.932 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump has been running for more than 2min' (skipped)
app:2682020-12-14 08:36:05.928 pm infoAction: IF (Power level of Basement - Sump Pump(619.677) is >= 100.0(T) [TRUE]) THEN (skipped)
app:2682020-12-14 08:36:05.911 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump has been running for more than 2min' (skipped)
app:2682020-12-14 08:36:05.897 pm infoAction: IF (Power level of Basement - Sump Pump(619.677) is >= 100.0(T) [TRUE]) THEN (skipped)
app:2682020-12-14 08:36:05.892 pm infoAction: Set Private Boolean True (skipped)
app:2682020-12-14 08:36:05.858 pm infoAction: Delay 0:02:00 (skipped)
app:2682020-12-14 08:36:05.854 pm infoAction: Notify Mike's Phone: 'Sump Pump RUNNING' (skipped)
app:2682020-12-14 08:36:05.854 pm infoAction: Set Private Boolean True (skipped)
app:2682020-12-14 08:36:05.847 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump has been running for more than 2min' (skipped)
app:2682020-12-14 08:36:05.844 pm infoAction: IF (Power level of Basement - Sump Pump(619.677) is >= 100.0(T) [TRUE]) THEN (skipped)
app:2682020-12-14 08:36:05.842 pm infoAction: Set Private Boolean False (skipped)
app:2682020-12-14 08:36:05.830 pm infoAction: END-IF
app:2682020-12-14 08:36:05.826 pm infoAction: Delay 0:02:00 (skipped)
app:2682020-12-14 08:36:05.822 pm infoAction: END-IF (skipped)
app:2682020-12-14 08:36:05.823 pm infoAction: Notify Mike's Phone: 'Sump Pump RUNNING' (skipped)
app:2682020-12-14 08:36:05.787 pm infoAction: IF (Power level of Basement - Sump Pump(619.677) is >= 100.0(T) AND Private Boolean is true(F) [FALSE]) THEN (skipping)
app:2682020-12-14 08:36:05.810 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump is OFF' (skipped)
app:2682020-12-14 08:36:05.807 pm infoAction: Wait for condition: Power level of Basement - Sump Pump(619.677) is <= 0.0 FALSE (skipped)
app:2682020-12-14 08:36:05.806 pm infoAction: Set Private Boolean True (skipped)
app:2682020-12-14 08:36:05.806 pm infoAction: Set Private Boolean False (skipped)
app:2682020-12-14 08:36:05.782 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump has been running for more than 2min' (skipped)
app:2682020-12-14 08:36:05.778 pm infoAction: IF (Power level of Basement - Sump Pump(619.677) is >= 100.0(T) [TRUE]) THEN (skipped)
app:2682020-12-14 08:36:05.762 pm infoAction: IF (Power level of Basement - Sump Pump(619.677) is >= 100.0(T) AND Private Boolean is true(F) [FALSE]) THEN (skipping)
app:2682020-12-14 08:36:05.753 pm infoAction: Set Private Boolean True (skipped)
app:2682020-12-14 08:36:05.744 pm infoAction: Delay 0:02:00 (skipped)
app:2682020-12-14 08:36:05.741 pm infoAction: Notify Mike's Phone: 'Sump Pump RUNNING' (skipped)
app:2682020-12-14 08:36:05.673 pm infoAction: Set Private Boolean False (skipped)
app:2682020-12-14 08:36:05.679 pm infoAction: Delay 0:02:00 (skipped)
app:2682020-12-14 08:36:05.676 pm infoAction: Notify Mike's Phone: 'Sump Pump RUNNING' (skipped)
app:2682020-12-14 08:36:05.673 pm infoAction: Set Private Boolean False (skipped)
app:2682020-12-14 08:36:05.535 pm infoAction: IF (Power level of Basement - Sump Pump(619.677) is >= 100.0(T) AND Private Boolean is true(F) [FALSE]) THEN (skipping)
app:2682020-12-14 08:36:05.508 pm infoAction: IF (Power level of Basement - Sump Pump(619.677) is >= 100.0(T) AND Private Boolean is true(F) [FALSE]) THEN (skipping)
app:2682020-12-14 08:36:05.494 pm infoAction: END-IF
app:2682020-12-14 08:36:05.487 pm infoAction: END-IF (skipped)
app:2682020-12-14 08:36:05.483 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump is OFF' (skipped)
app:2682020-12-14 08:36:05.467 pm infoAction: Wait for condition: Power level of Basement - Sump Pump(619.677) is <= 0.0 FALSE (skipped)
app:2682020-12-14 08:36:05.260 pm infoAction: Notify Ryan's Phone, Mike's Phone: 'Sump Pump has been running for more than 2min' (skipped)
app:2682020-12-14 08:36:05.241 pm infoAction: IF (Power level of Basement - Sump Pump(595.779) is >= 100.0(T) [TRUE]) THEN (skipped)
app:2682020-12-14 08:36:05.074 pm infoAction: Set Private Boolean True (skipped)
app:2682020-12-14 08:36:05.017 pm infoAction: Delay 0:02:00 (skipped)
app:2682020-12-14 08:36:04.982 pm infoAction: Notify Mike's Phone: 'Sump Pump RUNNING' (skipped)
app:2682020-12-14 08:36:04.972 pm infoAction: Set Private Boolean False (skipped)
app:2682020-12-14 08:36:04.928 pm infoAction: IF (Power level of Basement - Sump Pump(595.779) is >= 100.0(T) AND Private Boolean is true(F) [FALSE]) THEN (skipping)
app:2682020-12-14 08:35:59.132 pm infoAction: Delay 0:02:00
app:2682020-12-14 08:35:59.114 pm infoAction: Notify Mike's Phone: 'Sump Pump RUNNING'
app:2682020-12-14 08:35:59.111 pm infoAction: Set Private Boolean False
app:2682020-12-14 08:35:59.094 pm infoAction: IF (Power level of Basement - Sump Pump(320.511) is >= 100.0(T) AND Private Boolean is true(T) [TRUE]) THEN