Need help understanding WebCore logic for rule


(Chris Crawford) #1

Hi, I have been trying to understand Webcore and am completely lost.

I’d like to set up a rule that is anytime between 11pm and 6am if a multipurpose sensor (ST brand) is open for 3+ seconds, sound the alarm.

I found the SHM was to sensitive and there would be a split second where the sensor may disconnect causing a false alarm. I would love to be able to activate and deactivate via routines or fake switches.

any thoughts?
Chris


#2

I have something similar for my bedroom closet light. (I added a Virtual Device-Time restriction for the purposes of the example).


(Chris Crawford) #3

OMG thank you very much!
Now i just need to create a couple virtual switches to turn on and off the piston!

Chris


#4

Do virtual switches work now? I tried them for a while and resorted to global variables when they didn’t work. Maybe I was doing something wrong.


(Chris Crawford) #5

I guess I was living in pipe dream.
I’m now just trying to figure out how to set a routine to turn off the siren when it blares


#6

Have you tried a Simulated Minimote device? Create a virtual remote and you should have 8 new buttons to do your bidding!
:sunglasses:


(Chris Crawford) #7

So update. I have a routine able to turn off the alarm and piston fires perfectly. Is there any code I can use to display which sensor tripped?


#8

Try this…

Define the variable and then set it using an expression.