[OBSOLETE] Greenwave PowerNode 6

works now… thanks for your help

So, got some of these plugs from monoprice as it looked like a great deal

Be warned, though, that the firmware that comes with these seems to be < 4.28 & it is not updatable

That means that there’s no way to change the power failure state, which defaults to on (i.e. after a power failure, even if the sockets had all been turned off, they’ll all be on)

I confirmed with some debugging that parameterNumber > 2 returns nothing

More information on the parameters @ https://github.com/Roysteroonie/Hubitat/blob/master/GreenWave%20PowerNode%20(Single)%20Advanced.groovy

(Those are the true configuration values for the PowerNode; the zooz ones linked here don’t properly map)

Was able to get some code written for the GreenWave single socket to work with children

Seems to report power/usage a lot better; here’s the code for the parent:

And for the child:

Feel free to update/branch accordingly to make it better

This is working fantastic now with the the New Smartthings App.
Thanks

Decided to try your handler version, @marcosb, from a clean-slate. For some reason only -ch1 and -ch2 children are being detected when I go through the pairing process, do you have any idea why that would be?
@btaylor1211 did you add the PowerNode 6 to your network from scratch? Or was it more a matter of just changing an already registered device’s handlers over to this one?

I used these

I removed it from the Zwave by exclusion mode.
When I addded it back it only showed ch-1 and ch-2, however renaming the device added ch-3 and ch-4, then renamed again and finally added ch-5 and ch-6.
Not sure why it worked that way, but did so great.

1 Like

Weirdness, thanks for the tip I was able to get it nominally working using this method. I’m still having a network timeout issue when I try to utilize the on/off switch on the parent, but I’ll take what I can get.

Hey Guys,

So the above scripts do work for me as well and Indeed i had the same issue as @hoodah77.

Once i added the Greenwave PowerNode 6 in Smartthings i could see 2 sockets instead of 6. I went on the smartthings web interface - My Devices - (Device Name) - Edit and update.
You will see that one channel is added. You can do this a couple of times “Edit and Update” and you will have all your sockets. Just keep in mind that once you added the devices manually they will come in the Smartthings app under not assigned rooms.

I hope this helps.
Note: Those that worked on the script to make the PowerNote 6 work a very big thank you for making this possible. You guys are life changers :slight_smile:

Thank you so much!

I used the two most recent DHs (one for parent, and one for Child), and did the trick you describe above. The channels show up in the IDE, but they are not showing up in the app. The previous fix to comment out two lines (looks like 363, 364 ) appears to have been done. Any ideas?

Mine showed up on the bottom of the app in the “no room assigned” section, maybe that is it?

No- I double checked that and they definitely don’t show up there. In the IDE there are blanks for the child name and power, but no values and no way to edit them.

I switched it off and am getting this error in the live log:

76d98a18-9ef9-4756-868b-2cda84762542 10:48:08 AM: error physicalgraph.app.exception.UnknownDeviceTypeException: Device type ‘GreenWave PowerNode 6 Advanced Child’ in namespace ‘marcosb’ not found. @line 353 (addChildOutlet)

One update, I uninstalled and re-installed the two most recent DHs and excluded and re-included the power strip. This solved most of the problems, but I still see:

  1. The ones noted with all of the channels not showing up (the work around works fine)
  2. I also noticed that I had to cycle each child once to get the right status.
  3. The master does not control the whole group, even with the 255 value set. The error in line 735, appears to be the issue for this one: d5acea96-da6f-42a7-9041-daeb89ce354f 10:04:12 AM: error java.lang.NullPointerException: Cannot invoke method createEvent() on null object @line 735 (zwaveEvent)
  4. While moving one of the children to the right room, I got an error (but seems ok now):

d5acea96-da6f-42a7-9041-daeb89ce354f 9:21:36 AM: error groovy.lang.MissingMethodException: No signature of method: script_dth_14b1feadd134f329a6fbe0ce1c55219d87d46d3d7e94293aaae3b81e2baecb56.childReset() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [39-CH3]
Possible solutions: childRefresh(java.lang.Object) @line 344 (doCall)

