Difference between revisions of "Power Failure"

From Universal Devices, Inc. Wiki
Jump to: navigation, 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...")
 
m
 
(4 intermediate revisions by the same user not shown)
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."'''''
  
We can fix this.   
+
Consider experiencing a power failure in the evening when things are onAnd then the power being restored while you're sleeping or the next day after you've left the house.  Everything could be on, wasting all that power you've been saving!
  
  
When it's hot, I like to go to sleep with the whole house fan onBut there are nights I want it to stay on for a long time, and others when I want it on for just a bit.  In 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.
+
We can fix thisWe'll just create a program that runs when power is restored to the ISY.
  
'''My need is to control a whole-house fan.'''
 
  
Here’s what a user can do;
+
'''Caveat;'''
# Turn a responder on, off or dim as usual using any KeyPadLinc or SwitchLinc button.
+
* Devices will return to the last brightness level when power is restored until the ISY can take over. The ISY can take some time to fully reboot.  Mine takes about 1:45 to get started.
# Put the responder in timer mode by double-tapping the button.
+
# Increase the remaining time by double-tapping multiple times.
+
  
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.
 
  
In my example, I’m watching two switches, one upstairs and one downstairsWhether the fan is currently on or off, a double tap (from either location) turns it on and starts the timer decrementingWhen the decrementing code times out, the fan is turned off.   
+
'''Steps;'''
 +
# Add a program, POWER IS ON, which will launch another programIt must be done this way to prevent the second program from running daily.
 +
# Add a program, POWER RECOVERY, which will set things as you want themIn my example, if it's daytime, turn everything off.  If it's night, turn on a single lamp.
 +
# In Programs, Summary, for POWER IS ON, set "Run at Startup" to ON.
  
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.
+
'''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." 
 +
* Change as many things as you'd like to have configured when power is restored!
  
A single variable, “Fan_Minutes” describes the remaining time on the counter.
+
 
+
 
Three program entry points are simple to follow;
+
 
 +
'''POWER IS ON;'''
 +
If    ;When the ISY restarts
 +
    - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
   
 
   
'''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
 
  Then
    Set Scene 'House Fan' On
 
    $Fan_Minutes += 30
 
    Run Program 'Fan Decrement' (If)
 
Else
 
    - No Actions - (To add one, press 'Action')
 
 
   
 
   
'''Fan Decrement;'''
+
    Send Notification to "Myself" content "Power Restored"
If
+
    Enable Program 'POWER RECOVERY'
    $Fan_Minutes > 0
+
    Run Program 'POWER RECOVERY' (If)
  Then
+
    $Fan_Minutes -= 1
+
    Wait  1 minute
+
    Run Program 'Fan Decrement' (If)
+
Else
+
    Set Scene 'House Fan' Off
+
 
   
 
   
'''Fan Stop Now;'''
 
If
 
        Control  'Upstairs / HouseFan'  is switched Off
 
    Or Control  'Downstairs / HouseFan' is switched Off
 
  Then
 
    $Fan_Minutes = 0
 
    Set Scene 'House Fan' Off
 
    Stop program 'Fan Decrement'
 
 
  Else
 
  Else
    - No Actions - (To add one, press 'Action')
+
 +
    - 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.
 
Please let me know if you find any anomalies or can improve functionality.
Line 63: Line 65:
 
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]]

Latest revision as of 15:07, 2 July 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 in the evening when things are on. And then the power being restored while you're sleeping or the next day after you've left the house. Everything could be on, wasting all that power you've been saving!


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


Caveat;

  • Devices will return to the last brightness level when power is restored until the ISY can take over. The ISY can take some time to fully reboot. Mine takes about 1:45 to get started.


Steps;

  1. Add a program, POWER IS ON, which will launch another program. It must be done this way to prevent the second program from running daily.
  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 IS ON, set "Run at Startup" to ON.

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."
  • Change as many things as you'd like to have configured when power is restored!



POWER IS ON;

If    ;When the ISY restarts
   - 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