Jump to content

setting on level with scene based on time of day


jsmith6

Recommended Posts

Posted

I would appreciate some advice on my small project. 

 

At night (from 10 pm to 5 am), I want to set the on-level of the three lights in the bathroom to 35%. Currently, I have all three lights controlled by a scene in which when I turn one switch on, all three lights come on. So, switch #1 is the controller of the scene.

 

I wrote a program that, based upon the time of day, adjusts the scene by setting the on-level of each light in the scene. I was hoping that when I would turn on switch #1, it would catch these lower on-levels. Instead, it does not apply the on-levels that had been programmatically applied to the scene, but it applies the on-levels stored in switch #1 for the three lights in the scene.

 

If I turn the scene on using the ISY admin interface, the correct on-level is applied, likewise if I activate the scene using a program.

 

I tried removing switch #1 from the scene, and doing everything programmatically, but that is less than desirable as programmatically turning lights on results in sometimes awkward delays in the turning on of some of the lights, whereas controlling all three lights with a scene is almost instant.

 

Would anyone please have some advice?

 

Best,

 

James

Posted (edited)

Can you post your program?  This is mine for my bathroom...  'SC - Master Bathroom Light' is the scene - and 'Master Bath Light' is the controlling switch itself. 

 

I have a single switch - but I had to do two 'In Scene..... Set' commands.  One for the scene - and one for the device.  I suspect you only have this set on the scene and not the device(s).

 

Michael.

Dim at night - [ID 0055][Parent 0054]

If
        From    10:00:00PM
        To       6:30:00AM (next day)
 
Then
        In Scene 'Upstairs / SC - Master Bathroom Light' Set 'Upstairs / Master Bathroom / Master Bath Light' 49% (On Level)
        In Scene 'Upstairs / Master Bathroom / Master Bath Light' Set 'Upstairs / Master Bathroom / Master Bath Light' 49% (On Level)
 
Else
        In Scene 'Upstairs / SC - Master Bathroom Light' Set 'Upstairs / Master Bathroom / Master Bath Light' 100% (On Level)
        In Scene 'Upstairs / Master Bathroom / Master Bath Light' Set 'Upstairs / Master Bathroom / Master Bath Light' 100% (On Level)
 

Edited by MWareman
Posted
Thank you for replying. I think you are on to something, but I don't quite get it. I set the devices in the scene. How can I set the devices apart from the scene or set the scene itself.
 
Here's my code: 
 
dimming GBR lights at night - [ID 00BD][Parent 00BC]


If
        From     1:00:00PM
        To       3:00:00PM (next day)


Then
        In Scene 'Rooms / 6. GBR, Guest Bed Room / Scenes / GBR-bath lights' Set 'Rooms / 6. GBR, Guest Bed Room / Devices / GBR-Bath-T1-A-Light-Load' 35% (On Level)
        In Scene 'Rooms / 6. GBR, Guest Bed Room / Scenes / GBR-bath lights' Set 'Rooms / 6. GBR, Guest Bed Room / Devices / GBR-Bath-T1-C-Light-Load' 35% (On Level)
        In Scene 'Rooms / 6. GBR, Guest Bed Room / Scenes / GBR-bath lights' Set 'Rooms / 6. GBR, Guest Bed Room / Devices / GBR-Bath-T2-A-Light-Load' 35% (On Level)


Else
   - No Actions - (To add one, press 'Action')

 

Posted (edited)

I think you may be missing one or all of the following (I'm not sure which is your scene controller - if all of them are you'll need all three lines):

In Scene 'Rooms / 6. GBR, Guest Bed Room / Devices / GBR-Bath-T1-A-Light-Load' Set 'Rooms / 6. GBR, Guest Bed Room / Devices / GBR-Bath-T1-A-Light-Load' 35% (On Level)
In Scene 'Rooms / 6. GBR, Guest Bed Room / Devices / GBR-Bath-T1-C-Light-Load' Set 'Rooms / 6. GBR, Guest Bed Room / Devices / GBR-Bath-T1-C-Light-Load' 35% (On Level)
In Scene 'Rooms / 6. GBR, Guest Bed Room / Devices / GBR-Bath-T2-A-Light-Load' Set 'Rooms / 6. GBR, Guest Bed Room / Devices / GBR-Bath-T2-A-Light-Load' 35% (On Level)

