-
Notifications
You must be signed in to change notification settings - Fork 190
/
ReadMe Mode Lighting
42 lines (30 loc) · 2.66 KB
/
ReadMe Mode Lighting
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
This app sets the dimmer levels for a group of lights based on modes. The dimmer levels are
selected for each mode. You can use any number of modes you want, two or more. I use three.
It supports motion sensors that turn on the group, and turns them off after a specified period,
and has provision for linking to button controllers and Routines, through a button device.
The location can have other modes, but this app only adjusts the lights for the selected modes.
The app has a master dimmer and some slave dimmers. The idea is that sometimes the master dimmer physical
switch is used to turn on the lights -- the slaves follow, or likewise to turn off some lights.
The app also allows you to specify additional switches that are turned off when the master dimmer is turned off.
It should be noted that for this master switch function to work with near instant response,
one must use an instant reporting z-wave dimmer. One such dimmer is the Leviton VRMX1
(which must be included directly to the hub to have instant reporting).
If motion sensors(s) are specified, they turn on the master and all slaves to the
current mode dimmer level. The motion activation can be conditioned on times of day,
days of week, or modes. Optionally, the master and slaves can be turned off some minutes
after motion stops. A switch (possibly virtual) can be turned on to disable motion activation.
The app adjusts dimmer levels on each mode change to the level selcted for that mode.
A mode change to some other mode has no effect on the dimmer levels. If the lights are on at
a mode change, and the new mode is brighter than the previous mode, it will brighten the lights.
The app allows manual changing of the dimmer level, either by the physical switch or mobile app.
For example, in the evening, a woman wants to put on makeup and the light isn't bright enough.
She turns up the dimmer. That event is responded to by temporarily adjusting the
dimmer level for both master and slaves to that new level (short delay typical).
How to set default values for modes and dimLevels:
If you are going to install multiple instances of this, it's convenient for it to fill in default values
for you. You can always change from the defaults, but most lighting areas are similar.
To set default modes:
Remove the comment (//) from line 54, and place the comment mark on line 55 instead.
Edit the list of modes in [brackets] on line 54 to be your modes.
To set default levels:
Edit the list of levels in [brackets] on line 58 to be your levels.