Piston stopped with "does not subscribe to any events" message


#1

1) Give a description of the problem
Hi all, I’m SUPER green with WebCore, but really think its great. With that said, I made the piston below to automatically disarm smart home monitor every morning. I ran fine for a week or so, now it does not and I get a “does not subscribe to any events” message.

2) What is the expected behaviour?
If smart home monitor status is Armed/Stay , at 6:45am set smart home monitor to off

3) What is happening/not happening?
ran fine for a few days, now no longer running but showing “This piston does not subscribe to any events. Unless executed by other means, it will never run on its own.”

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full
9/1/2019, 12:20:29 PM +408ms
+0ms ╔Received event [Home].test = 1567354829408 with a delay of 0ms
+78ms ║RunTime Analysis CS > 21ms > PS > 44ms > PE > 13ms > CE
+81ms ║Runtime (38007 bytes) successfully initialized in 44ms (v0.3.10e.20190628) (79ms)
+82ms ║╔Execution stage started
+94ms ║║Comparison (string) off is (string) stay = false (2ms)
+96ms ║║Condition #2 evaluated false (9ms)
+97ms ║║Condition group #1 evaluated false (state did not change) (11ms)
+101ms ║╚Execution stage complete. (20ms)
+102ms ╚Event processed successfully (102ms)``


#2

Your first “trigger” is not a trigger.

Move the “Time” trigger to line 18, so that it’s the first trigger.

“Something is something” is not a trigger. Time is a trigger.

The second half, the THEN, also needs to be reworked.

As I do not have SHM, I’m not sure how it works, but there should be a “WITH” in there somewhere.

THEN
-WITH
–something
-DO
–Wait 5 seconds
–Change status to OFF
End IF

The second IF also has no Trigger. “Something is Something” is not a trigger. “Something becomes Something” is a trigger.

The “is” could be used there if the second half of the piston was reworked.

Again, I could be wrong, as I do not have SHM.


#3

This is helpful thanks. I really do struggle with programming logic.

A little more context for what I’m trying to accomplish here.

-In the first half, I’m trying to disarm SHM at 6:45am daily as long as its in the “Armed/Stay” mode.

-The second section is aiming to check if SHM was successfully switched to the disarmed mode, then push a notification informing that change has been made.

Thanks again for the help.


#4

I would split the second IF into it’s own piston.

IF
-SHM status changes to disarm
THEN
-WITH
–SHM
-Wait 5 seconds
-Send notification
-End With
End IF

Again, I don’t have SHM, so I don’t know how it is referenced as a device. The “SHM” in the above WITH statement should be some device.