Announcement

Collapse
No announcement yet.

Control Dimming by Time of Day?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Control Dimming by Time of Day?

    I have set up HS3 with the RadioRa2 plug-in. I'm trying to create an event where pushing a dimmer will turn on a light to a predetermined level, based on time of day. For instance:


    If dimmer is activated
    And If the time is between 9pm and 6am
    Then turn on lights at 30%


    This seems like a pretty simple event to program, but I'm just getting started with HS3 and I can't figure it out. I have tried several different device triggers and can't get this one to trigger properly. I did get Spuds Trigger plug-in if that would help.


    Also, do I need to do anything inside the Lutron Essentials software to allow HS3 to control the system? For this light in particular, I programmed RA2 to turn the light on to its previously set level. I'm wondering if the two systems are fighting each other for control.

    #2
    Originally posted by socalsharky View Post
    I have set up HS3 with the RadioRa2 plug-in. I'm trying to create an event where pushing a dimmer will turn on a light to a predetermined level, based on time of day. For instance:


    If dimmer is activated
    And If the time is between 9pm and 6am
    Then turn on lights at 30%


    This seems like a pretty simple event to program, but I'm just getting started with HS3 and I can't figure it out. I have tried several different device triggers and can't get this one to trigger properly. I did get Spuds Trigger plug-in if that would help.


    Also, do I need to do anything inside the Lutron Essentials software to allow HS3 to control the system? For this light in particular, I programmed RA2 to turn the light on to its previously set level. I'm wondering if the two systems are fighting each other for control.
    Using Spud's Easy Trigger schedules is the easiest way. I will show you how I do it, but mine is quite complex. You might be able to take some ideas from this and copy parts of it. I will try to explain my logic.

    I have HomeSeer dimmers, so I use a central scene trigger to set the initial level, but this system was created for older Jasco switches. Without the scene capable HomeSeer dimmers, this will still work, just needing one more event. This event would detect if the dimmer changes from Off to any value. That event would look like this



    This event is disabled in my system since I use the central scene to trigger control. This event calls the master level event as described below.

    I use these for lighting levels
    • Day
    • Twilight (this is currently from 30 minutes before to 30 minutes after sunrise or sunset)
    • Night (30 minutes after sunset until house asleep)
    • Night Low (House Asleep until 30 minutes before sunrise)
    • Low Light (when an exterior light sensor falls below 50 lux and remains below 200 lux)


    Low Light and House Asleep are additional virtual devices in my system. The Low Light device is controlled by a luminance sensor looking at my back yard. It is turned on when the level falls below 50 lux during the day and is turned off when the level goes above 200 lux in the day. The House Asleep device is controlled by our bedtime event at night and is turned off based upon a schedule.

    I set non-overlapping schedules in Easy Trigger for all of the time ranges except for low light. Here is my Twilight schedule



    Low light is determined by a virtual device. For my use, I created virtual devices to allow me to set the levels for each light and each time period. The dim levels could easily be manually set in events, without using the virtual devices. The virtual devices are all in a group as defined by Jon00's device grouping utility. I do not currently use the Last Level virtual device, it is for possible future use.



    There are two virtual devices, one enables using defaults and the other is for temporarily defeating default level control. I will explain that in a minute.

    Here is the group of events used for this system



    The primary event to launch control is like this



    I call this event from the central scene trigger or from the light turned on event above. Any time I turn the lights on from other events (motion control, etc.) I use this master control event. This event then calls 6 other events that are evaluated based upon schedules or virtual devices.

    Here is the twilight set event. The other events are similar, but look to different schedules and level reference virtual devices.



    It will only run if it is in the InteriorTwiLevel schedule. When the event is in the schedule, I look at two virtual devices, "Use Defaults" and "Control". The Use Defaults device can be used to completely disable or enable default levels on this light. This was just added so that I could turn off defaults for any reason. When this device is off, the dimmer works normally. The Control device is to alleviate a specific problem. When a light is turned on, it goes to the default level. Each event will then turn this device off after the level is set, so that it can be manually overridden at the switch. This device is turned back on when the light is turned off so that it is ready for the next time.

    After the two virtual devices are evaluated, the level of the light is set. I use the Easy Trigger action "Set Device to another Device". This will set the level of the track lights to the Track Twilight virtual device. You do not need to use a virtual device here, you can set an arbitrary level in the event. Finally the control virtual device is turned off so that the dimmer can be manually controlled.

    The last control event is if the Use Defaults virtual device is off. This event sets the dimmer to the last level when defaults are disabled.



    This is really the nuts and bolts of my system. I added two enhancements with a couple of events. The first allows the level to be automatically be adjusted as we enter a new time.



    This event is triggered as the system enters a new time range or the low light virtual device is turned on. After triggers and conditions are evaluated it launches the Level event.

    The second event I added simply changes the light if I change the virtual device that is used for the level reference. If I set the Night level virtual device at night, the light will reflect that change. It makes it more convenient for me to tweak the levels.



    Again, this may be much more complex than you want, but hopefully it can be a foundation for some events. You might want more or less time periods, but the events can be easily culled or expanded.
    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      Originally posted by rprade View Post
      The last control event is if the Use Defaults virtual device is off. This event sets the dimmer to the last level when defaults are disabled.

      Randy--Thanks again for this. I have implemented most of this logic, and things are working well. I have a question about this last control event. What prior event triggers this one? I couldn't find a reference to MBR Track No Default anywhere else in your write-up. Thanks.

      Comment


        #4
        Originally posted by socalsharky View Post

        Randy--Thanks again for this. I have implemented most of this logic, and things are working well. I have a question about this last control event. What prior event triggers this one? I couldn't find a reference to MBR Track No Default anywhere else in your write-up. Thanks.
        I have a virtual device (“Use Defaults”) for each light that enables time of day level controls. If the device is off the lights will turn on to their last level instead of applying default levels. That event is called along with the 5 default level events which all look for the virtual device to be on.
        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

        Comment


          #5
          Originally posted by rprade View Post
          I have a virtual device (“Use Defaults”) for each light that enables time of day level controls. If the device is off the lights will turn on to their last level instead of applying default levels. That event is called along with the 5 default level events which all look for the virtual device to be on.
          I can't seem to find the option to set a device to "last" as you do in the event above. Is "last" a setting that is unique to your lighting system? I am controlling the lights via the Lutron Radio RA2 plugin. Thanks.

          Comment


            #6
            Originally posted by socalsharky View Post

            I can't seem to find the option to set a device to "last" as you do in the event above. Is "last" a setting that is unique to your lighting system? I am controlling the lights via the Lutron Radio RA2 plugin. Thanks.
            All of my Z-Wave dimmers offer Off, On, Dim level and Last. Last on a Z-Wave dimmer returns the light from Off to the last level to which it was set. Hue devices also support returning from Off to the last setting. I don't use any Lutron devices.

            HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

            Comment


              #7
              Randy--

              I figured out a way to set a Lutron dimmer to its most recent level, but it took 2 virtual devices and a couple of extra actions. With just one virtual device I was able to save the last level as the light was turned off, but then when the switch was pressed and the light turned on to the new level, the last level was lost. I'm wondering if there is a more efficient way. Here are the devices and 3 of the events for a simplified version of your default dimmer level system:


              Click image for larger version

