Announcement

Collapse
No announcement yet.

Dimmer default levels

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

    #16
    Originally posted by The Profit View Post
    Hey Randy,
    I haven't had a lot of time to work on implementing the dimmer default levels until recently, but I was wondering if you wouldn't mind taking a look at the changes I made to the events and let me know what you think.

    ...
    I missed this post when you first made it. This whole thing evolved from switches which were not the HomeSeer scene capable switches. The dimmer default virtual device was a carryover from the original switches that had no scenes. I still use it, but its purpose has been changed. When I posted the update above I had just transitioned to the HomeSeer switches. I completely revised my event structure last fall, to make better use of the scenes with the new switches. I was able to replace all of the switches with HS-Wx100+ devices and to normalize the functions across all motion controlled zones, whether dimmer controlled or binary - so that is easier for other members of the family to remember. The lighting also transitions from one time schedule to the next, as long as the lights are on and have not been manually overridden from their default setting. I will see if I can post an update over the weekend.
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    Comment


      #17
      Originally posted by rprade View Post
      I missed this post when you first made it. This whole thing evolved from switches which were not the HomeSeer scene capable switches. The dimmer default virtual device was a carryover from the original switches that had no scenes. I still use it, but its purpose has been changed. When I posted the update above I had just transitioned to the HomeSeer switches. I completely revised my event structure last fall, to make better use of the scenes with the new switches. I was able to replace all of the switches with HS-Wx100+ devices and to normalize the functions across all motion controlled zones, whether dimmer controlled or binary - so that is easier for other members of the family to remember. The lighting also transitions from one time schedule to the next, as long as the lights are on and have not been manually overridden from their default setting. I will see if I can post an update over the weekend.
      Would still be interested in seeing this.

      Comment


        #18
        Great thread and examples! Rather than drop the lights (e.g. from 75% to 50%) at twilight in one fell swoop has anyone experimented with doing it in smaller steps over a minute or two? This would be similar to how some computer screens, tablets, etc... switch into nighttime mode (no blue light) slowly so the change isn't jarring if you happen to be staring at the screen when it happens.

        I suspect some kind of while loop would have to take place to do a custom ramp down function. Just a dirty example below, but it would be to drop the light to the twilight value over two minutes.

        Set $RampRate = ($Device.CurrentValue - $Device.Twilightvalue)/24

        While ($Device.CurrentValue > $Device.TwilightValue)
        {
        Set $Device.CurrentValue to ($Device.CurrentValue - $RampRate)
        Wait 5 Seconds
        }

        Comment


          #19
          I have a script which scans for dimmable lights that are on and lowers them to a set level for evening lighting.

          I also wrote a script that will dim a light at a custom ramp rate. If a script can call another script and continue execution while the 2nd script runs, something like that would work. If you can't spawn multiple instances of the 2nd script my concern is the first script would dim each light really slowly then move to the next drawing out the entire process

          I wonder if you can add lights to a scene via scripting. If you can, a scene can have a custom ramp level which would accomplish the same thing fairly elegantly. Add them all to a scene then trigger an event to execute the scene?
          HS4 Pro on Shuttle NC10U, Win10; Z-NET
          Number of Devices: 1005
          Number of Events: 293

          Plug-Ins: BLLock, DirecTv, EasyTrigger, Honeywell WiFi Thermostat, Marquis monoprice Amp, MeiHarmonyHub, PHLocation2, Pushover 3P, UltraM1G3, rnbWeather, Worx Landroid, Z-Wave

          External applications: Homebridge-homeseer, Geofency, EgiGeoZone.

          Comment


            #20
            Originally posted by rprade View Post
            I missed this post when you first made it. This whole thing evolved from switches which were not the HomeSeer scene capable switches. The dimmer default virtual device was a carryover from the original switches that had no scenes. I still use it, but its purpose has been changed. When I posted the update above I had just transitioned to the HomeSeer switches. I completely revised my event structure last fall, to make better use of the scenes with the new switches. I was able to replace all of the switches with HS-Wx100+ devices and to normalize the functions across all motion controlled zones, whether dimmer controlled or binary - so that is easier for other members of the family to remember. The lighting also transitions from one time schedule to the next, as long as the lights are on and have not been manually overridden from their default setting. I will see if I can post an update over the weekend.
            Hi Randy,

            Any chance you might consider posting your new configuration for the dimmer defaults routine? I have recently upgraded to the HS100 switches and would appreciate seeing how you configured the scenes.

            Thanks!

            Comment


              #21
              OK, several have asked for this. It will be long and thorough.

              The changes I made were to the function of the events, a set of virtual devices that are used for default levels and default control. I also changed the function to accommodate HomeSeer's central scene capable dimmers.

              Adding virtual devices for each time frame and house status combination was done so that levels used in the events can be adjusted through HSTouch or the Device Manager interface. I cannot argue that they are necessary, it was just an exercise. Once the values were settled, they have not needed changing. Since I was going to use identical structures on most dimmable lights in the house, I built a set of virtual device templates. These templates can be used with the Copy function to build a set of devices for each light I use.

              Click image for larger version

