Parent/Child device not actioning on/off

Hey all,

Wonder if someone could help here. I have a Greenwave (Z-wave) extension strip, with 5 plugs.
I ported the driver from ST, and managed to get the Parent and all 5 Childs installed no problem.

My issue is....

Using the switches on the Parent works fine, and the appropriate child device is updated to on/off.
However, switching on the plug from the child in the UI isnt.

This is the section of code for receiving the Child command.

def on() {
	log.debug "on"
	[    	
		zwave.basicV1.basicSet(value: 0xFF).format(),
		zwave.switchBinaryV1.switchBinaryGet().format(),
		"delay 3000",
		zwave.meterV2.meterGet(scale: 2).format()
	]
}
def off() {
	log.debug "off"
	[
		zwave.basicV1.basicSet(value: 0x00).format(),
		zwave.switchBinaryV1.switchBinaryGet().format(),
		"delay 3000",
		zwave.meterV2.meterGet(scale: 2).format()
	]
}
def on1() {
	switchOn(1)
}
def off1() {
	switchOff(1)
}
def on2() {
	switchOn(2)
}
def off2() {
	switchOff(2)
}
def on3() {
	switchOn(3)
}
def off3() {
	switchOff(3)
}
def on4() {
	switchOn(4)
}
def off4() {
	switchOff(4)
}
def on5() {
	switchOn(5)
}
def off5() {
	switchOff(5)
}
def on6() {
	switchOn(6)
}
def off6() {
	switchOff(6)
}

def switchOn(node) {
  log.debug "<FONT COLOR=RED>Turning on Powerstrip - ${device.deviceNetworkId} node ${node}, On$node</FONT>"
	def cmds = []
	cmds << new hubitat.device.HubAction(command(encap(zwave.basicV1.basicSet(value: 0xFF), node)))
	cmds << new hubitat.device.HubAction(command(encap(zwave.switchBinaryV1.switchBinaryGet(), node)))
	sendHubCommand(cmds)
}

def switchOff(node) {
  log.debug "<FONT COLOR=RED>Turning off Powerstrip - ${device.deviceNetworkId} node ${node}, off$node</FONT>"
	def cmds = []
	cmds << new hubitat.device.HubAction(command(encap(zwave.basicV1.basicSet(value: 0x00), node)))
	cmds << new hubitat.device.HubAction(command(encap(zwave.switchBinaryV1.switchBinaryGet(), node)))
	sendHubCommand(cmds)
}

Although I receive errors in the log from the above.

dev:49672019-08-27 17:28:12.331 errorgroovy.lang.MissingMethodException: No signature of method: user_driver_copycat73_GreenWave_PowerNode_6_3651.sendHubCommand() is applicable for argument types: (java.util.ArrayList) values: [[600D00012001FF, 600D00012502]]
Possible solutions: sendHubCommand(hubitat.device.HubAction), sendHubCommand(hubitat.device.HubMultiAction) on line 243 (switchOn)

I've also tried this, with more sucess (without errors), by comparing a lot of similar drivers, but the switches arent being turned off or on. Any help greatly appreciated.

	def switchOn(node) {
  log.debug "<FONT COLOR=RED>Turning on Powerstrip - ${device.deviceNetworkId} node ${node}, On$node</FONT>"
	def cmds = []
	cmds << new hubitat.device.HubAction(command(encap(zwave.basicV1.basicSet(value: 0xFF), node)))
	cmds << new hubitat.device.HubAction(command(encap(zwave.switchBinaryV1.switchBinaryGet(), node)))
	delayBetween(cmds, 200)

}

def switchOff(node) {
  log.debug "<FONT COLOR=RED>Turning off Powerstrip - ${device.deviceNetworkId} node ${node}, off$node</FONT>"
	def cmds = []
	cmds << new hubitat.device.HubAction(command(encap(zwave.basicV1.basicSet(value: 0x00), node)))
	cmds << new hubitat.device.HubAction(command(encap(zwave.switchBinaryV1.switchBinaryGet(), node)))
	delayBetween(cmds, 200)
}

Cheers
Roy

Might be that you are not defining the hub action protocol as mentioned in this post:

I know next to zero about properly coding a zwave driver, but saw the above post and figured it might be related.

1 Like