It's a little confusing - you select the device in the 'In Scene' pick list - and then set the same device in the 'Set' portion and the local on level will be adjusted. As I show I set it back to 100% in the 'Else' section.

 

You appear to only be adjusting the one level for the device in a scene (which is why it works for controlling the scene from ISY) - but not the 'Local' on level for the device. So - when you control the scene from the load device it's local 'on' level controls over the scene 'on' level - and the device will go to the current setting (default 100% if you have not changed it).

Edited by MWareman
Posted

OK, that did it. I didn't realize that you could set the local level within the "adjust scene" command. Thank you very much. Things make much more sense now.

  • 3 weeks later...
Posted

 

Can you post your program?  This is mine for my bathroom...  'SC - Master Bathroom Light' is the scene - and 'Master Bath Light' is the controlling switch itself. 

 

I have a single switch - but I had to do two 'In Scene..... Set' commands.  One for the scene - and one for the device.  I suspect you only have this set on the scene and not the device(s).

 

Michael.

Dim at night - [ID 0055][Parent 0054]

If
        From    10:00:00PM
        To       6:30:00AM (next day)
 
Then
        In Scene 'Upstairs / SC - Master Bathroom Light' Set 'Upstairs / Master Bathroom / Master Bath Light' 49% (On Level)
        In Scene 'Upstairs / Master Bathroom / Master Bath Light' Set 'Upstairs / Master Bathroom / Master Bath Light' 49% (On Level)
 
Else
        In Scene 'Upstairs / SC - Master Bathroom Light' Set 'Upstairs / Master Bathroom / Master Bath Light' 100% (On Level)
        In Scene 'Upstairs / Master Bathroom / Master Bath Light' Set 'Upstairs / Master Bathroom / Master Bath Light' 100% (On Level)
 

 