FYI:

replace the vid line with the line below in both dths.
ocfDeviceType: “oic.d.smartplug”

1 Like

Thanks for that. The channels I have in use had been showing up, so it wasn’t a real problem.

I’m just assuming this is meant to remedy that problem, but if it actually fixes something completely different, thanks just the same.

I got this errro:org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
script_dth_metadata_c0de1f09_5704_41e9_a971_30ca1a4b75a3: 40: Invalid variable name. Must start with a letter but was: “oic
. At [40:24] @ line 40, column 24.
ocfDeviceType: “oic.d.smartplug”
^

1 error

Try removing the double quotes before and after.

That didn’t work either.

Can you paste the code you’re trying to change?

Here’s the child version:

/**

  • GreenWave PowerNode 6 Advanced (CHILD DEVICE)
  • Author:
  • Kevin LaFramboise (krlaframboise), Ulices Soriano (getterdone) tweaked for Greenwave, Marcos B (marcosb) additional GeenWave improvemens
  • Changelog:
  • 2.1.0 (11/05/2018)
  •  - Update parent when name changes.
    
  • 2.0.2 (10/16/2018)
  •  - Added support for changing the icon.
    
  • 2.0.1 (09/30/2018)
  •  - Initial Release
    
  • 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.

*/

metadata {
// Automatically generated. Make future change here.
definition (name: “GreenWave PowerNode 6 Advanced Child”, namespace: “marcosb”, author: “Marcos B”, cstHandler: true) {
}

definition (
	name: "GreenWave PowerNode 6 Advanced Child", 
	namespace: "marcosb", 
	author: "Marcos B",
    vid:"generic-switch-power-energy"

// ocfDeviceType: “oic.d.smartplug”
) {
capability “Actuator”
capability “Sensor”
capability “Switch”
capability “Outlet”
// capability “Acceleration Sensor”
capability “Power Meter”
capability “Energy Meter”
capability “Refresh”

	attribute "secondaryStatus", "string"
	attribute "energyTime", "number"
	attribute "energyDuration", "string"
    attribute "switch", "enum", ["on", "off", "poweringOn", "poweringOff"]
    attribute "latestValue", "enum", ["on", "off"]
			
	command "reset"
}

simulator { }	

tiles(scale: 2) {
	multiAttributeTile(name:"switch", type: "generic", width: 6, height: 4, canChangeIcon: true){
		tileAttribute ("device.switch", key: "PRIMARY_CONTROL") {
            attributeState "on", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#79b821", nextState:"turningOff"
            attributeState "off", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
            attributeState "turningOn", label:'Turning on', icon:"st.switches.switch.on", backgroundColor:"#79b821", nextState:"turningOff"
            attributeState "turningOff", label:'Turning off', icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
		}
		tileAttribute ("device.secondaryStatus", key: "SECONDARY_CONTROL") {
			attributeState "default", label:'${currentValue}'
		}
	}
	valueTile("energy", "device.energy", width: 2, height: 2) {
		state "energy", label:'${currentValue} kWh', backgroundColor: "#cccccc"
	}
	valueTile("power", "device.power", width: 2, height: 2) {
		state "power", label:'${currentValue} W', backgroundColor: "#cccccc"
	}
	standardTile("refresh", "device.refresh", width: 2, height: 2) {
		state "default", label:'Refresh', action: "refresh", icon:"st.secondary.refresh-icon"
	}
	standardTile("reset", "device.reset", width: 2, height: 2) {
		state "default", label:'Reset', action: "reset", icon:"st.secondary.refresh-icon"
	}
}

preferences { }

}

def installed() { }

def updated() {
parent.childUpdated(device.deviceNetworkId)
}

def on() {
parent.childOn(device.deviceNetworkId)
}

def off() {
parent.childOff(device.deviceNetworkId)
}

def refresh() {
parent.childRefresh(device.deviceNetworkId)
}

def reset() {
parent.childReset(device.deviceNetworkId)
}