Jump to content

OK to Enable / Disable Programs within programs?


kevkmartin

Recommended Posts

Posted

I have a program that counts the number of days elapsed since I last replaced the furnace filter:

 

----------

 

If

Time is 5:30:00PM

 

Then

$FF_Days_Since_Furnace_Filter_Reset += 1

$FF_Days_Since_Furnace_Filter_Reset Init To $FF_Days_Since_Furnace_Filter_Reset

 

Else

- No Actions - (To add one, press 'Action')

 

----------

 

There is also a program the notifies me by e-mail / text message that its time to change the filter:

 

----------

 

If

$FF_Days_Since_Furnace_Filter_Reset >= 40

 

Then

Send Notification to 'Kevin MMS Alert' content 'Furnace Filter Days'

Send Notification to 'Kevin E-Mails' content 'Furnace Filter Days'

Run Program 'FF - Announce Filter Due' (If) ***more on this later***

 

Else

- No Actions - (To add one, press 'Action')

 

----------

 

 

I also have (had) a line in the Then clause that would announce through the whole house voice system "Please remember to change the furnace filter today."

 

Recently, I upgraded my alarm system to an ELK... so the ISY now "knows" if we are home or not based on this program:

 

-----

 

If

Elk Area 'House' 'Armed State' is Armed Away

Or Elk Area 'House' 'Armed State' is Armed Vacation

 

Then

$HA_Is_Home = 0

$HA_Is_Home Init To 0

$HA_Is_Away = 1

$HA_Is_Away Init To 1

 

Else

$HA_Is_Home = 1

$HA_Is_Home Init To 1

$HA_Is_Away = 0

$HA_Is_Away Init To 0

 

-----

 

I wanted to change the behavior of the filter program to - rather than just announce the message - announce it immediately if we are home, BUT if we are away, hold the voice announcement until we arrive home.

 

So... I wrote this program, which is normally left DISABLED:

 

----------

 

If

$HA_Is_Home is 1

 

Then

Resource 'Audio_Attention'

Resource 'Audio_Furnace_Filter'

Disable Program 'FF - Announce Filter Due'

 

Else

Enable Program 'FF - Announce Filter Due'

 

----------

 

It becomes ENABLED if the days since filter change is >=40 AND we are not home (the ELSE clause executes when the If is forces by the notify program).

 

Then, when we arrive home (and the Is.Home variable updates), this program executes, makes the voice announcement, then the program DISABLES its self.

 

Is there any issue (performance, reliability, etc...) with using programs to enable / disable each other (or themselves)?

Posted

So, when you change the filter how do you reset your counter? Manually via the Admin Console or do you have some other way?

 

Thanks.

 

 

Brian

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.5k
×
×
  • Create New...