Bypass certain sensor only during certain time


#1

1) Give a description of the problem
(I need to exclude 1 or 2 sensors from triggering the SHM alarm during the day & evening when armed in Alarm ( stay ) . For example, the door to the deck so we can go out this door & not trigger the alarm during the day or early evening.)

2) What is the expected behavior?
(The expected behavior is the 1 or 2 sensors are bypassed at certain times not trigerring the alarm)

3) What is happening/not happening?
(We mostly have to turn alarm off or if we forget, the deck door is on a delay & we have to shut off the alarm. I am new to this and can’t get SmartThings by itself to accomplish this selective bypass. I have search and have not found a piston that I could copy to accomplish this type of task)

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


#2

Hi @acr123

sensors ALWAYS report motion/no motion or open/close etc to Smart Things (or what ever your hub is)
What you need to do is using a condition in webcore so you can control what needs to be done.

Example :

IF motion sensor motion changes to active (TRIGGER) = that means something is moving
AND
IF time is between 5:00pm and 8:00pm (CONDITION) between these hours nothing will happen…
Then
Don’t do anytthing (this is just an example)

IF motion sensor motion changes to active (TRIGGER)
AND
IF time is between 11:00pm and 5:00am (CONDITION) = that means alarm is active
Then
Do this do that, call the police, screem, get your shotgun:))))

You don’t even need the first IF BLOCK but i put it there so you could see the example better…

let me know if you have questions.


#3

///* webCoRE Piston #2 Bypass certain sensor(s) at a certain time *////* Author : Al Rosen // Created : 2/21/2019, 7:07:52 PM // Modified : 2/21/2019, 7:30:22 PM // Build : 1 // UI version : v0.3.109.20181207 *//**************************************************************/ execute

if

Family Room Door To Deck’s contact changes to open

and

Smart Home Monitor status is Armed/Stay

and

‘time’ is ‘between 5:30 am and 11:45 pm’

then

ifthen

ifend if;

end if;

end if;

end execute;

Edit

Above is what I have so far, but I am now stuck.( i just copied & pasted not sure if there is an easier way to show what I’ve done so far)

If deck door contact opens, and SHM is is armed ( stay) and it is between 5:45 am and 11:45 pm how do I indicate do nothing or not trigger alarm. Do I need virtual sensor, advanced features ??? Also if no days are stated does it mean every day of the week. Any help would be appreciated

thanks,

Al


#4

can you pls share your pistons green snapshot


#5

This is my latest update that I thought would work but did not. the sensor#3 are deck door Sensor #16 simulated sensor ( does alarm delay for deck door ) and switch 1 is siren.
The problem may be I could not figure out how to separate on the then with statement so it read close simulated sensor and turn off siren
I thought many people would have wanted at some tine to bypass a sensor or 2 .Either it is so easy or more complicated than it seem. Is there something to just ignore "intrusion for a particular sensor. This is all new to me.

Thanks again,

Al


#6

The problem is you have two conditions, two triggers and upside down:)))
It should be
IF a trigger
AND/OR
IF a condition
AND/OR
IF a condition

line 22 and 24 are two triggers and it will not fire.

Try this 
IF any contact sensor 3, sensor 15 changes to open (Trigger)
AND
IF time is between this and that (Condition)
AND
IF home status is armed (Condition)
THEN
do this do that

this should work

and check this article, it explains perfectly.


#7

I’m not at home but is this what you mean. I’m still unable to be able to separate the “then” “with” to add 2 things happens such as virtual sensor to turn smart monitor to off and also have siren turned off. Am I on the correct path.

Thanks again,

Al


#8

no no this should work…
you see the litlle orange lightning bolt next to line 18
That is your trigger and on top of conditions

the only this is,
smart home monitor status: are two switches turning OFF turns the home status of?
if not, you might want to put that as a seperate with / end with

with 
Switch 1 and 2 
do
Turn OFF
end with
with 
Smart home status 
set to OFF
end with

let me know how testing this one works


#9

that is exactly what I was saying I do not understand and could not figure out how to separate the then --> with swittch 1 (simulated switch ) & switch 2 (siren ) does “this & do that” INTO switch 1 turns off Home status and switch 2 turns off siren . I think we are saying the same thing, I just do not understand the button pushes to accomplish this.

Thanks,

Al


#10

I guess this is qwhat you are looking for

