Please login or register.

Login with username, password and session length
Pages: [1] 2

Author Topic: Creating a Macro to set a Lamp Module to a specific Brightness  (Read 47763 times)

Chris S.

  • Full Member
  • ***
  • Helpful Post Rating: 9
  • Posts: 74
Creating a Macro to set a Lamp Module to a specific Brightness
« on: February 25, 2006, 05:06:43 PM »

I wanted to create a Macro to turn on a light in our bedroom if someone gets up in
the middle of the night to go to the bathroom.

The problem was, that the way the Lamp modules work (I have the LM465)
is that the Lamp Module would turn on to full brightness (if motion was sensed)
and then down to the dim level. (50%).

You can only dim the module if it is currently on.
There may be other ways of doing this (would like to hear other methods),
but what I did was turn on the Lamp, and set it to 2% (that was the lowest setting, couldn't tweak to 1%)
now the lamp module is on.

Motion Sensor in bedroom - A2
The Macro is triggered by motion in the room and another macro is triggered after 1 minute
(A2 OFF set on the Active Eye

Macro 1 "Bedroom Night Light ON"

Trigger Condition A2 ON and
It's After Dusk or
It's Before Dawn
End Trigger Conditions
Brighten Bedroom Light by 50%



Macro 2 "Bedroom Night Light OFF"

Trigger Condition A2 OFF and
It's After Dusk or
It's Before Dawn
End Trigger Conditions
Dim Bedroom Light by 50%


This leaves the Night Light on all the time, but looking
at the filaments, the Light is really not on at all, and
according to AHP, the module now read 0% after
running the macros a couple of times to test.

I'd be curious to see how other people are doing this.

Chris
Logged

Chris S.

  • Full Member
  • ***
  • Helpful Post Rating: 9
  • Posts: 74
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #1 on: February 25, 2006, 07:55:55 PM »

Well after playing with this macro a bit, it did not work out as
intended.

If the motion sensor is tripped within the 1 minute time frame
after the light has been brightened to 50%, another trigger
will increase the brightness another 50%.

Back to the drawing board.

Also, it appears that when using a condition if a module is on
can only be used for those modules on the HC being monitored.

Logged

Mystyx

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 201
  • eye see you
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #2 on: February 25, 2006, 11:48:35 PM »

I think you would need to add a flag to this to wait for 1 min and clear the flag to make sure it doesn't repeat the command before it turns off.
I'm still playing around and haven't tried much with flags as of yet, but others have used the flag functions to do similar things you are trying. I would go more into details if I had them.  :-\
Logged
Anything is Possible, NOW!! But What can I afford?!
I Can't Afford Time, cause Money is so Important!!

Chris S.

  • Full Member
  • ***
  • Helpful Post Rating: 9
  • Posts: 74
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #3 on: February 26, 2006, 01:52:54 AM »

Mystyx:

The flags were the trick.
I think I've got it working now.
Here's the 2 Macros.

The ON Macro checks if Flag 1 is currently OFF and
if TRUE then turns the light on and dims to 50%.

The OFF Macro turns of the light, and resets Flag 1  to OFF.

If the light is has been set on by the On Macro,
and if the sensor picks up activity again prior to the OFF Macro
the Flag 1 is still set to ON, so the ON Macro will not execute the remainder
of the steps.


Bedroom Night Light ON



Bedroom Night Light OFF

Logged

Mystyx

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 201
  • eye see you
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #4 on: February 26, 2006, 02:02:24 AM »

Nice, Ill need to try my more complex macros with flags, see what I can come up with for disabling sound (door bell) and disabling a cam.... ive been waiting to make sure I have a complete stable system before trying to setup multiple macros set off within macros using flags ect.
one thing with what im trying to do too uses both interface and PC run macros, so I best get it right :P
Logged
Anything is Possible, NOW!! But What can I afford?!
I Can't Afford Time, cause Money is so Important!!

emil

  • Sr. Member
  • ****
  • Helpful Post Rating: 2
  • Posts: 100
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #5 on: February 27, 2006, 08:20:37 AM »

You can lock out multiple hits by looking at the light module as a condition also.
Just replace the flag condition with if the light module is on. It's just a bit cleaner, I use it all the time to prevent multiple light on/chime hits.
Logged
ActiveHomePro 3.310
SmartMacros 3.310

Chris S.

  • Full Member
  • ***
  • Helpful Post Rating: 9
  • Posts: 74
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #6 on: February 27, 2006, 10:58:38 AM »

Good idea, but my problem is that the only HC I can create a condition to check if the
module is on, is HC B.

The module in question is on HC A

My CM15A is set to monitor HC B.

Logged

emil

  • Sr. Member
  • ****
  • Helpful Post Rating: 2
  • Posts: 100
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #7 on: February 27, 2006, 01:06:49 PM »

Ah,

I'm assuming you need to monitor B for something, otherwise change it to A.
Logged
ActiveHomePro 3.310
SmartMacros 3.310

Chris S.

  • Full Member
  • ***
  • Helpful Post Rating: 9
  • Posts: 74
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #8 on: February 27, 2006, 08:55:57 PM »

Yeah,
The majority of my H codes are on B.

I wonder if X10 has any plans on upgrading the interface to monotor all H codes.
Would be nice.
Logged

emil

  • Sr. Member
  • ****
  • Helpful Post Rating: 2
  • Posts: 100
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #9 on: February 28, 2006, 08:22:55 AM »

I'm wondering if it would check A even if it is not on the monitored channel?
When I get a chance I'll try a little test routine to see if this is the case.

As I asked for before, sure would be nice to have more detailed documentation on how these macros and the interface works.
Logged
ActiveHomePro 3.310
SmartMacros 3.310

Mystyx

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 201
  • eye see you
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #10 on: March 05, 2006, 01:06:16 AM »

Man, Emil...  that would mean figuring out a whole new setup, get certain modules on one HC as im using 5 HC atm :)

but yes, thats one reason I havent played with monitoring and flags yet, but waiting to get some bugs in AHP worked out first :)
Logged
Anything is Possible, NOW!! But What can I afford?!
I Can't Afford Time, cause Money is so Important!!

