Originally posted by The Profit
View Post
Announcement
Collapse
No announcement yet.
Dimmer default levels
Collapse
X
-
HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
-
Originally posted by rprade View PostI 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.
Comment
-
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
-
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
-
Originally posted by rprade View PostI 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.
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
-
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.
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:
This is the event list for that room.
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.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
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
Day Low Light
Twilight
Night - awake
Night - asleep
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.
Next I will dissect one of the level setting events explaining the function. All of them are similar.HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
If we take the Night Awake level for example
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.
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.
Without this event the light would not be controlled by the level setting event.HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
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.
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.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
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.
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.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
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:
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.
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.
Similarly pressing and holding the bottom paddle will disable motion control with the lights off.
There is a cleanup event triggered when the lights are turned off that resets the Motion Enable and Control virtual devices.
Last edited by randy; July 12, 2017, 07:37 PM.HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
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
A triple tap of the bottom turns the Motion Master device Off
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.
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.
Last edited by randy; July 12, 2017, 08:01 PM.HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
Last edited by randy; July 13, 2017, 03:57 PM.HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
Comment