Name:	ddtemplates.PNG
Views:	1
Size:	65.5 KB
ID:	1191526

              Some rooms have more features than others, but the basic structure is the same. For these posts I am going to cover one of the bathrooms. In addition to default levels for the lights, there are a number of other aspects to the control. I will cover it all - hopefully it will present some ideas that others can build on. Here are the virtual devices for the downstairs bathroom:

              Click image for larger version

Name:	dddsbath.PNG
Views:	2
Size:	64.2 KB
ID:	1191527

              This is the event list for that room.

              Click image for larger version

Name:	ddeventlist.jpg
Views:	1
Size:	86.6 KB
ID:	1191528

              I decided to create a new event group for each light to make it easier to manage associated events and controls. There are a lot of events, but there are some unique features to this room. I will cover each of them.

              One of the fundamental tools in these events is Spud's Easy Trigger plug-in. I use it for scheduling and for setting device values.
              Last edited by randy; July 12, 2017, 04:26 PM.
              HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

              Comment


                #22
                First was a group of events that are based upon schedules and 2 virtual devices. The schedules are basically Day, Twilight and Night. The two virtual devices are Low Light and House asleep. The Low Light virtual device is controlled by a light sensor under the eaves outside on the west side of the house. Its purpose is to provide additional lighting and motion controlled lighting at times when it is so overcast as to provide little ambient light to enter through the windows. The House asleep virtual device is set to asleep when we manually put the house to sleep with MiniMotes in the bedroom. The house wakes up in the mornings by itself, based upon holidays, weekdays, work schedule, etc. There are the events to accommodate the various combinations.

                Day

                Click image for larger version

Name:	dsbday.PNG
Views:	1
Size:	37.6 KB
ID:	1191529

                Day Low Light

                Click image for larger version

Name:	dsbdayll.PNG
Views:	1
Size:	37.9 KB
ID:	1191530

                Twilight

                Click image for larger version

Name:	dsbtwilight.PNG
Views:	1
Size:	33.3 KB
ID:	1191531

                Night - awake

                Click image for larger version

Name:	dsbnightawake.PNG
Views:	2
Size:	38.4 KB
ID:	1191532

                Night - asleep

                Click image for larger version

Name:	dsbnightasleep.PNG
Views:	1
Size:	38.3 KB
ID:	1191533

                A single event can be called to set the light levels. This event calls the six level setting events, each of which evaluate schedules and virtual devices.

                Click image for larger version

Name:	dsblevel.PNG
Views:	1
Size:	43.2 KB
ID:	1191534

                Next I will dissect one of the level setting events explaining the function. All of them are similar.
                HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                Comment


                  #23
                  If we take the Night Awake level for example

                  Click image for larger version

Name:	dsbnightawake.PNG
Views:	2
Size:	38.4 KB
ID:	1191535

                  It is a manually triggered event and is only called from the level setting event. The level setting event calls all 6 of the levels honoring their conditions.

                  The first thing the event does is determine if it is in the correct schedule. There are two virtual devices involved, "Use Defaults" and "Control". Use Defaults is a virtual switch I can use to control whether dimmer defaults are employed for this light and the Control device is used so that dim levels can be overridden manually or for other reasons within the controlling events. If we turn Use Defaults off all of the level setting events are disabled. The Control device is used to temporarily disable dimmer defaults when I want to override the preset levels. Then it evaluates the House asleep virtual device. Finally it sets the dimmer to the appropriate virtual device using Easy Trigger's "Set Device to Another Device...".

                  You can see the control virtual devices are part of the defaults control block.

                  Click image for larger version

Name:	dddsbath.PNG
Views:	2
Size:	64.2 KB
ID:	1191536

                  The "Last Level" virtual device is unused at this time, but was included for possible future use.

                  For now if the Use Defaults device is off, the dimmer is set to its last level.

                  Click image for larger version

Name:	dsbnodefault.PNG
Views:	1
Size:	23.6 KB
ID:	1191537

                  Without this event the light would not be controlled by the level setting event.
                  HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    #24
                    Then I added a function to adjust the light level if the lights are on and a new time zone is entered or a virtual device changes.

                    Click image for larger version

Name:	dsbnewtime.PNG
Views:	1
Size:	107.6 KB
ID:	1191538

                    This event looks for a change in schedule or a change in setting of House asleep or Low Light. I did add a condition evaluating Use Defaults, just to stop it from evaluating all six level setting events unnecessarily. each of those events looks for that device to be on, so it would work without the condition being in this event. If a new schedule is entered or one of the virtual devices is changed and as long as the lights are not off, the level set event runs.
                    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                    Comment


                      #25
                      I added a couple of functions to control the light level. A double Tap of the top paddle will turn the lights on to maximum. A double tap of the bottom paddle will set the light back to default, as long as it is not Off. There is a slight wrinkle in the bathroom and in other rooms. For energy management we use certain conditions to control the power to devices that present a vampire load, even when they are nut doing anything. There is a TV in this bathroom connected to a DirecTV Genie client. If the power to the Genie has been cut, a double tap of the top paddle will turn the power to the Genie client on. If it is already on a double tap will set the lights to on.

                      Click image for larger version

Name:	dsbtt2dtvoff.PNG
Views:	1
Size:	25.9 KB
ID:	1191540

                      Click image for larger version

Name:	dsbtt2dtvon.PNG
Views:	1
Size:	34.9 KB
ID:	1191539

                      Click image for larger version

Name:	dsbbt2.PNG
Views:	1
Size:	29.8 KB
ID:	1191541

                      This is also an example of how the "Control" virtual device is used. If the control device is Off the light can be set at a different level than the defaults, if it is On the default overrides are in place. This device is a carryover from when I was using Cooper dimmers and is really not necessary with the HomeSeer scene capable dimmers. I have left it in place until I can make sure there aren't any consequences to its removal.

                      With the Cooper dimmers there was an event triggered by the device being turned on to any level. That event then called the level set event. Without the Control virtual device the light would always try to set itself back to the default level when manually controlled, so as soon as the level set event ran it would turn Control off. With the HomeSeer dimmers, that is no longer needed since everything is triggered by central scene functions.
                      Last edited by randy; July 12, 2017, 06:34 PM.
                      HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                      Comment


                        #26
                        Motion control. There is one or more PIR detector in any room that has motion controlled lighting. I use the same central scene functions whether for a dimmer or switch, but the dimmers will turn on to the default levels. First is the On by motion event:

                        Click image for larger version

Name:	dsbonbymotion.PNG
Views:	1
Size:	68.5 KB
ID:	1191544

                        There are two groups of triggers and conditions. The first one is triggered by motion when in the motion control time schedule. The second group is triggered by motion when the "Low Light" virtual device is on. Then each has a condition that the light must have been off for at least 30 seconds. This is to prevent it from triggering again after the light is turned off as there is still motion in the bathroom. The PIRs I use are almost instant, wired through my DSC security panel. There are two motion enabling virtual devices, the Motion Master device will disable motion control for that light. The Motion Enable device is a temporary control to allow override of motion control and is reset when the light is turned off or with certain central scene triggers.

                        There are two Off by motion events. There is a door sensor that lets me know if the door is open or closed. We leave doors open when bathrooms are empty and they are closed when it is occupied. There is the chance a guest might close the door when it is vacant. The only difference in the two events is that a lot more time is allowed when the door is closed, in case someone camps out in there but doesn't move enough to trigger motion.

                        Click image for larger version

