Please login or register.

Login with username, password and session length

Author Topic: Found way to make conditions work  (Read 5485 times)

Curt

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 1
Found way to make conditions work
« on: October 14, 2007, 03:16:02 PM »

I finally found out how to get my conditions to work. All I wanted to do was turn on the light before recording video at night, but not turn on the light in daytime. It turns out the day/night or time conditions will only work if the macro can be stored in the interface. To do both vodeo (run only from PC) and conditionally turn on a light, I set a subroutine to run a different macro that only turns on or off the light. This is how mine works:

Macro a1-on that is triggered by a motion sensor:
Appliance Control b1 on
Select camera front
Video Recording start
Delay 10 seconds
Video Recording stop
Appliance Control b1 off
Camera front off

Macro b1-on for turning light on:
if nighttime
light b2-on

Macro b1-off for turning light off:
light b2 off

Logged

Puck

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 171
  • Posts: 1799
Re: Found way to make conditions work
« Reply #1 on: October 14, 2007, 06:26:48 PM »

Curt: Welcome to the forum. I'm surprised you cannot get an else macro to work with time conditions. Nonetheless, a good work-around.

Just be aware that Macro B1 will try and of execute the same time as the remainder Macro A1. You could occasionally get a signal collision where one or both the light & camera don't get activated.
Logged

steven r

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 74
  • Posts: 2189
  • Halloween with X10
Re: Found way to make conditions work
« Reply #2 on: October 14, 2007, 10:00:02 PM »

...Just be aware that Macro B1 will try and of execute the same time as the remainder Macro A1. You could occasionally get a signal collision where one or both the light & camera don't get activated....
Would a signal collision be less likely if he moved the command "Appliance Control b1 on" to just before the delay?
Logged
BVC let's me tell my camera where to go!
:) Murphy is my beta testing pal. He helps me find problems whether I like it or not. :)

Puck

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 171
  • Posts: 1799
Re: Found way to make conditions work
« Reply #3 on: October 14, 2007, 10:15:17 PM »

...Just be aware that Macro B1 will try and of execute the same time as the remainder Macro A1. You could occasionally get a signal collision where one or both the light & camera don't get activated....
Would a signal collision be less likely if he moved the command "Appliance Control b1 on" to just before the delay?

That would be a safer place for it.
Logged

spam4us

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 152
Re: Found way to make conditions work
« Reply #4 on: October 14, 2007, 11:46:41 PM »

How about turning on the light first, then triggering the recording macro that turns light b2-off at the end regardless if it's on or not. This way the light gets turned on before the recording starts with less chance of a collision.

Macro a1-on that is triggered by a motion sensor:
if nighttime
  light b2-on
  delay 1 sec
  Appliance Control b1 on
else
If daytime
  Appliance Control b1 on

Macro b1-on for turning light on:
  Select camera front
  Video Recording start
  Delay 10 seconds
  Video Recording stop
  Camera front off
  light b2 off

you could also set up a dummy switch on the monitored house code that gets turned on at night & turned off during the day. Call it switch M1.  Your macro would then look like this.l

Macro a1-on that is triggered by a motion sensor:
if M1 On
  light b2-on
  delay 1 sec
  Appliance Control b1 on
else
If M1 Off
  Appliance Control b1 on
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.