GreenWave PowerNode (Single) (NS210-G-EN)
https://github.com/codersaur/SmartThings/tree/master/devices/greenwave-powernode-single
Copyright (c) David Lomas
Overview
An advanced SmartThings device handler for the GreenWave PowerNode (Single socket) Z-Wave power outlet. Firmware versions 4.23 / 4.28.Key features:
- Instantaneous Power and Accumulated Energy reporting.
- Room Colour indicator tile.
- Blink function for easy identification of the physical power outlet.
- Physical and RF protection modes can be configured using the SmartThings GUI.
- Sync tile indicates when all configuration options are successfully synchronised with the physical device.
- Fault tile indicates overload / hardware errors.
- All Z-Wave parameters can be configured using the SmartThings GUI.
- Auto-off timer function.
- Logger functionality enables critical errors and warnings to be saved to the logMessage attribute.
- Extensive inline code comments to support community development.
Installation
-
Follow these instructions to install the device handler in the SmartThings IDE.
-
From the SmartThings app on your phone, edit the device settings to suit your installation and hit Done.
Settings
General Settings:
-
IDE Live Logging Level: Set the level of log messages shown in the SmartThings IDE Live Logging tab. For normal operation Info or Warning is recommended, if troubleshooting use Debug or Trace.
-
Device Logging Level: Set the level of log messages that will be recorded in the device's logMessage attribute. This offers a way to review historical messages without having to keep the IDE Live Logging screen open. To prevent excessive events, the maximum level supported is Warning.
-
Force Full Sync: By default, only settings that have been modified will be synchronised with the device. Enable this setting to force all device parameters and association groups to be re-sent to the device.
-
Timer Function (Auto-off): Automatically switch off the device after a specified time. Note, this is scheduled in SmartThings and is not a native function of the physical device.
-
Ignore Current Leakage Alarms: The PowerNode is eager to raise current leakage alarms. Enable this setting to ignore them.
-
ALL ON/ALL OFF Function: Control the device's response to SWITCH_ALL_SET commands.
Device Parameters:
The settings in this section can be used to specify the value of all writable device parameters. It is recommended to consult the manufacturer's manual for a full description of each parameter.
If no value is specified for a parameter, then it will not be synched with the device and the existing value in the device will be preserved.
Power Report Threshold:
Determines the percentage change in power consumption that will trigger a report to be sent by the device. IMPORTANT: Be careful not to set this value too low, as the device will send reports every second causing network congestion! It is recommended to use a value between 30% and 50%.
Keep-Alive Time:
It is recommended to set this setting to 255 minutes to prevent the Circle LED from flashing.
State After Power Failure:
Determine the power state to be restored after a power failure. Only supported with firmware v4.28+
LED for Network Error:
Determine if the LED will indicate network errors. Only supported with firmware v4.28+
GUI
Main Tile:
The main tile indicates the switch state. Tap it to toggle the switch on and off.
Power and Energy Tiles:
These tiles display the instantaneous power consumption of the device (Watts) and the accumulated energy consumption (KWh). The Now: tile can be tapped to force the device state to be refreshed. The Since: ... tile can be tapped to reset the Accumulated Energy figure.
Room Colour Wheel Tile:
This tile mirrors the Room Colour Wheel on the bottom right of the physical power outlet.
Blink Tile:
The Blink tile will cause the Circle LED on the outlet to blink for ~20 seconds. This is useful to identify the physical device.
Local Protection Tile:
This tile toggles the local protection state. This can be used to prevent unintentional control (e.g. by a child), by disabling the physical power switch on the device.
RF Protection Tile:
This tile toggles the RF protection state. Enabling RF Protection means the device will not respond to wireless commands from other Z-Wave devices, including on/off commands issued via the SmartThings app.
Sync Tile:
This tile indicates when all configuration settings have been successfully synchronised with the physical device.
Fault Tile:
The Fault tile indicates if the device has reported any faults. These may include load faults, firmware, or hardware issues. Once any faults have been investigated and remediated, the tile can be tapped to clear the fault status.
SmartApp Integration
Attributes:
The device handler publishes the following attributes:
- switch [ENUM]: Switch status [on, off].
- power [NUMBER]: Instantaneous power consumption (Watts).
- energy [NUMBER]: Accumulated energy consumption (kWh).
- energyLastReset [STRING]: Last time Accumulated Energy was reset.
- fault [STRING]: Indicates if the device has any faults. 'clear' if no active faults.
- localProtectionMode [ENUM]: Physical protection mode [unprotected, sequence, noControl].
- rfProtectionMode [ENUM]: Wireless protection mode [unprotected, noControl, noResponse].
- logMessage [STRING]: Important log messages.
- syncPending [NUMBER]: The number of configuration items that need to be synced with the physical device. 0 if the device is fully synchronised.
- wheelStatus [ENUM]: Status of the Room Colour Wheel [black, white, green, ...]
Commands:
The device exposes the following commands which can be called from a SmartApp:
- on(): Turn the switch on.
- off(): Turn the switch off.
- refresh(): Refresh device state.
- resetTamper(): Clear any tamper alerts.
- blink(): Causes the Circle LED to blink for ~20 seconds.
- reset(): Alias for resetEnergy().
- resetEnergy(): Reset accumulated energy figure to 0.
- resetFault(): Reset fault alarm to 'clear'.
- setLocalProtectionMode(): Set physical protection mode.
- toggleLocalProtectionMode(): Toggle physical protection mode.
- setRfProtectionMode(): Set wireless protection mode.
- toggleRfProtectionMode(): Toggle wireless protection mode.
Version History
2017-03-08: v1.01
- getParamsMd(): set fwVersion to 4.22, for parameters #0,#1, and #2.
2017-03-05: v1.00
- Initial version.
Physical Device Notes
General notes concerning the GreenWave PowerNode:
- The device is generally poor at reporting physical switch events (reports are typically delayed by 10-20s). To work round the issue, this device handler will request BinarySwitchReports if a meter report indicates that there has been a change in state.
- The device seems to send a lot of Meter Reports. It is important to be cautious setting parameter #0, to avoid spamming the Z-Wave network. Ideally, there should be a parameter to control the power reporting interval.
- The device reports Current Leakage alarms frequently, hence this device handler has an option to ignore them.
- There does not appear to be any way (in software) to turn off the white power button LED, so this device isn't great for use in bedrooms as it lights up dark rooms. If anyone has a solution, please let me know!
References
Some useful links relevant to the development of this device handler:
License
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
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.














