A personal project of mine has been to get my Hue and Dimmer lights to work exactly as I want them to. I wanted to be able to easily set up a number of fully automated scenes, but also wanted to keep WAF high.
To do this, I determined that I wanted (needed?) the following:
- A way to easily set up X number of lighting scenes;
- A way to easily set up color and/or level settings for X number of lights in each scene (ideally without having to repeat entering the same settings for multiple lights) as well as the “no motion” off time for each scene;
- A way to quickly and easily (temporarily) override the Scene Settings with Manual settings (and revert if necessary);
- Flexibility in what causes the triggering of the lights on / off within any scene (e.g., Will changing to the Scene, by itself, cause lights to turn on if currently off? Or will lights stay off until a motion or contact event occurs?; Can I have a scene be triggered when only a plurality (not all) of the people in my house are home? Can I use a combination of presence Sensors and “virtual presence” switches? )
- A way to make sure that the correct color / level settings are ALWAYS used;
- New devices types for my Hue and Dimmer lights that could store scene data so that any number of SmartApps could access, edit, and use the scene data; and
- New devices types for my Hue and Dimmer lights that immediately conveyed (i) the current color and level settings, (ii) off time information, and (iii) scene information.
- Doing all of the above with a minimum number of SmartApps.
Ridiculous, I know…
- FLEXi Scenes SmartApp - Sets up scenes and light settings for each scenes; you set up a single “Master” FLEXiHue light (see #4 below), optionally set up “Slave” FLEXiHue lights (which will adopt the color and level settings of the “Master” Hue), “Free” FLEXiHue lights (which you can set up to have different color and level settings from “Master” Hue); “Slave” FLEXiDimmer (see #5 below) lights (adopts the level of “Master”); “Free” FLEXiDimmers (can have different level from “Master”), and also basic Switches
- FLEXi Triggers SmartApp - Sets up requirements for who needs to be home (option to check from both / either capability.presenceSensors and FLEXiState virtual presence switches), sets up the motion and contact triggers for lights, and uses the scene-set or manually-set color, level, and “no motion” settings;
- FLEXiHue (Hue Connect) SmartApp - communicates with Hue Bridge and creates FLEXiHue device types for each Hue light. The FLEXi Scenes and FLEXi Triggers SmartApps both REQUIRE using this SmartApp to create the required FLEXiHue devices.
- FLEXiHue Device Type - each FLEXiHue device is able to store all scene-related data, is able to dynamically show the color of the Hue light, and is able to switch between scene settings and manual settings. The FLEXiHue (Hue Connect) SmartApp REQUIRES this device type.
- FLEXiDimmer Code / Instructions to turn any dimmer device type into a “FLEXiDimmer” device type - each FLEXiDimmer device type device is able to store all scene-related data, is able to dynamically show the color of the Hue light, and is able to switch between scene settings and manual settings. I have identified blocks of code that add the custom/ad hoc FLEXi-related attributes and methods, and instructions on where to add it in an existing device type. The FLEXi Scenes and FLEXi Triggers SmartApps both REQUIRE that any dimmer device type include this code.
- Example of using FLEXiDimmer Code (on Aeon Micro G2 Dimmer Device Type) - an example of using the FLEXiDimmer code (in #5 above)
- FLEXiState" virtual presence Device Type - can be used instead of / in addition to directly subscribing to presence sensors (which is helpful to me as I can create, using gCal and IFTTT, a “presence” for family members who do not currently carry any type of ST-enabled keyfob or a smartphone). The FLEXi Scenes and FLEXi Triggers SmartApps DO NOT require using this device type.
All of these apps, devices, code, and installation instructions may be found at https://github.com/infofiend/FLEXI_Lighting.
Please let me know if you have any questions, comments, suggestions, complaints, etc.