with
Switch 1
do
Turn OFF
end with
with
Switch 2
set to OFF
end with


#11

it is the “end with” that I did not understand. If just means end This " with" statement. Is that correct . Then you could add more “with” statements. Look at this please:

so “then” with siren do turn off then end with.
Next with virtual switch 1 set alarm status to off.

Dos this mean this virtual switch #1 can not be used anywhere else in SmartThings and if I need another virtual device it’s just #2. I think this is going to work. I will let you know

Thanks a million,

Al


#12

No you can use that switch anywhere you want to.
Just be careful if you plan on using both webCoRE and other automation apps… I do the whole house only with webcore


#13

Unfortunately did not work. The situation is that the Simulated Sensor 2 is used in place of the the real sensor ( in this case the deck door) to cause a delay using SHM delay module. There must be something else that I’m not considered or maybe the order of turning things. Is there such a thing in Webcore that after the triggering events and conditions occur that everything is then totally disabled or nothing occurs for a period of time.
What seems to be triggering the alarm is the simulated sensor 2 that takes the place of the deck door in the SHM delay. What is actually done is that in Smart Home Monitoring the deck door is removed from the list of armed intrusion sensors & replaced by the simulated sensor 2.
Any other ideas what I could try.I’m surprised many others have not had the need to bypass a sensor before & one could find many Webcore examples even though I have
not been able to.


,

Thanks again,

Al


#14

A couiple of things that I am not getting… (by the way I am not a coder or a pro, so just like you finding my way around:)))

a) Never used WHILE NIGHT… for testing purposes I would take those off…
b) With sensor, you use CLOSE command, are they automatic doors or blinds? what are you CLOSING with close command?
c) What is switch 2 is connected to??? if nothing, how your switch is going to set status to OFF?


#15

night means night mode so is a correct condition.
Contact Sensor #3 is the real deck door and the sensor is open/close type
Contact Sensor # 16 is Simulated Sensor 2 ( for the deck door ) and the sensor is open/close type. The SNM delay module normally sends command to open the simulated sensor 2 which causes the delay via a profile setup for this particular door.
I hope I made myself clear.

Al


#16

ok great
so by saying - in your piston -
contact 3 and contact 6
do
Close
what are you trying to accomplish? you don’t send close command to open/close sensor? (or i am missing somthing huge here)

Tell me what you want accomplish in real life, let me try to write a draft for you…


#17

I’m trying to bypass ( turn off ) a sensor (ex deck door) while in the house in Armed (Stay) night mode only during a certain time. In this case the deck door is on a delay so alarm doesn’t trigger instantly when door opened ( Using SHM delay ver 2).This uses a simulated sensor in place of the deck door sensor that actually extends the delay a certain amount of time and then monitors this sensor to trigger the alarm. I tried Webcore piston with moritoring this sensor either open or closed and it still triggered the intrusion after the delay time.


#18

let me give you a way to by pass sensors with alarms,

IF motion sensor changes to ACTIVE (now the piston will be executed)
But we want this not to trigger the alarm all the time - only certain times or conditions)
AND
IF time is between X and Y (now with this, the piston will continue ONLY if the time is between X and Y)
AND
IF home alarm status is ARMED (any other status wont let the piston continue)
**Then **
Do this do that

If your devices are controlled by other means (St app, or any other ways) that will create a serious conflict with your piston because webcore is not going to read what that device is doing with other apps - unless you create another piston with certain complexity

I am truly sorry i still don’t understand what this part is: This uses a simulated sensor in place of the deck door sensor that actually extends the delay a certain amount of time and then monitors this sensor to trigger the alarm. probably my brain is not functioning right today.


#19

SHM Delay is a SmartApp that monitors a simulated sensor in place of the real sensor to allow for an entrance or exit delay. The simulated sensor is added to sensor list in Smart Home Monitor and the real sensor is removed. I tried removing the “delay” from the deck door( removed simulated sensor & added back deck door sensor to eliminate extra variables ) but it still did not work. This time the deck door caused the intrusion. I think the problem is that when the sensor is triggered - door opens or motion sensor sees motion it’s too late since there does not seem to be a way to cancel the intrusion alert. I have tried many combinations of above w/o success. Maybe there is a trick???

Thanks,

Al


#20

I think what Ike was trying to say is you can drop that SmartApp completely, and let webCoRE be your logic (and delays)