This simple explanation should be added somewhere (Wiki/Faq's) so that it's easily accessed...

I didn't understand I needed to add local control as I was using sensors via programs but recently added level adjustment to a device with only local control and found it wasn't working the way I had expected.

i.e., major points.. add device as controller, in program add scene adjustment and local adjustment.

 

Thanks,

 

Jon..

Posted (edited)

 

Thank you for replying. I think you are on to something, but I don't quite get it. I set the devices in the scene. How can I set the devices apart from the scene or set the scene itself.
 
Here's my code: 
 
dimming GBR lights at night - [ID 00BD][Parent 00BC]


If
        From     1:00:00PM
        To       3:00:00PM (next day)


Then
        In Scene 'Rooms / 6. GBR, Guest Bed Room / Scenes / GBR-bath lights' Set 'Rooms / 6. GBR, Guest Bed Room / Devices / GBR-Bath-T1-A-Light-Load' 35% (On Level)
        In Scene 'Rooms / 6. GBR, Guest Bed Room / Scenes / GBR-bath lights' Set 'Rooms / 6. GBR, Guest Bed Room / Devices / GBR-Bath-T1-C-Light-Load' 35% (On Level)
        In Scene 'Rooms / 6. GBR, Guest Bed Room / Scenes / GBR-bath lights' Set 'Rooms / 6. GBR, Guest Bed Room / Devices / GBR-Bath-T2-A-Light-Load' 35% (On Level)


Else
   - No Actions - (To add one, press 'Action')

Did you realise your times conflict with each other and the "to" time, will never execute?

 

3:00 PM, the next day, will always be later than the start time, that reoccurs everyday, and restarts the program "then" section. The "else" section will never be executed.

 

The time trigger could just be a simple time and not use a from-to construct since Else is not used in your program.

 

Edited by larryllix
Posted (edited)

There are two ways scenes are done and this terminology is always confusing.

 

You can create a scene inside ISY, writing it into the devices with no controller so that only ISY can trigger it.

 

In this case where ISY is the only controlling entity you can adjust the levels within the scene with this method.

Note the scene name is MBR Passthrough and I am adjusting the device included in the scene that only ISY controls.

 

MBR Lamp Level adjust2 - [iD 009A][Parent 000A]

If
        From    10:30:00PM
        To       9:30:00AM (next day)

Then
        In Scene 'Master Bedroom / MBR Passtrough' Set 'Master Bedroom / MBR Wall Lamp' 15% (On Level)

Else
        In Scene 'Master Bedroom / MBR Passtrough' Set 'Master Bedroom / MBR Wall Lamp' 70% (On Level)

 

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

or

 

You can create a scene inside ISY downloading it into the devices (or manually link the devices without ISY ) with a controlling unit so that ISY can trigger it or the controlling device can trigger it directly not even requiring ISY to be active.

 

In this style of scene adjusting it inside ISY will not affect the directly linked  scene between the controlling device and the responding devices. It is a different scene. This method is very desirable as the respond time is almost immediate and delays are almost not discernable.

 

 

Note: Motion.MBR is NOT a scene but it is still found in the scene pulldown list. Motion.MBR is a device that is controlling the scene.

Real time logic cannot affect this type of scene but ISY can change some parameters, previous to the scene being triggered, using this technique.

 

MBR Lamp Level adjust - [iD 0084][Parent 000A]

If
        From    10:30:00PM
        To       9:30:00AM (next day)

Then
        In Scene 'Master Bedroom / Motion.MBR' Set 'Master Bedroom / MBR Wall Lamp' 15% (On Level) <---no scene name used.

Else
        In Scene 'Master Bedroom / Motion.MBR' Set 'Master Bedroom / MBR Wall Lamp' 70% (On Level)  <--no scene name used

Edited by larryllix
Posted

Hi,

 

I deleted a previous post because the program I attsched to that post was incorrect and not working as I thought it would. When it did not work, I quickly realized how I set it up incorrectly.

 

The problem was that I set the wrong item to 'adjust' the dim level in the scenes. I was trying to dim a device being controlled by a motion sensor. I needed to adjust the motion sensor in the scene, not the scene itself.

 

I did not want anyone to try and use the incorrect program and cause them headaches.

 

Here is the post again but with the corrected program.

 

Nighttime Dim Levels - [iD 001D][Parent 0001]
 
If
        From    12:01:00AM
        To      Sunrise (same day)
 
Then
        In Scene 'Bathroom Small-Sensor' Set 'Bathroom Small Micro Dim' 2.0 Sec (Ramp Rate)
        In Scene 'Bathroom Small-Sensor' Set 'Bathroom Small Micro Dim' 20% (On Level)
        In Scene 'Bathroom Big-Sensor' Set 'Bathroom Big Micro Dim' 2.0 Sec (Ramp Rate)
        In Scene 'Bathroom Big-Sensor' Set 'Bathroom Big Micro Dim' 20% (On Level)
        In Scene 'Hallway Motion-Sensor' Set 'Hallway Dimmer' 0.2 Sec (Ramp Rate)
        In Scene 'Hallway Motion-Sensor' Set 'Hallway Dimmer' 20% (On Level)
        In Scene 'Foyer Motion-Sensor' Set 'Foyer Dimmer' 2.0 Sec (Ramp Rate)
        In Scene 'Foyer Motion-Sensor' Set 'Foyer Dimmer' 20% (On Level)
 
Else
        In Scene 'Bathroom Small-Sensor' Set 'Bathroom Small Micro Dim' 0.1 Sec (Ramp Rate)
        In Scene 'Bathroom Small-Sensor' Set 'Bathroom Small Micro Dim' 100% (On Level)
        In Scene 'Bathroom Big-Sensor' Set 'Bathroom Big Micro Dim' 0.1 Sec (Ramp Rate)
        In Scene 'Bathroom Big-Sensor' Set 'Bathroom Big Micro Dim' 100% (On Level)
        In Scene 'Hallway Motion-Sensor' Set 'Hallway Dimmer' 0.1 Sec (Ramp Rate)
        In Scene 'Hallway Motion-Sensor' Set 'Hallway Dimmer' 100% (On Level)
        In Scene 'Foyer Motion-Sensor' Set 'Foyer Dimmer' 0.1 Sec (Ramp Rate)
        In Scene 'Foyer Motion-Sensor' Set 'Foyer Dimmer' 100% (On Level)
 
 
Thank you for the help!
 
Rob
Posted

There are two ways scenes are done and this terminology is always confusing.

 

You can create a scene inside ISY, writing it into the devices with no controller so that only ISY can trigger it.

 

In this case where ISY is the only controlling entity you can adjust the levels within the scene with this method.

Note the scene name is MBR Passthrough and I am adjusting the device included in the scene that only ISY controls.

 

MBR Lamp Level adjust2 - [iD 009A][Parent 000A]

If

        From    10:30:00PM

        To       9:30:00AM (next day)

 

Then

        In Scene 'Master Bedroom / MBR Passtrough' Set 'Master Bedroom / MBR Wall Lamp' 15% (On Level)

 

Else

        In Scene 'Master Bedroom / MBR Passtrough' Set 'Master Bedroom / MBR Wall Lamp' 70% (On Level)

 

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

or

 

You can create a scene inside ISY downloading it into the devices (or manually link the devices without ISY ) with a controlling unit so that ISY can trigger it or the controlling device can trigger it directly not even requiring ISY to be active.

 

In this style of scene adjusting it inside ISY will not affect the directly linked  scene between the controlling device and the responding devices. It is a different scene. This method is very desirable as the respond time is almost immediate and delays are almost not discernable.

 

 

Note: Motion.MBR is NOT a scene but it is still found in the scene pulldown list. Motion.MBR is a device that is controlling the scene.

Real time logic cannot affect this type of scene but ISY can change some parameters, previous to the scene being triggered, using this technique.

 

MBR Lamp Level adjust - [iD 0084][Parent 000A]

If

        From    10:30:00PM

        To       9:30:00AM (next day)

Then

        In Scene 'Master Bedroom / Motion.MBR' Set 'Master Bedroom / MBR Wall Lamp' 15% (On Level) <---no scene name used.

Else

        In Scene 'Master Bedroom / Motion.MBR' Set 'Master Bedroom / MBR Wall Lamp' 70% (On Level)  <--no scene name used

 

Hi,

 

I do know that local linking where its stored on the device and independent of the ISY.

 

But what I'm not understanding from your program or what you are trying to inform us is:

 

The devices have no clock internally, so the cannot make the changes based on time to an internal scene.

 

 So I am assuming you are just modifying the dim level on the internally stored scene using the ISY which the ISY is able to do based on the time, am I correct?

 

Rob

Posted

No. ISY should be able to be disconnected after the level is set.

 

This setting the scene presets in the devices ahead of time.

Oh, this has nothing to do with changing scene dim levels at different times of the day. That would require the ISY to be involved.

 

Your are mentioning it when just setting it up.

 

In my case, if the ISY becomes disconnected, the device be dim med at the level that was last adjusted.

 

So if I lose the ISY in the middle of the night, when I wake up the devices will be stuck at the 20% value I adjusted at the beginning of the night before. The device won't be able to revert back to 100% (as I have it programmed to do) because the ISY is not available to make the change back to day time usage.

 

That's what you are trying to let us know.

 

Am I correct now, in what you are trying to get across?

 

Rob

Posted

Oh, this has nothing to do with changing scene dim levels at different times of the day. That would require the ISY to be involved.

 

Your are mentioning it when just setting it up.

 

In my case, if the ISY becomes disconnected, the device be dim med at the level that was last adjusted.

 

So if I lose the ISY in the middle of the night, when I wake up the devices will be stuck at the 20% value I adjusted at the beginning of the night before. The device won't be able to revert back to 100% (as I have it programmed to do) because the ISY is not available to make the change back to day time usage.

 

That's what you are trying to let us know.

 

Am I correct now, in what you are trying to get across?

 

Rob

Yes, I believe you are mostly correct if not completely.

 

The fine details get hazy when I haven't done it for a while.

Input from others can sometimes point out flies in the ointment.

 

If ISY goes off, usually the power is down and you don't have to worry about HA, whatsoever.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37.1k
    • Total Posts
      371.5k
×
×
  • Create New...