Unlocked locks and contacts open piston


#1

1) Give a description of the problem
Not a problem, trying to design a piston

2) What is the expected behaviour?
I want webcore to check every ten minutes for any locks unlocked or contacts open and if there are, send a push notification of which locks are unlocked and which contacts are open. If all locks are locked and all contacts are closed, I don’t want a notification. If there are locks unlocked and all contacts are closed, I just want notified of the locks unlocked and so forth.

3) What is happening/not happening?
I just have no idea how to set it up. Currently I have two pistons that do this, one piston to check the locks and notify and another piston to check the contacts and notify. I want to do it inside of one piston so I only get one notification every ten minutes.

Thank you for your help


#2

I guess. you should post your piston(s) for folks to comment.

In general you don’t have to poll, you can just subscribe to locks being locked and unlocked, then you would know in real time. This likely would run much less.

In any case, it is easier to help you if post what you have…


#3

I modified this one from an old piston, see if this works for you. Change the time to suit your need.


#4

That is exactly what i wanted to do, I like the way you have locks unlocked: and contacts open: that’s a cool spin on it. I thank you so much! I learn more about Webcore everyday but still struggle with the more intricate code writing. Thank you again!