Zwave Power Strip from AEON

In their docs they say it just uses multi channel command encapsulation of commands such as Switch Binary, Meter, and Basic. They say they use COMMAND_CLASS_MULTI_CHANNEL_V2, which I don’t even have in my Z-Wave docs (?)

The parameters aren’t quite right for the V3 encapsulation command above, try this:

//switch instance
def on(value) {
log.debug "value $value"
	delayBetween([
		zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:1, destinationEndPoint: value, commandClass:37, command:1, parameter:[255]).format(),
		zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:1, destinationEndPoint: value, commandClass:37, command:2).format()
	])
}

def off(value) {
log.debug "value $value"
	delayBetween([
		zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:1, destinationEndPoint: value, commandClass:37, command:1, parameter:[0]).format(),
		zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:1, destinationEndPoint: value, commandClass:37, command:2).format()
	])
}

//switch1
def on1() {
	delayBetween([
		zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:1, destinationEndPoint:1, commandClass:37, command:1, parameter:[255]).format(),
		zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:1, destinationEndPoint:1, commandClass:37, command:2).format()
	])
}

def off1() {
	delayBetween([
		zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:1, destinationEndPoint:1, commandClass:37, command:1, parameter:[0]).format(),
		zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:1, destinationEndPoint:1, commandClass:37, command:2).format()
	])
}

Still no luck… I’ve played around with your code @duncan and it doesn’t seem to help. Not sure if I’m doing everything right though.

Do you guys have one at SmartThings to test with? If not I’d be happy to loan you mine for testing/typing purposes. I don’t have a use for it right now until we can get the 4 outlets to work independently. Just let me know.

@chrisb

Run this and post the Console log

You will have to create a Custom Command called test in the Device Type Settings.

def parse(String description) {
    log.debug "Description $description"
	def result = null
	def cmd = zwave.parse(description, [0x60: 3])
	if (cmd) {
		result = createEvent(zwaveEvent(cmd))
	}
	return result
}

def zwaveEvent(physicalgraph.zwave.Command cmd) {
	log.warn "Captured zwave command $cmd"
}

//test
def test() {
	def cmds = []
        cmds << zwave.multiChannelV3.multiChannelCapabilityGet(endPoint:1).format()
	    cmds << zwave.multiChannelV3.multiChannelEndPointFind(genericDeviceClass:37).format()
	    cmds << zwave.multiChannelV3.multiChannelEndPointGet().format()
        cmds << zwave.multiChannelV3.multiInstanceGet(commandClass:37).format()
        cmds << zwave.multiInstanceV1.multiInstanceGet(commandClass:37).format()
	log.debug "Sending ${cmds.inspect()}"
	delayBetween(cmds, 2300)
}

I’ll give it a shot.

Just to be clear, is this a SmartApp I’m running or is to be put in the Device Type code?

@chrisb

Create a new device type and use the simulator.

@bigpunk6

Finally got a chance to work on this and get test results:

8:30:19 PM: debug Sending ['600901', '600B2500', '6007', '600425', '600425']

Hopefully I did this right. On a whim I tried this on a different device I have (a Jasco Light Switch)… it produced the same results:

8:33:37 PM: debug Sending ['600901', '600B2500', '6007', '600425', '600425']

Okay… so Apparently I lied. Just for the fun of it I tried the Device Type Simulator with the AEON Power Strip type that I created based on your work @bigpunk6. When I did that and clicked the on1, off1, on2, etc buttons, they worked!! Because I’m tried different codes offered here, I’m not sure whose this was, but this is the code for the individual commands:

//switch1
def on1() {
	delayBetween([
		zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:1, destinationEndPoint:1, commandClass:37, command:1, parameter:[255]).format(),
		zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:1, destinationEndPoint:1, commandClass:37, command:2).format()
	])
}

So, what I discovered is that the on/off commands work in apps and in the simulator, but not in the mobile app. The tile “buttons” don’t work, but as I said, it does work in apps.

Now, I suggested earlier in this thread that the best was to use this would be to “bind” each of these outlets to a virtual on/off tile because the virtual on/off tiles can be used in any problem that a switch without needing to re-write the app.

So, I’ve written up a app that allows you to do this. Asks for the power strip and 4 other switches to bind to the 4 outlets. Simply watches for the virtual switches turn on or off, and turns on or off the corresponding outlet on the strip.

I’ve shared the app: AEON Power Strip Binder

1 Like

@chrisb

Cool I’ll check that out.

I just update my device type again to use the multiChannelV3 insted of multiInstanceV1.

https://github.com/bigpunk6/device-type.PE653

@duncan,

Just wanted to alert you as well to the progress we made here tonight.

@bigpunk6,

What’s the license on your Device Type? I’d like to share what I’ve got for the AEON power strip Device Type, but honestly, it’s 92% your work… through in 4% of Help from Duncan and then the rest is just me snipping out parts I didn’t need and/or minor modifications so before I share it with anyone, I want to make sure I’m respecting your work.

Heck, for that matter… seeing is it’s almost completely yours I’ll just send you my modifications and you can share it on your github if you want.

@chrisb

Feel free to share as you like.

Great to hear it’s working.

Regarding the tiles not working, did you change the tile definitions after trying the SmartApp on your phone the first time? I’ve had problems before with the iOS app caching device types and continuing to use the old tile commands until I sign out and back in.

@duncan
I have had the same problem with the tiles and force closing the iOS app fixed it.

@chrisb
The tiles work for me so it could be a configuration problem. Did you configure all the Custom Attributes per my instructions?

https://github.com/bigpunk6/device-type.PE653/blob/master/README.md

@duncan

Is there a way to send a raw zwave command to a device from device type code?
Something like “zw device: 0C, command: 2501, payload: FF” or 0C2501FF?

Also what is Commands Raw used for in the IDE? Everything i tried in there yielded zero results. I understand how to send raw Messages but cant figure out the Commands side.

@bigpunk6

Okay, after some more testing I discovered that the tiles do work… kinda. Here’s the thing: The tiles never update in the mobile app.

If I have Switch1 physically on and then I tap the Switch1 tile, it will physically turn off the outlet, but the tile still say that it’s on. Tapping the tile again just continues to send the off1 command.

The only way that I’ve discovered to turn off the tiles is to use the IDE simulator on the power strip and hit the switch off button. This will turn all the tiles off, even if the outlets are on. Now if my outlet is off and my tile is off if I tap the tile it will turn on the outlet. But again, the tile does not update. It still thinks the outlet is off. Tapping on the tile will just repeatedly send the on1 (or on2, etc) command.

YOu might be having a problem that I was having a while back. Just a suggestion but try try renaming the “on” “off” commands to something like this:

state “on”, label:’${name}’, action:“switchOff”, icon:“st.switches.switch.on”, backgroundColor:"#79b821"
state “off”, label:’${name}’, action:“switchOn”, icon:“st.switches.switch.off”, backgroundColor:"#ffffff"

then rename the methods below in your device file to match as well as adding the custom commands to the device in the IDE page. There’s something in the ST helper code that messed with my virtual devices and this was able to get around it.

HTH,
Twack

Thanks for the recommendation Twack… unfortunately that won’t help. We’re already using ‘renamed’ on, off commands:

on1, off1, on2, off2… etc.

did you remember to add them into the custom commands into the device settings page?

I have them as custom commands in the Settings page.

@chrisb

If you can toggle the switch then the commands are configured correctly but if the tile does not update then something is wrong with the Custom Attributes. You have to add the Custom Attributes to the device type settings just like the custom commands. If you changed them from switch1 - switch5 then you need to change the Custom Attributes.

Also did you try to refresh after toggling the switch?