PowerNode plug (GreenWave) to power trigg?

Hello

I have a GreenWave Single NodePower plug. And wondering how I can get it to measure power consumption?

Can I get it in SmartApp so I can see the electricity consumption in the socket? For now, only On and Off available in SmartApp.

Looking for a good app so I can get the feel of the engine heater cord so the cable is plugged in the car, and to send me notification in case I forgot to plugged the cable in.

Im new at this, so please forgive me :slight_smile:

I have the Greenwave 6 Node power plug version, I too am hoping someone has written a Device Handler for this thing, as I only have a on/off function also, it would be great to be able to control each of the 6 nodes independently via Smartthings.

Me to i can only control the first node. Is there some info about this?

I can control al 6 nodes seperatly now. But stil no power information.

How did you make the powernode-6 work to be able to switch them seperately?

I used this handler:

/**

  • Copyright 2015 SmartThings
  • 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”, namespace: “greenwave”, author: “Micha”) {
capability “Switch”
capability “Energy Meter”
capability “Power Meter”
capability “Refresh”
capability “Configuration”
capability “Actuator”
capability “Sensor”

  command "reset"
  (1..6).each { n ->
  	attribute "switch$n", "enum", ["on", "off"]
  	attribute "power$n", "number"
  	attribute "energy$n", "number"
  	command "on$n"
  	command "off$n"
  	command "reset$n"
  }
  fingerprint deviceId: "0x1001", inClusters: "0x25,0x32,0x27,0x70,0x85,0x72,0x86,0x60", outClusters: "0x82"

}

// simulator metadata
simulator {
status “on”: “command: 2003, payload: FF”
status “off”: “command: 2003, payload: 00”
status “switch1 on”: “command: 600D, payload: 01 00 25 03 FF”
status “switch1 off”: “command: 600D, payload: 01 00 25 03 00”
status “switch6 on”: “command: 600D, payload: 06 00 25 03 FF”
status “switch6 off”: “command: 600D, payload: 06 00 25 03 00”
status “power”: new physicalgraph.zwave.Zwave().meterV1.meterReport(
scaledMeterValue: 30, precision: 3, meterType: 4, scale: 2, size: 4).incomingMessage()
status “energy”: new physicalgraph.zwave.Zwave().meterV1.meterReport(
scaledMeterValue: 200, precision: 3, meterType: 0, scale: 0, size: 4).incomingMessage()
status “power1”: “command: 600D, payload: 0100” + new physicalgraph.zwave.Zwave().meterV1.meterReport(
scaledMeterValue: 30, precision: 3, meterType: 4, scale: 2, size: 4).format()
status “energy2”: “command: 600D, payload: 0200” + new physicalgraph.zwave.Zwave().meterV1.meterReport(
scaledMeterValue: 200, precision: 3, meterType: 0, scale: 0, size: 4).format()

  // reply messages
  reply "2001FF,delay 100,2502": "command: 2503, payload: FF"
  reply "200100,delay 100,2502": "command: 2503, payload: 00"

}

// tile definitions
tiles {
standardTile(“switch”, “device.switch”, width: 2, height: 2, canChangeIcon: true) {
state “on”, label: ‘${name}’, action: “switch.off”, icon: “st.switches.switch.on”, backgroundColor: “#79b821”
state “off”, label: ‘${name}’, action: “switch.on”, icon: “st.switches.switch.off”, backgroundColor: “#ffffff”
}
valueTile(“power”, “device.power”, decoration: “flat”) {
state “default”, label:‘${currentValue} W’
}
valueTile(“energy”, “device.energy”, decoration: “flat”) {
state “default”, label:‘${currentValue} kWh’
}
standardTile(“reset”, “device.energy”, inactiveLabel: false, decoration: “flat”) {
state “default”, label:‘reset kWh’, action:“reset”
}
standardTile(“refresh”, “device.power”, inactiveLabel: false, decoration: “flat”) {
state “default”, label:‘’, action:“refresh.refresh”, icon:“st.secondary.refresh”
}
standardTile(“switch1”, “switch1”, width: 2, height: 2, canChangeIcon: true) {
state “on”, label: ‘${name}’, action: “switch1.off”, icon: “st.switches.switch.on”, backgroundColor: “#79b821”
state “off”, label: ‘${name}’, action: “switch1.on”, icon: “st.switches.switch.off”, backgroundColor: “#ffffff”
}

  /*(1..6).each { n ->
  	standardTile("switch$n", "switch$n", canChangeIcon: true) {
        	state "off", label: '${name}', action: "on$n", icon: "st.switches.switch.off", backgroundColor: "#ffffff"
  		state "on", label: '${name}', action: "off$n", icon: "st.switches.switch.on", backgroundColor: "#79b821"
  	}
  	valueTile("power$n", "power$n", decoration: "flat") {
  		state "default", label:'${currentValue} W'
  	}
  	valueTile("energy$n", "energy$n", decoration: "flat") {
  		state "default", label:'${currentValue} kWh'
  	}
  }

*/
main([“switch”, “power”, “energy”, “switch1”, “switch2”, “switch3”, “switch4”, “switch5”, “switch6”])
details([“switch”,“power”,“energy”,
“switch1”,“power1”,“energy1”,
“switch2”,“power2”,“energy2”,
“switch3”,“power3”,“energy3”,
“switch4”,“power4”,“energy4”,
“switch5”,“power5”,“energy5”,
“switch6”,“power6”,“energy6”,
“refresh”,“reset”])
}
}

