Piston not firing - event subscription problem?


#1

1) Give a description of the problem
Piston is not firing, and I suspect a problem with the events subscription or lack thereof. I would love an explanation of why it is not triggering.
2) What is the expected behavior?
I expect the piston to fire every Friday at specific times, that time being dependent on whether it is an odd or even week.
3) What is happening/not happening?
Logs show piston did not fire. During initial creation and testing things seemed OK, but no joy since then. Admittedly during testing I was focused on correct behavior of toggling the “cleaningWeek” variable. I suspect the events I have subscribed to (lines #32 and lines #38) are not causing the piston to trigger like I understand they should. So once again the event subscription subtleties are escaping me;-).
I did not paste a log since there were no useful ones since the piston did not fire (other than earlier testing mentioned which lacked any useful info).

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)


5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS THEN HIGHLIGHT ALL OF THE LOGS SND CLICK ON THE </> ICON TO FORMAT THEM)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

I should add that the piston’s page does show the “This piston does not subscribe to any events. Unless executed by other means, it will never run on its own.” warning, however since I have two lines with conditions subscribing to events, I thought that warning was not valid.


#3

I would probably structure the code to use precise times, instead of a window.

Such as:

Every Friday at 8:00am
    IF cleaningWeek = true
        Then set SHM to off
    END IF
END EVERY

etc


#4

Any idea why the current structure is not firing?

I had a reason for using a window, which is that during that time period I wanted SHM to remain off, even if it gets turned on by a different event. The main case I was thinking about is if I left home during that period, which normally ARMs the SHM, I wanted it to get disabled again – hence the window. There are probably other ways to accomplish this (triggering on change of mode perhaps), but still I way I coded it should logically work.


#5

I would guess it failed because your only triggers are 2-3 layers deep.
For the most part, I keep triggers top level.

You may have to tweak your leaving home piston a bit


#6

Thanks for the top level hint!


#7

Sure thing, glad to be able to help.

I would highly recommend though not using one piston to override another piston’s logic. It is much better to add a few lines to the other piston to account for this, IMO.
(I would likely use a global variable used as a condition)


#8

Well, the “other” piston is ST’s SHM’s behavior, not a piston I explicitly created. Or maybe its a ST routine plus SHM… I don’t recall exactly. In any case I was just trying to make that setting a bit more intelligent to avoid some known false alarm cases. I know I could replace it entirely with a more complex piston, but would rather not go there yet.