Name:	dsbnomotiondooropen.PNG
Views:	1
Size:	34.4 KB
ID:	1191545

                        Click image for larger version

Name:	dsbnomotiondoorclosed.PNG
Views:	1
Size:	34.7 KB
ID:	1191546

                        Now there are some central scene functions that affect motion controls. If the top paddle is pressed and held, the light will be turned on and the Motion Enable device turned off. This will allow the lights to stay on, regardless of motion. This is not so useful in the bathroom, but in other basement rooms it is nice if you want the lights to stay on as you might pass through one room to get to another.

                        Click image for larger version

Name:	dsbsuspendmotionon.PNG
Views:	1
Size:	19.9 KB
ID:	1191547

                        Similarly pressing and holding the bottom paddle will disable motion control with the lights off.

                        Click image for larger version

Name:	dsbsuspendmotionoff.PNG
Views:	1
Size:	19.9 KB
ID:	1191548

                        There is a cleanup event triggered when the lights are turned off that resets the Motion Enable and Control virtual devices.

                        Click image for larger version

Name:	dsbathoff.PNG
Views:	1
Size:	22.5 KB
ID:	1191549
                        Last edited by randy; July 12, 2017, 07:37 PM.
                        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                        Comment


                          #27
                          The last central scene controls are to turn the Motion Master device on and off. A triple tap of the top paddle turns it On

                          Click image for larger version

Name:	dsbtt3.PNG
Views:	1
Size:	29.4 KB
ID:	1191550

                          A triple tap of the bottom turns the Motion Master device Off

                          Click image for larger version

Name:	dsbbt3.PNG
Views:	1
Size:	20.4 KB
ID:	1191551

                          This device is not reset and will remain enabled or disabled until controlled at the switch.

                          We use the same button combinations in every room as much as possible. A press and hold will temporarily disable motion controls, a triple tap of the top or bottom will completely enable or disable motion control. In any room where there are power management controls, a double tap with power off in that room will turn the power on. If the power is already on and the control is a dimmer a double tap of the top will turn the light On full.

                          Two more central scene controls are a single tap of the bottom. In addition to turning the light Off, it will enable Motion.

                          Click image for larger version

Name:	dsbbt1.PNG
Views:	1
Size:	19.1 KB
ID:	1191552

                          A single top tap will turn the light On to the default level. In addition there is an immediate script to set the motion sensors Last Change to now so that the light will not turn Off immediately if one was to turn it On before motion was detected.

                          Click image for larger version

Name:	dsbtt1.PNG
Views:	1
Size:	35.4 KB
ID:	1191553
                          Last edited by randy; July 12, 2017, 08:01 PM.
                          HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                          Comment


                            #28
                            Schedules. These are the Easy Trigger schedules I use. I arbitrarily made Twilight from 30 minutes before sunrise until 1 hour after sunrise and 1 hour before sunset until 30 minutes after. Those schedules seem to be about correct for a normal day.

                            Day Schedule

                            Click image for larger version

Name:	DayLevel.PNG
Views:	1
Size:	29.6 KB
ID:	1191565

                            Twilight Schedule

                            Click image for larger version

Name:	TwiLevel.PNG
Views:	1
Size:	29.9 KB
ID:	1191566

                            Night Schedule

                            Click image for larger version

Name:	NightLevel.PNG
Views:	1
Size:	31.0 KB
ID:	1191567
                            Last edited by randy; July 13, 2017, 03:57 PM.
                            HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                            Comment


                              #29
                              Fantastic update with awesome information!!! Thanks!

                              Comment


                                #30
                                Slightly off topic question in regard to the switch scene for top button held on...

                                How does the HS100 switch determine the difference between someone trying to increase the bulb output (dimming) and someone doing a press and hold?

                                Comment

                                Working...
                                X