You get the errors because, in your code, the cmds structure is an array. You are filling the array with hubitat.device.HubAction structures. Your are then passing the array to sendHubCommand() which only accepts hubitat.device.HubAction or hubitat.device.HubMultiAction structures.

You need to convert the cmds array into a structure that can be accepted by the sendHubCommands() function.

see here

THIS topic may also be of help.

1 Like

Thanks for the tips both, sadly I'm no coder and just attempting to port it, as you saw I've run into this before, and havent gotten my head around it :frowning:

Np...I've had a lot of fun trying to port the inovelli zwave driver early last year (before ericm came over and did it correctly).

If you take a look at one of his drivers you will see he includes **hubitat.device.Protocol.ZWAVE ** in his hubAction statements.

The hubAction documentation also say

Create a HubAction object. While protocol is optional, it is recommended that it be provided. If it is not specified the system will default to the LAN protocol.

1 Like

I've been looking at those drivers :joy: Attempting to interpret them.

I updated the switch on/off for node 1 to this.

	def on1() {
	log.debug "Switch 1 On"
	zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:1, destinationEndPoint:1, commandClass:37, command:1, parameter:[255]).format()
}

def off1() {
	log.debug "Switch 1 Off"
	zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:1, destinationEndPoint:1, commandClass:37, command:1, parameter:[0]).format()
}

And now receive this error, which is coming from the child driver, and what I'd been thinking all along, the child isnt sending the correct data to the parent?

dev:50092019-08-28 18:09:11.058 errorgroovy.lang.MissingMethodException: No signature of method: user_driver_copycat73_GreenWave_PowerNode_6_3651.switchOff() is applicable for argument types: (java.lang.Integer) values: [1] on line 58 (switchOff)

This is the child, which I had assumed was sending the correct information.

def off() {
	log.debug "Switching off $device.label, $device.deviceNetworkId"
	parent.switchOff(splitChannel(device.deviceNetworkId))
}

private splitChannel(String channel) {
	channel.split("-e")[-1] as Integer
}

Well I guess its not, or something else isnt right. Two days I've been haggling with this bloody code :cry: Its the very last thing I have on ST.

Also, I see the drivers are all in one driver? This one is in two, a Parent and a child driver. The issue I have is the child, not performing the On/Off etc, yet the Parent performs this fine.

Maybe its best to combine the drivers? Hmmmm.

Post a link to the original driver and I'll skim it for anything obvious.

The driver I ported from ST originally was a Parent/child driver as well. I chose the one I posted because it was simple. Check out this one from Inovelli.

1 Like

I've been studying this one too :slight_smile:

This is the original Parent
https://raw.githubusercontent.com/CopyCat73/SmartThings-Dev/master/devicetypes/copycat73/greenwave-powernode-6.src/greenwave-powernode-6.groovy

And Child.
https://raw.githubusercontent.com/CopyCat73/SmartThings-Dev/master/devicetypes/copycat73/greenwave-powernode-6-child-device.src/greenwave-powernode-6-child-device.groovy

I updated the def createChildDevices() as this wasnt working on HE, which it now is.

Any helpmuch appreciated :+1:

It would also help if you could post the full sources of the parent and child driver that you're currently working on.

It looks like yout split function may be the culprit.

private splitChannel(String channel) {
	channel.split("-e")[-1] as Integer
}

should probably be

private splitChannel(String channel) {
	channel.split("-e")[1] as Integer
}

Although the negative index is technically valid, I have had issued with it in other drivers.

also, the "-e" may be an issue... the language parser may be interpreting the "-" as a special character... you could try "\-e" as the split term.

1 Like

Must have cross posted, links above :+1:

I meant your version of the code that you have been working on locally - the code in that repository still uses physicalgraph

1 Like

I'll need to clean that up a little, its a bit of a mess after todays attempts, but will do so as soon as I can, apprecaite the help. :+1:

Ok, quick cleanup.

Parent driver

/*****************************************************************************************************************
 *  Copyright: Nick Veenstra
 *
 *  Name: GreenWave PowerNode 6
 *
 *  Date: 2018-01-04
 *
 *  Version: 1.00
 *
 *  Source and info: https://github.com/CopyCat73/SmartThings/tree/master/devicetypes/copycat73/greenwave-powernode-6.src
 *
 *  Author: Nick Veenstra
 *  Thanks to David Lomas, Cooper Lee and Eric Maycock for code inspiration 
 *
 *  Description: Device handler for the GreenWave PowerNode (multi socket) Z-Wave power outlet
 *
 *  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.
 *
 *****************************************************************************************************************/