Name:	Capture1.JPG
Views:	458
Size:	50.2 KB
ID:	1288362
              Click image for larger version

Name:	Capture3.JPG
Views:	466
Size:	31.7 KB
ID:	1288359Click image for larger version

Name:	Capture2.JPG
Views:	466
Size:	32.7 KB
ID:	1288360Click image for larger version

Name:	Capture4.JPG
Views:	467
Size:	35.3 KB
ID:	1288361


              Comment


                #8
                A simple approach is just to use time as an event condition and in the actions set your dim level.

                As further explanation, in my master bath, I've used "Easy Trigger" to define a group including all of the dimmers. If either of two switches is tapped on during the night, the lights are set to 20. I wanted the event to only trigger if I physically turned on or off the switch, but not if it was remotely adjusted, so I use the dimer's "Central Scene" device to look for the device tap (if you were monitoring the dimmer device itself, the event would also trigger if the dimmers were remotely adjusted which is probably not what you wanted). During the day, they're set to 99. I just use two simple events to do this. See below. Note that my daytime event is also set so that if I double-tap any of the switches in the bathroom, the lights will come on at 99 (whether it is day or night).

                NOTE: Though it defies logic, the maximum Z-Wave dimmer value is 99, not 100, so "full on" is a 99 setting. I put this bit of oddness in the "Don't blame HomeSeer" bin as this bit of illogic is part of the z-Wave standard and not a HomeSeer convention.

                Click image for larger version

Name:	Capture.PNG
Views:	487
Size:	143.5 KB
ID:	1288375

                Comment


                  #9
                  Originally posted by socalsharky View Post

                  I can't seem to find the option to set a device to "last" as you do in the event above. Is "last" a setting that is unique to your lighting system? I am controlling the lights via the Lutron Radio RA2 plugin. Thanks.
                  You can try the beta 106, i did incorporate the Last function.

                  Comment


                    #10
                    Randy-This dimming control setup works great for me. Thanks again for explaining it all. The only issue I have is when HS3 unexpectedly shuts down, and the "control by default" virtual devices get out of sync. The way my events work, the virtual device should be on when the light is off and vice-versa. However, if HS3 is down, and one of the lights gets switched, the sync problem occurs. Do you incorporate something in your clean up sequence to address this when HS3 restarts? I can brute force it by running two event for every virtual device, but that's going to be about 30 events. I'm hoping there's a simpler way. Thanks.

                    Comment


                      #11
                      Use Beta 124 had a bug on the start

                      New function may interest you in the beta 123

                      Beta 123
                      • add in the events 3 new function:
                        • Set Last Value to Device: change the value of Last in the device
                        • Set Night Value to Device: set a value for a dimmer, if the light is off and turn to any value send a command to dim at that value (set back to 0 to remove this function or call the events "Reset All Night to None Value to Device" )
                        • Reset All Night to None Value to Device
                      • remove grouping for all device and add Parent to seetouch, Visor, etc... (need this to be control in Mobile apps)

                      Comment


                        #12
                        Don - I'm running into an error when trying to set either a last value or night value. On console I see...

                        Code:
                        05:31:09:8094:[ValueCheck]->Exception: Argument 'Expression' cannot be converted to type 'System.Double'.
                        And in the UI it looks like this:
                        Click image for larger version

Name:	Screen Shot 2020-05-11 at 5.32.30 PM.png
Views:	302
Size:	33.6 KB
ID:	1384713
                        Right before that it looks like below - note I don't see values to set besides "Off"
                        Click image for larger version

Name:	Screen Shot 2020-05-11 at 5.34.38 PM.png
Views:	290
Size:	27.6 KB
ID:	1384714
                        I've tried it with a few radiora2 devices - they're all 6NDs. Not sure if that's a bug or I'm missing something? Also tried re-running "Systems Create..." but no luck.

                        Comment


                          #13
                          I’ll check it a double value error is easy to find

                          Comment


                            #14
                            Just checking in - any luck?

                            Comment


                              #15
                              Can you tell me if you are running on Linux or Windows?

                              Comment

                              Working...
                              X