Jump to content

If program disabled THEN DO SOMETHING


johnstonf

Recommended Posts

I've searched, don't see... probably been asked 1000 times, but anyways...

 

my search in the forums was...

program true false disabled condition (all)

 

I'm trying to say 'if my siren_blasts program is disabled" (not true or false) then at xx times each day, notify me by sending an email.

 

reason:

(in a panic i have a program that if we push our main dimmer 5x down (or more) then it disables it, and then it must be MANUALLY reset (i don't want it going off if i already have an emergency i know about... it just causes additional stress for no reason)

 

I only see condition "if prog true/false", not "disabled"... where the heck is it?

 

/fj

Link to comment

Enabled/Disabled is not a condition you can test in an "If" section.

 

You could add a line to the program that you used to disable it that sets a variable that then causes another program to send you an email every day until you reset the varialbe (which is supposed to be the time you then also enable the program).

 

If

Time is 8am

and

$i.pusheddisablebutton is 1

 

then

send notification

 

 

If

whatever variable you used to count 5 pushes of the dimmer switch

Then

disable siren 

set $i.pusheddisablebutton to 1

Link to comment

Because I can't think of a way to handle what you have done....

 

The only thing I can think of is to use a variable with a second siren program to disable the actual noise. Then you could monitor the variable and flash a light or other lower annoyance while the siren is disabled.

 

The variable could be controlled with the 5x switch action. Clever idea!

I use a  KPL with four keystroke combinations for several things like that.

Link to comment

Because I can't think of a way to handle what you have done....

 

The only thing I can think of is to use a variable with a second siren program to disable the actual noise. Then you could monitor the variable and flash a light or other lower annoyance while the siren is disabled.

 

The variable could be controlled with the 5x switch action. Clever idea!

I use a KPL with four keystroke combinations for several things like that.

I just need to be darn sure that that siren comes back on, so for now I'm just going to turn it on twice a day, and I'll have to manually turn it off if it isn't ready to be turned on yet. I just don't trust the variable idea... I have tried it but I just don't like it. I just don't understand why there is no condition for a disabled program, seems like a no-brainer to me.

 

Sent from my SM-N915W8 using Tapatalk

Link to comment

I just need to be darn sure that that siren comes back on, so for now I'm just going to turn it on twice a day, and I'll have to manually turn it off if it isn't ready to be turned on yet. I just don't trust the variable idea... I have tried it but I just don't like it. I just don't understand why there is no condition for a disabled program, seems like a no-brainer to me.

 

Sent from my SM-N915W8 using Tapatalk

Variables are just as trust worthy as any other programmatic thing in ISY.

 

The only failsafe would be to do an init so if there is a powerfailure it still reminds you.

 

If

Time is 8am (or whatever time you want, or multipel times, or whatever)

and

$i.pusheddisablebutton is 1

 

then

send notification

and

anything else you want that might remind you

 

 

If

whatever variable you used to count 5 pushes of the dimmer switch

Then

disable siren 

set $i.pusheddisablebutton to 1

init $i.pusheddisablebutton to 1 (with this line, even if ISY loses power, when it comes back on the variable will still be 1 and you'll still get notifications)
 
When you manually reset the variable to 0 and manaully re-enable the siren program, also manually change the variable init to 0.
Link to comment

I just need to be darn sure that that siren comes back on, so for now I'm just going to turn it on twice a day, and I'll have to manually turn it off if it isn't ready to be turned on yet. I just don't trust the variable idea... I have tried it but I just don't like it. I just don't understand why there is no condition for a disabled program, seems like a no-brainer to me.

 

Sent from my SM-N915W8 using Tapatalk

I have found variables to be very reliable and simple to use. Most of my multiple scene rooms are controlled by variables. A Switchlinc stuffs values into a variable depending on the sequence and a bank of programs in a folder react like magic. They never fail and can be operated from anywhere in any program without understanding what the lighting is currently doing, Scenes used, programs used, or Network resources.

 

As an example when my garage door is open, I flash a corner lamp red, about 1 pulse per 5 seconds. When the garage door closes, what was the lamp doing? It's easy as I don't need to care. Just refresh the variable value the variable  contains and the whole room restores to whatever it was doing, Even if Off.

 

If I change the initiator switch to a KPL or something else. I just use the same values and the bank of programs I haven't seen for years does all the work.

Link to comment

I've searched, don't see... probably been asked 1000 times, but anyways...

 

my search in the forums was...

program true false disabled condition (all)

 

I'm trying to say 'if my siren_blasts program is disabled" (not true or false) then at xx times each day, notify me by sending an email.

 

reason:

(in a panic i have a program that if we push our main dimmer 5x down (or more) then it disables it, and then it must be MANUALLY reset (i don't want it going off if i already have an emergency i know about... it just causes additional stress for no reason)

 

I only see condition "if prog true/false", not "disabled"... where the heck is it?

 

/fj

 

What are the specific conditions that cause you to manually reset the program (not why you need to reset). Details, details, details.

Link to comment

Any program that I have disabled automatically re-enables itself. For example, my entertainment button will disable my flood light motion programs. Turning that button off will re-enable the program as well as a timed program just in case the outside lights were left on for some reason.

Yes.  You could do that rather than manually re-enable.  It takes the chance that at the time of the automatic re-enable you might not be ready.

 

If

state variable that counts 5 control off from switch used to disable siren is 5

Then

disable program siren

wait 30 minutes

enable program siren

Link to comment

Yes. You could do that rather than manually re-enable. It takes the chance that at the time of the automatic re-enable you might not be ready.

 

If

state variable that counts 5 control off from switch used to disable siren is 5

Then

disable program siren

wait 30 minutes

enable program siren

That slways brings us back to one logical error...a power failure during a wait period.

 

Once the option to run at startup 'if', 'then', or 'else' is implemented, it might actually work most of the time.

 

Sent from my SGH-I257M using Tapatalk

Link to comment

That slways brings us back to one logical error...a power failure during a wait period.

 

Once the option to run at startup 'if', 'then', or 'else' is implemented, it might actually work most of the time.

 

Sent from my SGH-I257M using Tapatalk

Power failures can be pretty easily managed with a UPS.

 

Of course the program reset thing in the other thread can not.

 

But if it is a super critical thing you can use a variable as follows.  The 30 minutes would be delayed by however long your ISY was off.  I don't see any way around that.

 

If

push the off button 5 times

Then

set $s.siren to 30

init $s.siren to 30

run program 2 then clause

disable siren program

 

 

 

If   (run at start up checked)

-blank

Then

repeat while $s.siren > 0

wait 1 minute

$s.siren = - 1

init $s.siren to $s.siren

repeat 1 time

enable siren program

init $s.siren to $s.siren

 

 

Now if you had a program reset or a power failure, you would still re-enable the program.

 

NOTE: I used a state variable, but that isn't necessary, an integer would also work.

Link to comment

Power failures can be pretty easily managed with a UPS.

 

Of course the program reset thing in the other thread can not.

 

But if it is a super critical thing you can use a variable as follows.  The 30 minutes would be delayed by however long your ISY was off.  I don't see any way around that.

 

If

push the off button 5 times

Then

set $s.siren to 30

init $s.siren to 30

run program 2 then clause

disable siren program

 

 

 

If   (run at start up checked)

-blank

Then

repeat while $s.siren > 0

wait 1 minute

$s.siren = - 1

init $s.siren to $s.siren

repeat 1 time

enable siren program

init $s.siren to $s.siren

 

 

Now if you had a program reset or a power failure, you would still re-enable the program.

That would work. We always have to watch which order we set variables to actually do things in so with power failure the importaant one doesn;t get done while the less important one doesn't.

 

In this case the Init $s.siren variable is the most important, not the program enabling.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...