metadata {
	definition (name: "GreenWave PowerNode 6", namespace: "copycat73", author: "Nick Veenstra", ocfDeviceType: "oic.d.switch") {
		capability "Energy Meter"
		capability "Switch"
		capability "Power Meter"
		capability "Polling"
		capability "Refresh"
		capability "Configuration"
	
		attribute "switch", "string"
		attribute "switch1", "string"
		attribute "switch2", "string"
		attribute "switch3", "string"
		attribute "switch4", "string"
		attribute "switch5", "string"
		attribute "switch6", "string"
		attribute "power", "string"
		attribute "power1", "string"
		attribute "power2", "string"
		attribute "power3", "string"
		attribute "power4", "string"
		attribute "power5", "string"
		attribute "power6", "string"
		attribute "energy", "string"
		attribute "energy1", "string"
		attribute "energy2", "string"
		attribute "energy3", "string"
		attribute "energy4", "string"
		attribute "energy5", "string"
		attribute "energy6", "string"
		attribute "lastupdate", "string"

		command "on"
		command "off"
		command "on1"
		command "off1"
		command "on2"
		command "off2"
		command "on3"
		command "off3"
		command "on4"
		command "off4"
		command "on5"
		command "off5"
		//command "on6"
		//command "off6"
		command "reset"

		//fingerprint inClusters: "0x25,0x32"
		fingerprint mfr:"0099", prod:"0003", model:"0004", deviceJoinName: "GreenWave PowerNode 6"
		
	}
	
	preferences {
		// input name:"updateLight", type:"number", title:"After how many minutes the GreenWave device should start flashing if the controller didn't communicate with this device", defaultValue:255
	}
	
}
/*****************************************************************************************************************
 *  SmartThings System Commands:
 *****************************************************************************************************************/

def parse(String description) {
	def result = null
	def cmd = zwave.parse(description)
	if (cmd) {
		result = zwaveEvent(cmd)
		//log.debug "Parsed ${cmd} to ${result.inspect()}"
	} else {
		//log.debug "Non-parsed event: ${description}"
	}
	return result
}

def installed() {
	log.debug "installed"

	createChildDevices()

	//command(zwave.manufacturerSpecificV1.manufacturerSpecificGet())
	//command(zwave.configurationV1.configurationSet(configurationValue: [255], parameterNumber: 1, size: 1))

}

def uninstalled() {
	log.debug "uninstalled()"
	if (childDevices) {
		log.debug "removing child devices"
		removeChildDevices(getChildDevices())
	}
}

private removeChildDevices(delete) {
	delete.each {
		deleteChildDevice(it.deviceNetworkId)
	}
}

def refresh() {
	pollNodes()
}

def updated() {
	log.debug "updated()"
}


def initialize() {
	unschedule()
	runEvery5Minutes(pollNodes)
}

def createChildDevices() {
	log.debug "creating child devices"
		
	try {
	//Unomment 1..6 line below if a 6 strip, else Uncomment line 1..5 for a 5 strip
		//for (i in 1..6) {
		for (i in 1..5) {
		def node = i as String
		def devLabel = "Greenwave switch "+node
		addChildDevice("copycat73", "GreenWave PowerNode 6 Child Device", "${device.deviceNetworkId}-e${i}", [completedSetup: true, label: devLabel,
			isComponent: false, componentName: "switch$i", componentLabel: devLabel])
		}
	} catch (e) {
		log.debug "${e}"
		showAlert("Child device creation failed. Please make sure that the \"GreenWave PowerNode 6 Child Device\" is installed and published.","childDeviceCreation","failed")
	}
}

private showAlert(text,name,value) {
	sendEvent(
		descriptionText: text,
		eventType: "ALERT",
		name: name,
		value: value,
		displayed: true,
	)
}

def configure() {
	log.debug "configure()"
	def cmds = []
	cmds << zwave.configurationV1.configurationSet(configurationValue: [255], parameterNumber: 1, size: 1).format()
	delayBetween(cmds)
}


def on() {
	log.debug "on"
	[    	
		zwave.basicV1.basicSet(value: 0xFF).format(),
		zwave.switchBinaryV1.switchBinaryGet().format(),
		"delay 3000",
		zwave.meterV2.meterGet(scale: 2).format()
	]
}
def off() {
	log.debug "off"
	[
		zwave.basicV1.basicSet(value: 0x00).format(),
		zwave.switchBinaryV1.switchBinaryGet().format(),
		"delay 3000",
		zwave.meterV2.meterGet(scale: 2).format()
	]
}
def on1() {
	switchOn(1)
}
def off1() {
	switchOff(1)
}
def on2() {
	switchOn(2)
}
def off2() {
	switchOff(2)
}
def on3() {
	switchOn(3)
}
def off3() {
	switchOff(3)
}
def on4() {
	switchOn(4)
}
def off4() {
	switchOff(4)
}
def on5() {
	switchOn(5)
}
def off5() {
	switchOff(5)
}
def on6() {
	switchOn(6)
}
def off6() {
	switchOff(6)
}

def switchOn(node) {

	def cmds = []
	cmds << new hubitat.device.HubAction(command(encap(zwave.basicV1.basicSet(value: 0xFF), node)))
	cmds << new hubitat.device.HubAction(command(encap(zwave.switchBinaryV1.switchBinaryGet(), node)))
	sendHubCommand(cmds)
}

def switchOff(node) {
	def cmds = []
	cmds << new hubitat.device.HubAction(command(encap(zwave.basicV1.basicSet(value: 0x00), node)))
	cmds << new hubitat.device.HubAction(command(encap(zwave.switchBinaryV1.switchBinaryGet(), node)))
	sendHubCommand(cmds)
}


def poll() {
	pollNodes()
}

def pollNodes() {

	log.debug "<FONT COLOR=RED>Polling Powerstrip - ${device.label}</FONT>"
	def cmds = []
	for ( i in 1..5 ) { 
		cmds << new hubitat.device.HubAction(command(encap(zwave.switchBinaryV1.switchBinaryGet(), i)))
		cmds << new hubitat.device.HubAction(command(encap(zwave.meterV2.meterGet(scale:0),i)))
		cmds << new hubitat.device.HubAction(command(encap(zwave.meterV2.meterGet(scale:2), i)))
	}
	cmds << zwave.switchBinaryV1.switchBinaryGet().format() 
	cmds << zwave.meterV2.meterGet(scale:0).format()
	cmds << zwave.meterV2.meterGet(scale:2).format()
	delayBetween(cmds,1000) 
}

def pollNode(endpoint)  {

	log.debug "<FONT COLOR=RED>Polling Powerstrip - ${device.label} node ${endpoint}</FONT>"
	def cmds = []
	cmds << new hubitat.device.HubAction(command(encap(zwave.switchBinaryV1.switchBinaryGet(), endpoint)))
	cmds << new hubitat.device.HubAction(command(encap(zwave.meterV2.meterGet(scale:0), endpoint)))
	cmds << new hubitat.device.HubAction(command(encap(zwave.meterV2.meterGet(scale:2), endpoint)))
	sendHubCommand(cmds)
}

def updateChildLabel(endpoint) {
	log.debug "update tile label for endpoint $endpoint"
	// tbd
}

def lastUpdated(time) {
	def timeNow = now()
	def lastUpdate = ""
	if(location.timeZone == null) {
		log.debug "Cannot set update time : location not defined in app"
	}
	else {
		lastUpdate = new Date(timeNow).format("MMM dd yyyy HH:mm", location.timeZone)
	}
	return lastUpdate
}

def ping() {
	log.debug "ping() called"
	refresh()
}

def reset() {
	log.debug "<FONT COLOR=RED>Resetting kWh for all endpoints</FONT>"
	def cmds = []
	for ( i in 1..5 ) { 
		cmds << new hubitat.device.HubAction(command(encap(zwave.meterV2.meterReset(), i)))
		cmds << new hubitat.device.HubAction(command(encap(zwave.meterV2.meterGet(scale:0),i)))
	}
	cmds << new hubitat.device.HubAction(command(zwave.meterV2.meterReset()))
	cmds << new hubitat.device.HubAction(command(zwave.meterV2.meterGet(scale:0)))
	sendHubCommand(cmds)
}

