GE Z-Wave Motion Sensor Dimmer Switch
The GE Z-Wave Motion Sensor Dimmer Switch is combination dimmer switch and motion detector that when configured with the proper SmartThings device type handler (DTH) can locally control a light when there is movement in the room. This document outlines the installation and usage of this custom DTH. In addition, this DTH allows for you to directly control other Z-Wave switches within your SmartThings environment, allowing you to have a bit of automation without the need to program.
- 1 Summary
- 2 Installation
- 3 Settings
- 4 Interface
- 5 Developer Notes
- 6 Community Discussion
Product: GE Z-Wave Motion Sensor Switch (Model 26933)
Capabilities: Motion Sensor, Dimmer Switch
Type: In-wall mounted dimmer switch with motion sensor capabilities
Protocol: Z-wave Plus
ST Community Handle: https://community.smartthings.com/users/michaels/activity
Contributions: @Darwin (Motion Sensitivity Settings, programming interface, double press, testing)
The latest version of the device code is as follows (as of 12/6/18):
GE Z-Wave Motion Sensor Dimmer Switch DTH: Version: 1.0.5 https://raw.githubusercontent.com/MichaelStruck/SmartThingsPublic/master/devicetypes/michaelstruck/ge-motion-dimmer-switch-26933.src/ge-motion-dimmer-switch-26933.groovy
Open Source License/Trademarks
Licensed under the Apache License, Version 2.0 (the "License"); you may not use the GE Z-Wave Motion Sensor Dimmer Switch DTH code except in compliance with the License. You may obtain a copy of the License at:
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
First, copy the code from the following GitHub location:
Click the Raw link, and then select all of the code (CTRL+A), and then copy it (CTRL+C) to your computer’s clipboard. Then go to the SmartThings IDE at http://ide.smartthings.com. Log into the site and proceed to the link at the top labeled My Device Types. Click on this link.
This will present you with a list of custom device types that you may have within your account. If you do not yet have the GE Z-Wave Motion Sensor Dimmer Switch listed, click the link +New Device Type in the upper right-hand corner of the screen.
There will be three tabs at the top, which represent the different ways to add a device. Choose From Code and you will be presented an empty area where the code you copied earlier can be placed. In the open area in the middle paste (CTRL+V) this code.
From here, simply Save and Publish this code.
Notice The code for the GE Z-Wave Motion Sensor Dimmer Switch only needs to be installed in this manner once; you can add multiple Z-Wave Motion Sensor Dimmers as long as this code is in place.
You can now go through the normal process of adding devices to SmartThings.
For advanced users who have their SmartThings IDE integrated with GitHub, the installation and maintaining of code becomes very simple. This manual will not go into detail about setting up your IDE with GitHub; those instructions can be found here: http://docs.smartthings.com/en/latest/tools-and-ide/github-integration.html?highlight=git
Once you have integration, the code you might need will be available to you to download and keep in sync with the latest versions.
- First, find the Settings button at the top of your SmartThings IDE page under My SmartApps or My Device Handlers(this button will only appear after you integrate with GitHub). For the virtual dimmer, you should be under the My Device Handlers section
- Clicking this button will open the GitHub Repository Integration page. To find the GE Z-Wave Motion Sensor Dimmer Switch code, enter the information as you see it below:
- Close the GitHub Repository Integration page
- Next, click the Update from Repo button at the upper-right corner of the IDE
- On the right-hand column, scroll down to click the apps you want to install. This will typically be:
GE Z-Wave Motion Sensor Dimmer Switch: devicetypes/michaelstruck/ge-motion-dimmer-switch-26933.src/ge-motion-dimmer-switch-26933.groovy
- Click the Execute Update in the bottom-right corner of the screen. When done syncing, the new device handler should now appear in your IDE. If they ever change color, that indicates a new version is available.
Using the 'gear' in the upper right corner of the DTH, you can access some of the advanced settings for the DTH. (See H on the interface here: GE_Z-Wave_Motion_Sensor_Dimmer_Switch#Interface)
General SmartThings Options
|Name||This is the name of the switch that will be seen by other applications and SmartThings.|
|Icon||This is the icon associated with the switch and will be seen throughout the SmartThings app|
DTH Specific Options
Please Note The settings marked as 'Default' will be applied to the switch regardless of whether you have set them within the Settings area. The only item this does NOT apply to is the Operating Mode. If this is left blank in the Settings the value will NOT be changed from what it was previously (be it Manual, Vacant or Occupied. Also note that tapping 'SAVE' on the Settings page will overwrite all settings that may have been set, including any settings that have been set programmatically. The dashboard on the main interface will show you which settings differ from the Settings page.
|Option Name||Settings/Notes||Programming Access|
|Operating||This allows you to set the operating mode to one of the 3 modes listed below:
As mentioned above, leaving this area blank in the Settings area will retain the current mode
|Timeout Duration||This is utilized only in the "Occupancy" and "Vacancy" modes and is the amount of time after the motion sensor stops sensing motion that the lights will turn off. The default time is 5 minutes and can be set as short at 5 seconds, and as long as 30 minutes. To disable this functionality, you can set the operating mode to 'Manual'||Y|
|Triple Press Timeout||Like the option above, this is utilized only in the "Occupancy" and "Vacancy" modes. However, this timeout will only be initiated if you press the 'on' (top) button three times within 10 seconds of each other (this does NOT get implemented if you programmatically send the on command twice). This timeout overrides the setting above. When the light it turned off (either through physical press or programmatically), the original settings are re-implemented. It is NOT recommended you press the button in rapid secession to implement this override; instead a simple press (turning on the light) then waiting 1 second, press the on button again, wait one second, then press the on button a final time will do just fine.||N|
|Triple Press Mode||By setting this option, when the physical 'off' (bottom) is pressed twice withing 10 seconds (physical presses only) it will override the currently set operating mode. A good use case for this would be a switch in a guest room that is normally in the 'vacant' operating mode, which will not turn on the light, but will turn it off after a time of inactivity. If a guest arrives and does not need to turn off the light automatically, pressing 'off' three times within 10 seconds then back on could put the switch into 'manual' operating mode. Please note there is not an override for this; you must use the app or programmatically change the mode again||N|
|Enable Motion Sensor||With this setting, you can enable or disable the motion sensor. Doing this will affect the Operating Mode listed above||Y|
|Motion Sensitivity||When the motion sensor is activated above, you can set the sensitivity of the detector from low, medium (Default) to high||Y|
|Enable Light Sensing||Used exclusively with the "Occupancy" operating mode, this will sense the light in the room and determine if the light will come on with motion. Unfortunately, the light levels are NOT exposed to SmartThings and are used internally by the switch itself. Turning this option off will simply allow the motion sensor (if enabled) to control when the light automatically comes on.||Y|
|Invert Remote Switch Orientation||This setting, while defined as orientation by GE's documentation, does NOT change the orientation of the dimmer switch itself; the top button of the switch will always be the 'on' position and the bottom switch will always turn off the switch. However, if you have a 'child' switch connected via the 'traveler' wire, this child switch WILL have its on/off orientation swapped (inverted)||N|
|Motion Reset Cycle||This is the amount of time after motion stops that the DTH will report out that the motion has stopped. You can choose to disable this (if the motion detector goes on, it stays on), or chose a time between 10 seconds to 27 minutes. The default is 20 seconds||N|
|Z-Wave Dimmer Ramp Rate Settings||These settings allow you to control the 'ramp rate' (the amount of change over time) with either a Z-Wave (programmic) command. The default if is 1% every 30 milliseconds. So the switch will go to 100% in 3 second (3000 milliseconds)||N|
|Slow Dim Rate||These settings allow you to control the 'ramp rate' (the amount of change over time) with the press of the physical button. The default (when this setting is off) is "Quickly", taking about 1 second to go to 100%. Enabling this 'Slow' option will have the light taking around 3 seconds to reach level||N|
|Manual Ramp Rate Settings||These settings allow you to control the 'ramp rate' (the amount of change over time) with a 'press and hold' of the physical buttons. The default is 1% every 30 milliseconds. With these default settings the switch will go to 100% in 3 second (3000 milliseconds). Please note that this is the ramp rate used when the operating mode is set to 'Occupancy' and the light goes on with motion||N|
|Default Dim Level||For a single tap of the 'on' button, this allows you to define what level the dimmer goes to by default. A setting of '0' will use the previous level. Any value above 0 will be the percent the dimmer goes to when the button is pressed||Y|
|Enable Switch Mode||This essentially turns the dimmer into an on/off switch. Pressing the top button will force the light to 100%, the bottom button will turn off the light. Dimming action will not occur. The speed at which the light turns on and off will be very quick (like a switch) and overrides the Default Dim Level, Z-Wave Dimmer Ramp Rate Settings and Manual Ramp Rate Settings||Y|
|Association Groups||This is a very unique feature of this DTH. When set up, it allows you to control other switches (Z-Wave only) when physically pressing the main dimmer switch associated with this DTH, or activated through the local (motion detector controlled) activation. Simply place the Device Network ID (from the SmartThings IDE>>My Devices) in one of the two lists provided. Separate each device with a comma; then, when you press the "on" button from the main dimmer (or is activated through the local motion detector option in the "occupancy" mode), all of the Z-Wave devices will go on as well. This control is only one way; you can not go to one of the 'associated' Z-Wave switches and turn it off and expect the main switch to react, unless you have this DTH on THAT switch as well. Please note that these commands bypass the normal SmartThings cloud. Turning on remote lights via this method MAY NOT properly show the correct status of the associated switches in the SmartThings Mobile Application||N|
|setLevel Command Mode||Normally, if a dimmer switch receives a 'setLevel' command, the light turns on and sets to this level. This is default behavior with most SmartThings dimmers, along with this one. However, this setting can be overridden, however, allowing you to set the level of the dimmer without turning it on. Some automations may need this setting to get desired results. However, please note that depending on your settings, you may not get the desired results if you have the Default Dim Level set||N|
The interface for the DTH is rather straight forward and is consistent with other SmartThings devices, but there are a few custom buttons you should be familiar with:
|A||On/Off Indicator/Button||Just like an ordinary switch, this area not only shows the state of the switch, but also acts as a button to turn on or off the device with a tap|
|B||Version Number||This is informational and will show the version and date of the DTH.|
|C||Dimmer Indicator/Control||This is both an indicator of the dimmer level and a control. Tapping this icon will bring up a vertical slider that will allow you to set the dimmer level of the switch|
|D||Motion Detector||This is an indicator of the motion registered at the dimmer. Please note that the device may appear non-operational if the settings are turned off for the motion detector|
|E||Operation Mode Button||This indicates the current operation mode (Occupancy, Vacancy, Manual) for how the device reacts to motion. You can also tap this button to toggle the modes one at a time|
|F||Refresh||This refreshes the display when tapped. Some actions may require you to leave the DTH and come back into it to see the changes|
|G||Dashboard||This area shows you individual settings that could differ from your global device settings (due to other apps controlling aspects of the DTH)|
|H||Settings||This area allows you to access the advanced settings of the DTH (See: GE_Z-Wave_Motion_Sensor_Dimmer_Switch#Settings)|
The small section at the bottom of the main page is designated as a dashboard. This area shows settings that can be changed by other applications. If you see a double exclamation points (!!) appear in front of a setting, that means it differs from the settings you set up in the Settings area (or the default values if you haven't set up a specific value for some of the settings).
Please note If you are upgrading from a previous version, you MAY see an empty dashboard or simply two dashes (--). To resolve this, enter the Settings area and save the settings. Your dashboard should now be visible.
While a user can set the capabilities of the dimmer using the Settings area (GE_Z-Wave_Motion_Sensor_Dimmer_Switch#Settings), advanced users/developers can access many of these same settings from applications using the commands below. Many of these commands are already used in applications like WebCoRE or Ask Alexa. Changing these setting via other applications will display a log entry in SmartThings' Live Logging. Please note that all these commands are case-sensitive.
Just like an ordinary dimmer, you can use the standard SmartThings commands for lighting:
device.on() device.off() device.setLevel(value)
These 3 commands can be used to set the operating mode for the switch and how it reacts to motion (Vacancy, Occupancy, Manual). Please note that you MUST have the motion detector enabled in order to utilize some of these functions.
These commands set the operation mode to 'Vacant'. This means that the switch will NOT turn on automatically, but will turn off automatically based on the motion parameters you have set up. Please note there is no preference on which command you utilize; both will place the device into the 'Vacancy' operations mode.
These commands set the operation mode to 'Occupancy'. This means that the switch will turn on and off automatically based on the motion parameters you have set up. Please note there is no preference on which command you utilize; both will place the device into the 'Occupancy' operations mode.
This command set the operation mode to 'Manual'. This means that the switch will not turn on or off automatically.
This command is exclusive to the GE Z-Wave Motion Sensor Dimmer Switch and it allows you to programmatically define the level of the switch when it turns on. This is useful to 'reset' the switch to a default level when it is turned off in case it was set lower the last time it was used. If you change this to number and it differs than how you have it set within the device's settings area, a small "!!" will appear in your dashboard to indicate this.
These commands allow you to set the sensitivity of the motion sensor (when activated) via Groovy programming or through the WebCoRE interface. You can also turn the motion sense capability off using the device.setMotionSenseOff() command.
device.setMotionSenseLow() device.setMotionSenseMed() device.setMotionSenseHigh() device.setMotionSenseOff()
If you change this to a level (or off) that differs than how you have it set within the device's settings area, a small "!!" will appear in your dashboard to indicate this.
Please Note If you programmatically set the motion sense to anything but off and the motion sensor is currently disabled, this action will not only set the sensitively of the motion sensor, but it will also enable it.
These commands will programmatically set the light sensor. The light sensor is used while in "Occupancy" operational mode to determine if the light should come on in response to motion. If you change this setting and it differs than how you have it set within the device's settings area, a small "!!" will appear in your dashboard to indicate this.
These commands are only used in the "Occupancy" and "Vacancy" modes. "Timeout delay" is the amount of time after the motion sensor stops sensing motion that the lights will turn off. Instead of sending a specific time, there are commands for each of the options, from 5 seconds to 30 minutes. Any requirement of anything longer that 30 minutes and you should consider using the "Manual" mode with requires a ZWave (programmic) or physical push of the 'off' button to turn off the light. If you change this timeout and it differs than how you have it set within the device's settings area, a small "!!" will appear in your dashboard to indicate this.
device.setTimeout5Second() device.setTimeout1Minute() device.setTimeout5Minutes() device.setTimeout15Minutes() device.setTimeout30Minutes()
These commands allow you to control how the dimmer operates. You can turn the dimmer in to an on/off switch that will go from 0 to 100 and back to 0, with dimming capabilities disabled. This is useful when setting up a room where the normal operation (for example, during the day) is simply on or off. But at night, you can have it change to a dimmer (possibly using the default dim level (GE_Z-Wave_Motion_Sensor_Dimmer_Switch#Default_Level) for less harsh lighting in certain situations.
You may participate in the community discussion for this DTH here: