Set default brightness based on time

Posted on
Mon Dec 10, 2012 11:24 pm
cutmoney offline
Posts: 35
Joined: Dec 22, 2011

Set default brightness based on time

I'm sure this is a simple answer. I was wondering if it is possible to set the default on brightness of a SwitchLinc based on time of day (or sunset/sunrise). Basically, I would like my bathroom switch to turn my lights on at a lower level at night than it would during the day. I would like to use it as a conventional switch in that you just turn it on at the switch, but that the default on brightness would be controlled by Indigo. Thanks!

Posted on
Tue Dec 11, 2012 1:19 am
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Set default brightness based on time

I have a couple lights do that by a trigger that fires when the Insteon command for
the switch is received which checks a variable as a condition. I just have the variable
set to what time of day it is, morning, evening etc. and the action to set whatever
brightness you like.

Carl

Posted on
Tue Dec 11, 2012 1:22 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Set default brightness based on time

Yes, this is possible, but it isn't an obvious answer. In order to do this, you have to send a raw INSTEON command to the SwitchLinc to configure it for the new default on-level. Here's how I'd do it for sunset and sunrise.

For sunset, create a new trigger with the following settings:
  1. Name: (anything you like). Notes: (also anything you like).
  2. Trigger tab: Type: "Variable Changed", Variable: "isDaylight", "becomes false (false, off, no, 0)" selected.
  3. Condition tab: "Always" selected.
  4. Actions tab: (for Indigo 6) Type: "INSTEON Actions" -> "Send Raw INSTEON Command". (for Indigo 5) Type: "Plugin", Plugin: "INSTEON Commands", Action: "Send Raw INSTEON Command".
  5. Click "Edit Action Settings..." button. The configuration dialog should have the following settings:
    • Device: (your SwitchLinc Dimmer).
    • Command 1 Byte: 0x2E
    • Command 2 Byte: 0x00
    • "Send extended message" checked.
    • D1 Byte: 0x01
    • D2 Byte: 0x06
    • D3 Byte: (any number you want from 0 to 255, without 0x in front)
    • D4 Byte through D14 Byte: 0x00
  6. Click Save
  7. Click OK

The number entered for the D3 Byte above can have a range of 0 to 255 where 0 is a brightness of 0% (off) and 255 is a brightness of 100%. So, if you wanted a brightness of 50%, you'd enter 127 for D3.

To create a sunrise trigger to change the default level, just use the above procedure but change the Variable's condition to "becomes true (true, on, yes, 1)" and change the D3 Byte to the level you want for daytime.

Note that setting the SwitchLinc Dimmer's default on-level directly doesn't update Indigo's internally stored information about the SwitchLinc, so when you press the on button on the SwitchLinc, Indigo will think the light is on at whatever default level you set in Indigo, even though the actual light level will be the default level you reconfigured the SwitchLinc to with the above raw command.
Last edited by nsheldon on Tue Dec 11, 2012 10:43 am, edited 1 time in total.

Posted on
Tue Dec 11, 2012 9:48 am
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Set default brightness based on time

Have to try that one myself. My version of Action Collection doesn't have a Send Raw Insteon
Command option. Newer one somewhere?....still on V5.

Thanks,

Carl

Posted on
Tue Dec 11, 2012 10:42 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Set default brightness based on time

ckeyes888 wrote:
Have to try that one myself. My version of Action Collection doesn't have a Send Raw Insteon
Command option. Newer one somewhere?....still on V5.

Sorry, that's my mistake. The v5 plugin should be "INSTEON Commands", not "Action Collection". Hope that works for you.

Posted on
Tue Dec 11, 2012 2:09 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Set default brightness based on time

Hmm, odd, can't get it to work. The SwitchLinc is the i2 version.
No big deal, just experimenting.

Should the switch blink/beep when I send the command?

Thanks,

Carl

Posted on
Tue Dec 11, 2012 2:25 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Set default brightness based on time

ckeyes888 wrote:
Should the switch blink/beep when I send the command?

Nope. The switch will do nothing. The only way to confirm that it worked (other than looking at the Indigo log to see if there were errors) is to try it by taping the ON paddle. It worked on my i2 SwitchLink Dimmer.

Posted on
Tue Dec 11, 2012 2:40 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Set default brightness based on time

This is what shows in the event log;


Test Insteon Raw Brightness Change
  Sent INSTEON                    "Stairway Light" raw insteon command (2E 00   01 06 5A 00 00 00 00 00 00 00 00 00 00 00; ack: 00)


Thanks,

Carl

Posted on
Tue Dec 11, 2012 3:16 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Set default brightness based on time

The "ack: 00" means that the switch acknowledged the command successfully. That should have set the default on-level to about 35%. To test it, with the switch off, tap the ON portion of the paddle. The light should come on to 35% (though Indigo will still think it's on at whatever the previous default level was).

Posted on
Tue Dec 11, 2012 3:30 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Set default brightness based on time

It does come on to about 35% but I'd set it to 100% in the D3 byte field.

I tried a number of different brightness levels but it always comes on when
switched at the paddle to about 35%.

Seems regardless of what brightness I set the D3 byte to it always shows all
0's in the log.

Thanks,

Carl

Posted on
Tue Dec 11, 2012 3:40 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Set default brightness based on time

Ah. Look back at my original post. Note the part that says

"The number entered for the D3 Byte above can have a range of 0 to 255 where 0 is a brightness of 0% (off) and 255 is a brightness of 100%. So, if you wanted a brightness of 50%, you'd enter 127 for D3."

D3 is not a percentage, it's a decimal representation of an 8-bit byte (which has a maximum value of 255). If you want the switch to come on to 100% when you tap the up paddle, enter 255 for D3. Entering 100 (when the maximum is 255), that's about equivalent to 40% brightness.

Posted on
Tue Dec 11, 2012 3:45 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Set default brightness based on time

Doh...yet again. Thanks a bunch Nathan...all better.
Might help if I could read. I'm the type that reads the manual
long after I've experimented with stuff.

Thanks for yet another great plugin. I like this solution much better than mine.

Carl

Posted on
Tue Dec 11, 2012 3:50 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Set default brightness based on time

Great! Glad all is working Carl. :-)

Posted on
Mon Jun 03, 2013 11:38 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: Set default brightness based on time

this works nicely

I use it to set the on level to 50% when tapping once, then to go brighter tap and hold. works much nicer than hold for 3 seconds and slowly start to increase brightness.

could I get a list of insteon commands (or where are they listed), ie do the same for off ==> go to 50% light



thanks

Karl

Posted on
Tue Jun 04, 2013 12:38 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Set default brightness based on time

kw123 wrote:
could I get a list of insteon commands (or where are they listed), ie do the same for off ==> go to 50% light


SmartLabs put a PDF on their www.insteon.com web site which lists all of the INSTEON commands. Just search Google for "insteon commands". It'll be the first link returned in the search results.

As for off-to-50%, unfortunately that's not possible. While the SwitchLinc, LampLinc, and InLineLinc Dimmers have a settable on-level, they don't have a settable off-level. Off is, well, off. :-) So hitting the down paddle will always turn the light off. However, I suppose you could hit the up paddle, which should set the light brightness to 50% even if it's already at something brighter than 50%, then press and hold the down paddle to dim it to your desired brightness.

Who is online

Users browsing this forum: No registered users and 2 guests