def resetNode(endpoint) {
	log.debug "<FONT COLOR=RED>Resetting kWh for endpoint $endpoint</FONT>"
	def cmds = []
	cmds << new hubitat.device.HubAction(command(encap(zwave.meterV2.meterReset(), endpoint)))
	cmds << new hubitat.device.HubAction(command(encap(zwave.meterV2.meterGet(scale:0),endpoint)))
	sendHubCommand(cmds)
}


private encap(cmd, endpoint) {
	if (endpoint) {
		zwave.multiChannelV3.multiChannelCmdEncap(destinationEndPoint:endpoint).encapsulate(cmd)
	} else {
		cmd
	}
}

private command(hubitat.zwave.Command cmd) {
	if (state.sec) {
		zwave.securityV1.securityMessageEncapsulation().encapsulate(cmd).format()
	} else {
		cmd.format()
	}
}

private commands(commands, delay=1000) {
	delayBetween(commands.collect{ command(it) }, delay)
}

/*****************************************************************************************************************
 *  Z-wave Event Handlers.
 *****************************************************************************************************************/


def zwaveEvent(hubitat.zwave.commands.basicv1.BasicReport cmd, ep=null)
{
	//log.debug "Greenwave v1 basic report received"
	if (ep) {
		def childDevice = childDevices.find{it.deviceNetworkId == "$device.deviceNetworkId-e$ep"}
		if (childDevice)
		childDevice.sendEvent(name: "switch", value: cmd.value ? "on" : "off")
	} else {
		def result = createEvent(name: "switch", value: cmd.value ? "on" : "off", type: "digital")
		def cmds = []
		cmds << encap(zwave.switchBinaryV1.switchBinaryGet(), 1)
		cmds << encap(zwave.switchBinaryV1.switchBinaryGet(), 2)
		
		return result
	}
}

def zwaveEvent(hubitat.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd, ep=null) {
   
   //log.debug "Greenwave v1 switchbinary report received for endpoint $ep value $cmd.value"
   if (ep) {
		def childDevice = childDevices.find{it.deviceNetworkId == "$device.deviceNetworkId-e$ep"}
		if (childDevice)
			childDevice.sendEvent(name: "switch", value: cmd.value ? "on" : "off")
			childDevice.sendEvent(name: 'lastupdate', value: lastUpdated(now()), unit: "")
	} else {
		def result = createEvent(name: "switch", value: cmd.value ? "on" : "off", type: "digital")
		sendEvent(name: 'lastupdate', value: lastUpdated(now()), unit: "")
		def cmds = []
		cmds << encap(zwave.switchBinaryV1.switchBinaryGet(), 1)
		cmds << encap(zwave.switchBinaryV1.switchBinaryGet(), 2)
		
		return result
	}
}

def zwaveEvent(hubitat.zwave.commands.meterv3.MeterReport cmd, ep=null)
{
	//log.debug "Greenwave v3 meter report received for endpoint $ep scale $cmd.scale value $cmd.scaledMeterValue"
	def result
	def cmds = []
	if (cmd.scale == 0) {
		result = [name: "energy", value: cmd.scaledMeterValue, unit: "kWh"]
	} else if (cmd.scale == 1) {
		result = [name: "energy", value: cmd.scaledMeterValue, unit: "kVAh"]
	} else {
		result = [name: "power", value: cmd.scaledMeterValue, unit: "W"]
	}
	if (ep) {
		def childDevice = childDevices.find{it.deviceNetworkId == "$device.deviceNetworkId-e$ep"}
		if (childDevice)
			childDevice.sendEvent(result)
	} else {
	   sendEvent(name: 'lastupdate', value: lastUpdated(now()), unit: "")
	   sendEvent(result)
	   (1..5).each { endpoint ->
			cmds << encap(zwave.meterV2.meterGet(scale: 0), endpoint)
			cmds << encap(zwave.meterV2.meterGet(scale: 2), endpoint)
	   }
	   
	   return result
	}
}



def zwaveEvent(hubitat.zwave.commands.multichannelv3.MultiChannelCmdEncap cmd) {
	
	//log.debug "Greenwave v3 cMultiChannelCmdEncap command received"
	def encapsulatedCommand = cmd.encapsulatedCommand([0x30: 1, 0x31: 1]) 
	if (encapsulatedCommand) {
		return zwaveEvent(encapsulatedCommand,cmd.sourceEndPoint)
	}   
}


