Author |
|
skoondy Newbie
Joined: January 08 2007
Online Status: Offline Posts: 6
|
Posted: January 08 2007 at 19:51 | IP Logged
|
|
|
Hi, total newbie here.
I'm wondering if this is even possible, so hopefully someone can help me out in *beginner's* terms!
I would like to set up a night-time light system for my daughter, where if she turns on her bedroom light (Insteon SL) between 10pm and 5am, then her light will come on at 25%, the hallway light at 25% and the bathroom light at 50%. After 5 minutes they will all turn off.
When she turns her light on outside of those hours, only her own light comes on at 100%.
I think I understand the basics of using macros, formulas and timed events in PH. And I've grouped the switches mentioned above, with the USB PLC as the controller.
Any help is appreciated!
Chris
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 08 2007 at 20:28 | IP Logged
|
|
|
Welcome to PowerHome!
I believe what you need to do is first set the SwitchLinc On-Level to minimum brightness, then create a trigger that checks the time and does the appropriate thing.
The trigger (of type "Formula") would look something like this...
if( hour(now()) > 22 or hour(now()) < 5, ph_macro("DAUGHTER LIGHT"), bright 100%)
The macro ("DAUGHTER LIGHT") would send the group on, do a wait for 5 minutes, then send the group off.
Let me know if you need more specifics!
|
Back to Top |
|
|
skoondy Newbie
Joined: January 08 2007
Online Status: Offline Posts: 6
|
Posted: January 08 2007 at 23:11 | IP Logged
|
|
|
Thank-you so much for your quick reply!
Just rethinking this...it might be better to program this the opposite way if possible (ie: where ON at 100% is the norm, and the macro runs the dimmed group during a specified time period). What formula would you suggest for this?
Also, when writing the macro ("DAUGHTER LIGHT"), is it possible to specify the brightness levels for each individual switch?
Thanks again!
Chris
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 09 2007 at 07:29 | IP Logged
|
|
|
Since it is likely that the SwitchLinc controls a local load (the light), you'll need to set the On-Level to that low value. The switch turns the light on, then sends the signal that it was turned on. If you do what you say, the light will come on at 100%, then dim to 25% during the selected time.
You can set the individual dim levels in the group (links).
|
Back to Top |
|
|
skoondy Newbie
Joined: January 08 2007
Online Status: Offline Posts: 6
|
Posted: January 09 2007 at 09:04 | IP Logged
|
|
|
You are correct, the SL controls the local load...thank-you so much for your help. I will try what you've suggested!
|
Back to Top |
|
|
skoondy Newbie
Joined: January 08 2007
Online Status: Offline Posts: 6
|
Posted: January 09 2007 at 16:35 | IP Logged
|
|
|
Hi,
I created the macro ("SYD NIGHT LIGHTS") as you suggested, using a 300 second wait between the on and off commands. I then created a trigger pasting the code you sent me into the Action column (changing the macro reference)...and PH is not accepting this (ie: giving me an error).
When I run the formula checker, it gives me a response of ".!"
I also used:
ID = SYD1
Description = SYD NIGHT LIGHTS
Action Type = Raw Formula
Action Style = Queued
Status = Active
Trigger Type = Insteon Device Chg
Trigger ID = ID# of the SL in my daughter's room
Am I doing something wrong here?
Thanks!
Chris
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 09 2007 at 16:57 | IP Logged
|
|
|
Heh. You need to code the proper version of "bright 100%" (using ph_insteon()).
I'll look at this tonight for you.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 09 2007 at 19:49 | IP Logged
|
|
|
Here is the proper version...
if( hour(now()) > 22 or hour(now()) < 5, ph_macro("SYD NIGHT LIGHTS"), ph_insteon( "DEVICE ID", ion, 255 ) )
|
Back to Top |
|
|
skoondy Newbie
Joined: January 08 2007
Online Status: Offline Posts: 6
|
Posted: January 10 2007 at 13:07 | IP Logged
|
|
|
Hi,
Still having issues here! (Told you I am very new at this !)
I created a trigger using the following variables:
ID = SYDLIGHT
Description = SYD NIGHT LIGHTS
Action Type = Raw Formula
Action = if (hour (now()) > 22 or hour(now()) < 5, ph_macro("SYD NIGHT LIGHTS"), ph_insteon( "15", ion, 255) )
Action Style = Immediate
Status = Active
Trigger Type = Insteon Device Chg
Trigger ID = 15
Trigger ID Number = 1
Trigger Value = On
Boolean = 1 (the default value)
When I verify the formula outside of 10pm and 5am it gives me a result of "0" and turns on the light at 100%. However, when I save & reinitialize PH and manually turn the SL on in her room, it only brightens to the preset level - not to 100% as the formula would suggest.
For some reason the trigger is not being recognized??
Thanks again!
Chris
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 10 2007 at 13:26 | IP Logged
|
|
|
Is the switch press shown in the log?
Try these too...
1. The action style should be Queued.
2. Try adding a second Trigger Type of Insteon Group In, Trigger ID of the SL, Trigger ID Number of "(Any)", and a Trigger Value of On.
3. Try adding a small delay before calling the macro...
ph_delay(500)+ph_macro("SYD NIGHT LIGHTS")
Number 3 is for the heck of it. It seems to fix missing-trigger issues that I have seen before.
|
Back to Top |
|
|
skoondy Newbie
Joined: January 08 2007
Online Status: Offline Posts: 6
|
Posted: January 11 2007 at 15:46 | IP Logged
|
|
|
Hi,
No the SL press is not showing up in the log.
Chris
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: January 11 2007 at 20:34 | IP Logged
|
|
|
Maybe you did not link the SL to the PLC?
If so, I would guess that you are having communications problems.
If not, the SL needs to be linked so that it can see the switch being operated.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: January 17 2007 at 22:22 | IP Logged
|
|
|
Skoondy,
Just wondering if you ever got this worked out or not.
Thanks,
Dave.
|
Back to Top |
|
|