Dan Lawrence

  • Hero Member
  • *****
  • Helpful Post Rating: 68
  • Posts: 3991
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #11 on: March 05, 2006, 10:23:18 AM »

You can specify any trigger houscode in a macro, either in AHP or Smart Macros. If you need to set up a keypress macro, set the adress (i.e. B1) when the macro is constructed or edited. Macros are not bound to any specfic trigger code.
Logged
I don't SELL this stuff... BUT I sure do ENJOY using it!!!

stolzb

  • Jr. Member
  • **
  • Helpful Post Rating: 1
  • Posts: 13
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #12 on: March 27, 2006, 12:18:43 PM »

I know this is a late reply, but I've got the same setup (brightening and dimming a bathroom light) and I've got it where it will soft start and dim out after two minutes.  I got this from another post, can't remember where but it works.  I am replying to this post from a computer that doesn't have AHP on it so I can't provide screen shots.  Here is the setup.

D1 = Bathroom Sensor
D3 = Light Switch

Macro Name:  Master Bath On

Trigger: D1 on, Between 10:00pm and 12:00am, Flag 2 off.  End Trigger
Set Flag 2
Brighten D3 to 40%

End Macro

New Macro: Master Bath OFF

Trigger: D1 Off, Flag 2 on,(No time conditions).  End Trigger
Delay 1 Min
Dim D3 99%
Clear Flag 2

End Macro

I set up another Macro between 12:01am and 5:30am.  I was having trouble with the macro if it crossed midnight. Don't know why. 

The first time you trip the macro, the light will go full bright until it Dims 99% and from that point on, it will brighten to 40%.  When dimming the light by 99%, I can stand in the totally dark room and see no light from the fixtures, so in essence, it is off.  This "tricks" the switch into thinking it is on 1% so it can brighten to 40% without having to turn full on then dim to 40%.  Gives that soft start.

I was having trouble with the delay of the motion sensor interfering with the delay I set up in the macro so I set the macro to use the delay of the motion sensor of one minute. When it sends its off command, the macro will delay one more minute and then dim.

Hope this is what you were looking for.  I works in all three of my bathrooms.

 
Logged

dave w

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 139
  • Posts: 6116
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #13 on: March 28, 2006, 11:19:10 AM »

stolzb

What is the flag doing?
Logged
"This aftershave makes me look fat"

stolzb

  • Jr. Member
  • **
  • Helpful Post Rating: 1
  • Posts: 13
Re: Creating a Macro to set a Lamp Module to a specific Brightness
« Reply #14 on: March 29, 2006, 02:40:36 PM »

Dave,  I was having trouble with the light resetting everytime I trip the motion sensor while I was in the room.  Setting flags while it was scheduled and clearing them stopped it from happening.  When I trip the motion sensor, it will check to see if the flag is checked, if no, it would brighten the light.  If yes, it wouldn't do anything.
Logged
Pages: [1] 2
 

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