def zwaveEvent(hubitat.zwave.commands.configurationv1.ConfigurationReport cmd) {
	//log.debug "Greenwave v1 configuration report received"
}

def zwaveEvent(hubitat.zwave.commands.configurationv2.ConfigurationReport cmd) {
	//log.debug "Greenwave v2 configuration report received"
}


def zwaveEvent(hubitat.zwave.commands.multichannelv3.MultiChannelCapabilityReport cmd) {
	//log.debug "Greenwave v3 multi channel capability report received"
}

Child driver

/*****************************************************************************************************************
 *  Copyright: Nick Veenstra
 *
 *  Name: GreenWave PowerNode 6 Child Device
 *
 *  Date: 2018-01-04
 *
 *  Version: 1.00
 *
 *  Source and info: https://github.com/CopyCat73/SmartThings/tree/master/devicetypes/copycat73/greenwave-powernode-6-child-device.src
 *
 *  Author: Nick Veenstra
 *  Thanks to Eric Maycock for code inspiration 
 *
 *  Description: Device handler for the GreenWave PowerNode (multi socket) Z-Wave power outlet child nodes
 *
 *  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.
 *
 *****************************************************************************************************************/
metadata {
	definition (name: "GreenWave PowerNode 6 Child Device", namespace: "copycat73", author: "Nick Veenstra") {
		capability "Switch"
		capability "Energy Meter"
		capability "Power Meter"
		capability "Refresh"
		
		attribute "lastupdate", "string"
		command "reset"
	}
}

def installed() {
	log.debug "Greenwave child installed"
}

def updated() {
	log.debug "Greenwave child updated"
	//log.debug "device name $device.label"
	parent.updateChildLabel(splitChannel(device.deviceNetworkId))
	
}

def on() {
	parent.switchOn(splitChannel(device.deviceNetworkId))
}

def off() {
	parent.switchOff(splitChannel(device.deviceNetworkId))
}

def refresh() {
	log.debug "refresh called for $device.deviceNetworkId"
	parent.pollNode(splitChannel(device.deviceNetworkId))
}

def reset() {
	log.debug "reset called for $device.deviceNetworkId"
	parent.resetNode(splitChannel(device.deviceNetworkId))
}

private splitChannel(String channel) {
	channel.split("-e")[-1] as Integer
}

The code looks fine to me, my only suggestion would be for the switchOn() and switchOff() methods of the parent, change the definition to be

switchOn(Integer node)

etc.

If it still doesn't work then my only other suggestion would be to change the isComponent: false to be true in the createChildDevices() method

1 Like

Many thanks @rob, I’ll try the suggestions in the morning. UK time here.

Same here :slight_smile:

1 Like

Thank you Sir, I’ll also give that a try :+1:

Thanks @stephack, @rob and @cybrmage for the suggestions. I've attempted all today, sadly without much success.

If I turn the switches on from the Parent, the Child switches all show the correct data in each device. Yet attempting any action in the Child device doesnt execute anything, but I am seeing an error.

dev:50642019-08-29 19:09:06.843 errorFor input string: "62-e1"
dev:50642019-08-29 19:09:06.842 errorFor input string: "62-e1"
dev:50642019-08-29 19:09:06.767 debugSwitching off Greenwave switch 1, 62-e1
--- Live Log Started, waiting for events ---

This is with the split as:-
private splitChannel(String channel) {
channel.split("-e")[-1] as Integer
}

If I change that to toInteger

private splitChannel(String channel) {
channel.split("-e")[-1].toInteger()
}

I get the same.

dev:50642019-08-29 19:11:30.323 errorFor input string: "62-e1"
dev:50642019-08-29 19:11:30.321 errorFor input string: "62-e1"
dev:50642019-08-29 19:11:30.300 debugSwitching off Greenwave switch 1, 62-e1

Really not sure whats wrong here, but what is odd, despite the error, I see this for the Parent device.

dev:50632019-08-29 19:11:30.311 debugTurning off Powerstrip - 62 node 1, off1
dev:50632019-08-29 19:09:06.781 debugTurning off Powerstrip - 62 node 1, off1

So it does appear to be executing correctly, yet not performing anything. I depair with these damn Greenwave devices, but when working they are good. :expressionless: