Jump to content

Programming override to motion or switch activation


Recommended Posts

Posted

Recently purchased a isy and a bunch of used Insteon and Zwave modules. I have a question regarding overriding timed events triggered by motion detectors.  I spent a great deal of time reading and trying to understand Control verse Status (still scratching my head).

Scenario, closet light triggered by a Insteon motion detector with a 1 minute timer. If you need to stay longer than 1 minute, paddle the switch ON to kill the timer. To restart the normal timed motion, paddle the switch OFF . This seems to be working for the most part with one exception, when you paddle off the switch, the motion detector can see you, it turns the light back on.

Not sure how to perfect this, a delay somewhere ?  I'm not a programmer, so my solution is probably not very eloquent. Please let me know if there is a better method to write this

------------------------------------------------- 

Motion turns On Switch

If        'Motion Detector' is switched On  (Control)
        And $Test1 is 0
 
Then    Set 'Test Switch' On
        Wait  1 minute
        Set 'Test Switch' Off
------------------------------------------------- 

Override - Stop the Timer

If      'Test Switch' is switched On  (Control)  >>> paddle the switch ON
 
Then    Stop program 'Motion turns on Switch'
------------------------------------------------- 

Set Variable  >>>> (to prevent motion restarting timer)

If      'Test Switch' is switched On   (Control)  
        And 'Test Switch' Status >= 1%  (Status) 
 
Then    $Test1  = 1
 
Else    $Test1  = 0    >>>> when switch is paddled off
-------------------------------------------------  

Posted

A few improvements, a variable isn’t really needed. 

------------------------------------------------- 

Motion turns On Switch

If        'Motion Detector' is switched On  (Control)
 
Then    Set 'Test Switch' On
        Wait  1 minute
        Set 'Test Switch' Off
------------------------------------------------- 

Override - Stop the Timer

If      'Test Switch' is switched On  (Control)

     And ‘Test Switch’ status is On
 
Then    Disable ‘Motion turns on Switch’
            Stop program 'Motion turns on Switch'

** if light is on and on toggle is pressed

** I’m not sure you need both disable and stop, but disable is definitely needed.  (Disable may or may not also stop, try it I can’t remember off the top of my head.)

point to consider:  the way you had the program, even tho you stopped the program, it would still retrigger next time there is motion.
------------------------------------------------- 

Set Variable  >>>> (to prevent motion restarting timer)

If      'Test Switch' is switched off  
        And 'Test Switch' Status is off. 
 
Then   Wait 10 seconds

            Enable program ‘Motion turns on switch’
 
** if light is turned off once, the motion will not be reenabled, and light will stay off.  
** If switch is turned off, then turned off again, then re-enable the motion.

** to always re-enable to motion just delete the “and” line in the if statement.

** the wait 10 seconds lets you get away without the motion turning the light on for 1 minute.
-------------------------------------------------  

Disable is under Programs on the menu.  Without Disabling the program addition motion will retrigger it.  Stop only interrupts the wait, and prevents the off statement from being run.

another consideration: I assume you’re using an Insteon motion (which I don’t have) batttery powered motions typically don’t retransmit often to save battery.   I’m not sure if the delay can be adjusted.  But keep that in mind when figuring out the delay the light stays on, it must be at least as long as the time period the motion waits to transmit again.

Posted

I'd do it like this:

 

If        'Motion Detector' is switched On  (Control)
        And $Test1 is 0
 
Then    Set 'Test Switch' On
        Wait  1 minute
        Set 'Test Switch' Off
------------------------------------------------- 

Override motion sensing

If      'Test Switch' is switched On  (Control)  >>> paddle the switch ON
Then    Stop program 'Motion turns on Switch'

            Set $Test1 = 1 
------------------------------------------------- 

Wait 15 seconds after turning off the switch before resetting the variable (to prevent motion restarting timer)

If      'Test Switch' is switched Off   (Control)  
Then Wait 15 seconds
          $Test1  = 0
 

The idea is that $Test1 is a flag that enables the motion sensor (when = 0) or disables it (when = 1). The override program sets it to 1 to disable the motion sensor from generating a switch On command. The last program looks for the switch getting turned off manually, and waits 15 seconds before re-enabling the motion sensor to turn the light on again.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...