The GE Z-Wave Motion Sensor Switch is combination on/off 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
- 1.1 Latest Version
- 1.2 SmartThings App Notice
- 1.3 Open Source License/Trademarks
- 2 Installation
- 2.1 Advanced Installation
- 3 Settings
- 3.1 General SmartThings Options
- 3.2 DTH Specific Options
- 4 Interface
- 4.1 Dashboard
- 5 Developer Notes
- 5.1 On/Off
- 5.2 Operating Mode
- 5.2.1 Vacancy
- 5.2.2 Occupancy
- 5.2.3 Manual
- 5.3 Motion Sense
- 5.4 Light Sense
- 5.5 Timeout Delay
- 6 Community Discussion
Product: GE Z-Wave Motion Sensor Switch (Model 26931)
Capabilities: Motion Sensor, on/off Switch
Type: In-wall mounted on/off switch with motion sensor capabilities
Protocol: Z-wave Plus
Device Type Author: MichaelStruck (talk) 17:02, 3 January 2016 (EST) with code originally from @mlebaugh
ST Community Handle: https://community.smartthings.com/users/michaels/activity
Contributions: @Darwin (Motion Sensitivity Settings, programming interface, double press, testing) @Nathancu (Interface, functionality and Samsung Application Compatibility), @panchy345 (button capability testing)
The latest version of the device code is as follows (as of 9/16/20):
GE Z-Wave Motion Sensor Switch DTH: Version: 1.0.9 https://raw.githubusercontent.com/MichaelStruck/SmartThingsPublic/master/devicetypes/michaelstruck/ge-motion-switch-26931.src/ge-motion-switch-26931.groovy
SmartThings App Notice
The instructions listed here, unless otherwise noted, apply to the SmartThings "Legacy" application. An attempt has been made in this document to give example of behavior of the DTH in both the Legacy application and the newer "Samsung" SmartThings application. However, it should be noted that while there is functional parity of the GE devices with this DTH, GUI interface differences are present.
Open Source License/Trademarks
Licensed under the Apache License, Version 2.0 (the "License"); you may not use the GE Z-Wave Motion Sensor 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 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 Switch only needs to be installed in this manner once; you can add multiple Z-Wave Motion Sensor Switches 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 Switch: devicetypes/michaelstruck/ge-motion-switch-26931.src/ge-motion-switch-26931.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 (See Item "F" on GE_Z-Wave_Motion_Sensor_Switch#Interface), you can access some of the advanced settings for the DTH.
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.
|Operating Mode||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 operating 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'||N|
|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 three). 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 1 second, then press 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 thi or chose a time between 10 seconds to 27 minutes. The default is 20 seconds. Please Note: If this parameter is disabled, the motion detection sent to SmartThings is effectively disabled. However, the light WILL come on if you enter a room if you have the Occupancy mode set and turn off based on the timeout duration.||N|
|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|
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||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|
|D||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|
|E||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|
|F||Dashboard||This area shows you individual settings that could differ from your global device settings (due to other apps controlling aspects of the DTH)|
|G||Settings||This area allows you to access the advanced settings of the DTH (See: GE_Z-Wave_Motion_Sensor_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.
SmartThing Version Notification As stated in the section GE_Z-Wave_Motion_Sensor_Switch#SmartThings_App_Notice the dashboard is only visible within the "Legacy" SmartThings application. While the settings will apply to the device and should function properly, there is currently no way to display the devices' dashboard or any custom notifications within the newer "Samsung" SmartThings application.
While a user can set the capabilities of the dimmer using the Settings area (GE_Z-Wave_Motion_Sensor_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 switch, you can use the standard SmartThings commands for lighting:
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.
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.
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.
You may participate in the community discussion for this DTH here: