Alarm piston help


#1

1) Give a description of the problem
I have designed my own alarm piston. i know there are are few around but i really want to learn rather than keep using others. please see below, im really pleased with it. However, when the ‘alarm is disabled’ ie location mode changes to ‘home’ i want it to send the alarm deactivated txt / push notification but i am noticing that this will now occur every time the location changes to ‘home’, not just in reaction to this piston

2) What is the expected behaviour?
i would like it so the push / text only gets sent as a result of this piston being ‘deactivated’ not every-time location changes to ‘home’

**4) Post a Green Snapshot of the piston!


#2

We need another condition for the second part, so you woudn’t get a notification when location mode changes to HOME for other reasons… one way would be with a variable (true/false) but maybe we can go even simpler…
If you add, lets say,

IF LOCATION MODE changes to home
and
IF location mode was away in the last x amout of time…
then
send sms and push etc…

do you think this would solve it?? (since I am not sure about your setup, i am shooting blind)


#3

Hi Ike

You’re becoming my personal helper!

:grinning:

I’m not sure the simple option would help as that will always be the case (changing to home from away)

Can you help with a variable, although I’ve never used one before!


#4

I’ll send you the bill LOL:))))

leaving now… but be back in few hours…
I will write one uses a variable…


#5

I am a little confused about this part… please explain more so I don’t cause you to circle around:))))

If changing from away to home… and this is the only option, always the case… than shouldn’t you receive sms every time? because the alarm is being deactivated??
Is there any other senario where you leave the house without alarm activated??? but mode changes to away?? is this the case are we talking about???


#6

Thank you.

I suppose you are right. The only reason I was looking at this was I get a push and then the text goes to my father, one for pre alarm and then one for either alarm activated or disarmed. He would currently get one everytime someone comes home rather than only if someone enters without presence confirmed (this changes mode to home) and then the alarm being activated or disarmed (essentially a false alarm)

Does that make sense? If it’s complicated I can take it off…


#7

i see…
I believe re-writing this piston will be easier…
Let me just repeat so I can confirm I understood your setup correctly…

1 - House is in away mode and if the door is opened, pre-alarm is activated (we are waiting if someone is going to change the house to HOME mode, or you are in trouble:)))
- Your dad gets a message (pre alarm is activated.)
2 - You are your family changes the mode to home. that means no weird stuff is happening.
- your dad gets a message (it’ all good, it was us dad no worries)

tell me what else is needed so I can write accordingly.

But so far it will look like this (just to avoid when mode changes to home part - for other reasons)

Variable alarmstatus = false

IF sensor changes to open
and
IF location mode is away
then
Set variable alarmstatus = true
Send sms
Send push
Spekaer do this do that
wait
say this say that
call the police… activate lasers… open gators gate :))))

IF location mode changes to home
and
IF variable alarmstatus IS true
Send sms (alarm deavtivated dad no worries)
Send push
wait 20 seconds
set variable alarmstatus = false

in this case, if presense sensor changes to present (your other piston I believe) your dad won’t get a notification even the location changes to HOME

Basically the variable creates a fake condition…

does that make sense???


#8

Do you use ‘night’ mode? If you use night and home for night/day, This might give you push notification every morning as well. You might want to look for changes away from ‘away’ vs just to ‘home’?


#9

Yes that right.

How do I start the variable. I may give this a shot myself. The other way I could do this is get rid of the pre alarm and all ok notification for him. J
He just gets one if alarm activated…


#10

Yes I do also use night… hmmm


#11

When you are in the edit mode of a piston, look al the way to the right hand side…
You will see bunch of stuff. Scroll down and you’ll see CREATE A NEW GLOBAL VARIABLE


#12

Thanks Ike. Then input the below?

I’m getting better! Quite good with the standard stuff, but never used variables. I’ll let you know when I get stuck lol


#13

For TRUE/FALSE choose boolean
let me know if you have any questions…

I am not that great with variables either but doing my best:))


#14

How’s this looking. I just added to the old one…


#15

looks good but it’s best to test:)))
I had many pistons looked great but did not work and many looked weird but worked LOL


#16

All worked.

Another question. How do you see the state of a variable at any time? Is it true or false at x point


#17

oh great…

few ways of how I track the variables
1 - Looking at the piston scroll down and they are all there.
2 - SMS the variable status
3 - Action Tiles (I use wall ipads around the house) i even have pistons and simulated swtiches where I can manually change them.
4 - Piston state. If you disable piston sate and add a line to your pistons
set piston state to “{@glabolal vraiable}”;