Power Failure: Difference between revisions

From Universal Devices, Inc. Wiki
Jump to navigation Jump to search
(Created page with "In real-life power fails, the power is never restored cleanly. It sometimes comes on and off several times. Smarthome programming is such that ''"in the event of a power los...")
 
No edit summary
Line 1: Line 1:
In real-life power fails, the power is never restored cleanly.  It sometimes comes on and off several times.
In real-life power fails, the power is never restored cleanly.  It sometimes comes on and off several times.


Smarthome programming is such that ''"in the event of a power loss, the SwitchLinc Dimmer will return to its last brightness level when power is restored."''  Consider experiencing a power failure at night when things are on, then the power being restored the next day after you've left the house.  Everything could be on, wasting all that power you've saved!
Smarthome design is such that ''"in the event of a power loss, the SwitchLinc Dimmer will return to its last brightness level when power is restored."''  Consider experiencing a power failure at night when things are on, then the power being restored the next day after you've left the house.  Everything could be on, wasting all that power you've saved!


We can fix this.   
We can fix this.  We'll need to ensure that a program runs when power is restored to the ISY.




When it's hot, I like to go to sleep with the whole house fan on.  But there are nights I want it to stay on for a long time, and others when I want it on for just a bitIn my search for an easy solution, I found an article from four years ago (thanks to rob9 for that). I've rewritten using some of ISY's improvements, i.e. variables.
'''Caveats;'''
* Devices will return to the last brightness level when power is restored until the ISY can take overThe ISY can take several minutes to fully reboot.
* Every time you start the ISY, it will run the power restore code.


'''My need is to control a whole-house fan.'''


Here’s what a user can do;
'''Steps;'''
# Turn a responder on, off or dim as usual using any KeyPadLinc or SwitchLinc button.
# Add a program, POWER FAILED, which will launch another program. It must be done this way to prevent the second program from running all the time.
# Put the responder in timer mode by double-tapping the button.
# Add a program, POWER RECOVERY, which will set things as you want them.  In my example, if it's daytime, turn everything off.  If it's night, turn on a single lamp.
# Increase the remaining time by double-tapping multiple times.
# In Programs, Summary, for POWER FAILED, turn ON "Run at Startup"


You will see below that the minutes remaining has been hard coded as 30 (in [Fan Increment], Then section)However this could be replaced with a variable so it could be altered via the web interface.
'''Notes;'''
* Change the time of day to your liking.
* Change the SMS notification as you choose. Mine is Subject: "Power Restored ${sys.time12}" and Body: "There was a power failureISY is now running again.


In my example, I’m watching two switches, one upstairs and one downstairs.  Whether the fan is currently on or off, a double tap (from either location) turns it on and starts the timer decrementing.  When the decrementing code times out, the fan is turned off. 


Note that to detect button presses, individual devices must be checked.  But for proper display status (if you have multiple controls linked), a scene must be used to ensure that all responders display the correct status.


A single variable, “Fan_Minutes” describes the remaining time on the counter.
 
'''POWER FAILED;'''
If
    - No Conditions - (To add one, press 'Schedule' or 'Condition')
Then
   
   
Three program entry points are simple to follow;
    Send Notification to "Myself" content "Power Restored"
    Enable Program 'POWER RECOVERY'
    Run Program 'POWER RECOVERY' (If)
   
   
'''Fan Increment;'''
If
        Control 'Upstairs  / HouseFan' is switched Fast On
    Or  Control 'Upstairs  / HouseFan' is switched Fast Off
    Or  Control 'Downstairs / HouseFan' is switched Fast On
    Or  Control 'Downstairs / HouseFan' is switched Fast Off
Then
    Set Scene 'House Fan' On
    $Fan_Minutes += 30
    Run Program 'Fan Decrement' (If)
  Else
  Else
    - No Actions - (To add one, press 'Action')
   
   
'''Fan Decrement;'''
    - No Actions - (To add one, press 'Action')
  If
 
     $Fan_Minutes > 0
 
  Then
 
     $Fan_Minutes -= 1
'''POWER RECOVERY;'''
    Wait   1 minute
  If      ;If there is some light
    Run Program 'Fan Decrement' (If)
  Else
    From     Sunrise -   1 hour
    Set Scene 'House Fan' Off
    To        Sunset  +   1 hour  (same day)!
Then    ;Turn everything off then disable this program
   
    Set Scene 'My_Home_ISY' Off
    Disable Program 'POWER RECOVERY'
Else    ;Turn everything off, turn on a soft light then disable this program
   
   
'''Fan Stop Now;'''
    Set Scene 'My_Home_ISY' Off
If
    Set Scene 'Downstairs / Soft_Light' On
        Control  'Upstairs / HouseFan'  is switched Off
    Disable Program 'POWER RECOVERY'
    Or Control  'Downstairs / HouseFan' is switched Off
 
  Then
 
    $Fan_Minutes = 0
    Set Scene 'House Fan' Off
    Stop program 'Fan Decrement'
Else
    - No Actions - (To add one, press 'Action')
   
   
Please let me know if you find any anomalies or can improve functionality.
Please let me know if you find any anomalies or can improve functionality.
Line 63: Line 62:
Cheers,
Cheers,
--[[User:BitSmith|BitSmith]] ([[User talk:BitSmith|talk]])
--[[User:BitSmith|BitSmith]] ([[User talk:BitSmith|talk]])
----
Original Article: http://wiki.universal-devices.com/index.php?title=ISY-99i/ISY-26_INSTEON:Programs_as_Variables:_SwitchLinc_Emulates_Countdown_Timer


----
----
[[ISY-99i Series INSTEON|ISY-99i Series INSTEON]] ''':'''
[[ISY-99i Series INSTEON|ISY-99i Series INSTEON]] ''':'''
[[ISY-99i/ISY-26 INSTEON:How-To Guide|How-To Guide]]
[[ISY-99i/ISY-26 INSTEON:How-To Guide|How-To Guide]]

Revision as of 02:05, 29 June 2013

In real-life power fails, the power is never restored cleanly. It sometimes comes on and off several times.

Smarthome design is such that "in the event of a power loss, the SwitchLinc Dimmer will return to its last brightness level when power is restored." Consider experiencing a power failure at night when things are on, then the power being restored the next day after you've left the house. Everything could be on, wasting all that power you've saved!

We can fix this. We'll need to ensure that a program runs when power is restored to the ISY.


Caveats;

  • Devices will return to the last brightness level when power is restored until the ISY can take over. The ISY can take several minutes to fully reboot.
  • Every time you start the ISY, it will run the power restore code.


Steps;

  1. Add a program, POWER FAILED, which will launch another program. It must be done this way to prevent the second program from running all the time.
  2. Add a program, POWER RECOVERY, which will set things as you want them. In my example, if it's daytime, turn everything off. If it's night, turn on a single lamp.
  3. In Programs, Summary, for POWER FAILED, turn ON "Run at Startup"

Notes;

  • Change the time of day to your liking.
  • Change the SMS notification as you choose. Mine is Subject: "Power Restored ${sys.time12}" and Body: "There was a power failure. ISY is now running again."



POWER FAILED;

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then

   Send Notification to "Myself" content "Power Restored"
   Enable Program 'POWER RECOVERY'
   Run Program 'POWER RECOVERY' (If)

Else

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


POWER RECOVERY;

If      ;If there is some light

   From      Sunrise -   1 hour
   To        Sunset  +   1 hour   (same day)!

Then    ;Turn everything off then disable this program

   Set Scene 'My_Home_ISY' Off
   Disable Program 'POWER RECOVERY'

Else    ;Turn everything off, turn on a soft light then disable this program

   Set Scene 'My_Home_ISY' Off
   Set Scene 'Downstairs / Soft_Light' On
   Disable Program 'POWER RECOVERY'


Please let me know if you find any anomalies or can improve functionality.

Cheers, --BitSmith (talk)


ISY-99i Series INSTEON : How-To Guide