def parse(String description) {
def result = null
if (description.startsWith(“Err”)) {
result = createEvent(descriptionText:description, isStateChange:true)
} else if (description != “updated”) {
def cmd = zwave.parse(description, [0x60: 3, 0x32: 3, 0x25: 1, 0x20: 1])
if (cmd) {
result = zwaveEvent(cmd, null)
}
}
log.debug “parsed ‘${description}’ to ${result.inspect()}”
result
}

def endpointEvent(endpoint, map) {
if (endpoint) {
map.name = map.name + endpoint.toString()
}
createEvent(map)
}

def zwaveEvent(physicalgraph.zwave.commands.multichannelv3.MultiChannelCmdEncap cmd, ep) {
def encapsulatedCommand = cmd.encapsulatedCommand([0x32: 3, 0x25: 1, 0x20: 1])
if (encapsulatedCommand) {
if (encapsulatedCommand.commandClassId == 0x32) {
// Metered outlets are numbered differently than switches
Integer endpoint = cmd.sourceEndPoint
if (endpoint > 2) {
zwaveEvent(encapsulatedCommand, endpoint - 2)
} else if (endpoint == 0) {
zwaveEvent(encapsulatedCommand, 0)
} else {
log.debug(“Ignoring metered outlet $endpoint msg: $encapsulatedCommand”)

}
} else {
zwaveEvent(encapsulatedCommand, cmd.sourceEndPoint as Integer)
}
}
}

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd, endpoint) {
def map = [name: “switch”, type: “physical”, value: (cmd.value ? “on” : “off”)]
def events = [endpointEvent(endpoint, map)]
def cmds =
if (endpoint) {
cmds += delayBetween([2,0].collect { s → encap(zwave.meterV3.meterGet(scale: s), endpoint) }, 1000)
if(endpoint < 4) cmds += [“delay 1500”, encap(zwave.basicV1.basicGet(), endpoint + 1)]
} else if (events[0].isStateChange) {
events += (1
4).collect { ep → endpointEvent(ep, map.clone()) }
cmds << “delay 3000”
cmds += delayBetween((0
4).collect { ep → encap(zwave.meterV3.meterGet(scale: 2), ep) }, 800)
}
if(cmds) events << response(cmds)
events
}

def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd, endpoint) {
def map = [name: “switch”, value: (cmd.value ? “on” : “off”)]
def events = [endpointEvent(endpoint, map)]
def cmds =
if (!endpoint && events[0].isStateChange) {
events += (1
4).collect { ep → endpointEvent(ep, map.clone()) }
cmds << “delay 3000”
cmds += delayBetween((1
4).collect { ep → encap(zwave.meterV3.meterGet(scale: 2), ep) })
}
if(cmds) events << response(cmds)
events
}

def zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport cmd, ep) {
def event = [:]
def cmds =
if (cmd.scale < 2) {
def val = Math.round(cmd.scaledMeterValue*100)/100.0
event = endpointEvent(ep, [name: “energy”, value: val, unit: [“kWh”, “kVAh”][cmd.scale]])
} else {
event = endpointEvent(ep, [name: “power”, value: Math.round(cmd.scaledMeterValue), unit: “W”])
}
if (!ep && event.isStateChange && event.name == “energy”) {
// Total strip energy consumption changed, check individual outlets
(1
4).each { endpoint →
cmds << encap(zwave.meterV2.meterGet(scale: 0), endpoint)
cmds << “delay 400”
}
}
cmds ? [event, response(cmds)] : event
}

def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd, ep) {
updateDataValue(“MSR”, String.format(“%04X-%04X-%04X”, cmd.manufacturerId, cmd.productTypeId, cmd.productId))
null
}

def zwaveEvent(physicalgraph.zwave.Command cmd, ep) {
log.debug “${device.displayName}: Unhandled ${cmd}” + (ep ? " from endpoint $ep" : “”)
}

def onOffCmd(value, endpoint = null) {
[
encap(zwave.basicV1.basicSet(value: value), endpoint),
“delay 500”,
encap(zwave.switchBinaryV1.switchBinaryGet(), endpoint),
“delay 3000”,
encap(zwave.meterV3.meterGet(scale: 2), endpoint)
]
}

def on() { onOffCmd(0xFF) }
def off() { onOffCmd(0x0) }

def on1() { onOffCmd(0xFF, 1) }
def on2() { onOffCmd(0xFF, 2) }
def on3() { onOffCmd(0xFF, 3) }
def on4() { onOffCmd(0xFF, 4) }
def on5() { onOffCmd(0xFF, 5) }
def on6() { onOffCmd(0xFF, 6) }

def off1() { onOffCmd(0x0, 1) }
def off2() { onOffCmd(0x0, 2) }
def off3() { onOffCmd(0x0, 3) }
def off4() { onOffCmd(0x0, 4) }
def off5() { onOffCmd(0x0, 5) }
def off6() { onOffCmd(0x0, 6) }

def refresh() {
delayBetween([
zwave.basicV1.basicGet().format(),
zwave.meterV3.meterGet(scale: 0).format(),
zwave.meterV3.meterGet(scale: 2).format(),
encap(zwave.basicV1.basicGet(), 1) // further gets are sent from the basic report handler
])
}

def resetCmd(endpoint = null) {
delayBetween([
encap(zwave.meterV2.meterReset(), endpoint),
encap(zwave.meterV2.meterGet(scale: 0), endpoint)
])
}

def reset() {
delayBetween([resetCmd(null), reset1(), reset2(), reset3(), reset4(), reset5(), reset6()])
}

def reset1() { resetCmd(1) }
def reset2() { resetCmd(2) }
def reset3() { resetCmd(3) }
def reset4() { resetCmd(4) }
def reset5() { resetCmd(5) }
def reset6() { resetCmd(6) }
def configure() {
def cmds = [
zwave.configurationV1.configurationSet(parameterNumber: 101, size: 4, configurationValue: [0, 0, 0, 1]).format(),
zwave.configurationV1.configurationSet(parameterNumber: 102, size: 4, configurationValue: [0, 0, 0x79, 0]).format(),
zwave.configurationV1.configurationSet(parameterNumber: 112, size: 4, scaledConfigurationValue: 90).format(),
]
[5, 8, 9, 10, 11].each { p →
cmds << zwave.configurationV1.configurationSet(parameterNumber: p, size: 2, scaledConfigurationValue: 5).format()
}
[12, 15, 16, 17, 18].each { p →
cmds << zwave.configurationV1.configurationSet(parameterNumber: p, size: 1, scaledConfigurationValue: 50).format()
}
cmds += [
zwave.configurationV1.configurationSet(parameterNumber: 111, size: 4, scaledConfigurationValue: 15*60).format(),
zwave.configurationV1.configurationSet(parameterNumber: 4, size: 1, configurationValue: [1]).format(),
]
delayBetween(cmds) + “delay 5000” + refresh()
}

private encap(cmd, endpoint) {
if (endpoint) {
if (cmd.commandClassId == 0x32) {
// Metered outlets are numbered differently than switches
if (endpoint < 0x80) {
endpoint += 2
} else {
endpoint = ((endpoint & 0x7F) << 2) | 0x80
}
}
zwave.multiChannelV3.multiChannelCmdEncap(destinationEndPoint:endpoint).encapsulate(cmd).format()
} else {
cmd.format()
}
}

And created virtual switches for the 6 nodes with this smartapp:
[[RELEASE] Virtual / Physical Switch Sync]

is there a way to control one socket in a automation?

Yes but you have no power meter.

Skickat frÄn min Windows 10-telefon

FrÄn: Tarik Faikmailto:smartthings@discoursemail.com
Skickat: den 3 november 2016 13:04
Till: askrot_81@hotmail.commailto:askrot_81@hotmail.com
Ämne: [SmartThings Community] [Devices & Integrations] PowerNode plug (GreenWave) to power trigg?

[https://avatars.discourse.org/v2/letter/t/8e8cbc/45.png] Tarik_Faikhttps://community.smartthings.com/users/tarik_faik
November 3

is there a way to control one socket in a automation?

Hi Fredrik did you manage to get your single socket working? I’ve installed the device handler above but ST can’t seem to find any of my PowerNodes. Thanks!

So my issue was that the devices weren’t pairing because they were too far away from the hub. I’ve gotten them to pair without any custom device handler but the on/off status isn’t always correctly reflected- is there a device type for the single plug that would fix this? Obviously it would be nice to be able to monitor power consumption but my main concern is being able to determine whether the device really is on or off remotely.

I got one socket plug and it works great, but I don’t see any power use.

I bought a ten pack of these single powernode plugs and they work just fine as on/off devices. I havent found out how to report on usage for them yet.

I have the 6 port PowerNode but I can only see and control 2 outlets. And i used the DH above. What is wrong?

I’ve just uploaded a comprehensive device handler for the single-port PowerNode. It includes support for power and energy reporting, the Room Colour Wheel, local and RF protection modes, an Auto-off Timer, full parameter synchronisation, and advanced logging options! :grin:

Full details here:

If anyone wants to lend me the 6-port version I should be able to update the device handler to support that too. :wink:

2 Likes

@jolerius @WEBNAR @olivier Can either of you do without your 6 node plug for a week so David can get it integrated with SmartThings properly?

Sorry, mine is crucial in my TV furniture. Any other way I could be in help?

Super good

Hi sorry guys but will the Greewave plugs work with Smarthings App? I dont see A,B,C instructions of how to do this ? Can anyone assist with a video or A,B,C guide? thanks in Advance Colin

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.

https://github.com/codersaur/SmartThings/tree/master/devices/greenwave-powernode-single

Is there any way to disable the flashing lights on these plugs? Mine seem to be doing this more frequently and I understand that this occurs when it’s been a long time since they were last polled but it seems to be happening much more frequently now.

1 Like