Z-Wave Multi Channel (PE653)

That shouldn't be the case, the method call for adding a child device is:
addChildDevice(String namespace, String typeName, String deviceNetworkId, [Long hubId], [Map properties])

namespace - the namespace of the child device driver
typeName - the name of the child device driver
deviceNetworkId - the device network id you want to assign to this new device
hubId - optional, hub id (can pass null and system will populate it automatically)
properties - optional, a map of options ie: [name: "myname", lable: "mylabel"]

The SmartThings multi channel smartapp was deprecated in late 2016 because the platform architecture was changed and child devices were then propagated out of the parent device type handler, not from a smart app.

This works very well conceptually for devices like a power strip, such as the zooz or Aeotec power strips. It makes sense to people that there is a top-level parent device, the power strip, and that you open that to see the individual child devices, the sockets. SmartThings now calls this a "composite" device, and, again, the code is in the device type handler for the parent.

It does not work well for multi channel devices such as the vision dual relay or various light switches where each of the individual endpoints is conceptually a separate controllable independent device that people expect to see in their things list .

IMG_0186

SmartThings at present does not have a good solution for this type of Zwave device, and has no solution for this type of zigbee device as they hide the endpoint information. So people frequently end up with the device where only one of the multiple switches can be turned on and off.

Anyway, I did just want to mention that while the multi channel smartapp from SmartThings worked OK, if not great, up through 2016, the code has been deprecated and at present the multi channel device type handler doesn't work for all devices.

There are some devices with custom device type handlers that have it working in SmartThings, such as the Inovelli dual pocket socket and One of the three gang UK switches, but you need to be careful if you try to model on the current stock code, as it doesn't all work.

Just thought I would mention this, as it was a significant architecture change in 2017.

@patrick @mike.maxwell

1 Like

The device type at issue was for the I termatic PE653 which I believe was tweaked to be specifically made for the device.

Iā€™m going to do some more tweaking to hopefully get it ported over in the next day or so.

1 Like

Chuck,

Yes, you are correct. However, in ST, using the Composite Device Handler, for some reason specifying the namespace doesn't seem to work correctly (at least it didn't when I developed my Composite DTH's a year ago.) The only way I was able to get it to work back then was to make sure the namespaces all matched.

Sorry for any confusion,
Dan

Making some progress. I managed to port over the appropriate virtual device driver as seen below:

/**
 *  V Tile device-type for ms_w_vts
 *
 *	Needed for Multi Switch with Virtual Tiles to create virtual switch tiles in ST for devices that have multiple "switch[x]"
 *     attributes within them and have on[x] and off[x] commands for each (fairly common device-types)
 *     Also has support for device-label inside the name when on or off and polling occurs
 *  Copyright 2014 Cooper Lee
 *
 */
metadata {
	definition (name: "vTile_ms", namespace: "ms_w_vts", author: "Cooper Lee") {
		capability "Switch"
		// capability "relaySwitch"
		capability "Polling"
		capability "Refresh"

		attribute "lastOn",  "string"
		attribute "lastOff", "string"
	}
}

preferences {
	tiles {
		standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) {
			state "name", label: '${currentValue}', action: "switch.on", icon: "http://cdn.flaticon.com/png/256/56724.png", backgroundColor: "#DDDDff", nextState: "turningOn"
			state "off", label: 'off', action: "switch.on", icon: "http://cdn.flaticon.com/png/256/56724.png", backgroundColor: "#DDDDff", nextState: "turningOn"
			state "on", label: 'on', action: "switch.off", icon: "http://cdn.flaticon.com/png/256/56724.png", backgroundColor: "#0088ff", nextState: "turningOff"
			state "turningOff", iconLabel:"http://cdn.flaticon.com/png/256/56413.png" , icon: "http://cdn.flaticon.com/png/256/56724.png", backgroundColor: "#FA5882", nextState: "on"
			state "turningOn", iconLabel:"http://cdn.flaticon.com/png/256/56498.png" , icon: "http://cdn.flaticon.com/png/256/56724.png", backgroundColor: "#F3F781", nextState: "off"
		}

	    valueTile("lastOn", "device.lastOn", inactiveLabel: false, width: 3, height: 1, canChangeIcon: false, decoration:"flat") {
    	state "default", label: 'Last On: ${currentValue}'}  

    	valueTile("lastOff", "device.lastOff", inactiveLabel: false, width: 3, height: 1, canChangeIcon: false, decoration:"flat") {
    	state "default", label: 'Last Off: ${currentValue}'}  
	

		main "switch"
		details(["switch", "lastOn", "lastOff"])
	}
}

def parse(desc) {
	def results = []
    if(desc=="updated") { log.debug "Device $device.label has been UPDATED"; poll() }
}

def on() {
	sendEvent([name: "switch", value: "on"])
    parent.on(this)
	sendEvent([name: "lastOn", value: "${df(now())}"])
  	log.debug "$device.label is On" 
}

def off() {
	sendEvent([name: "switch", value: "off"])
    parent.off(this)
	sendEvent([name: "switch", value: "$device.label"])
	sendEvent([name: "lastOff", value: "${df(now())}"])
  	log.debug "$device.label is Off" 
}

def poll() {
	def current = device.currentValue("switch")
    log.debug "Polling - $device.label is $current"
	if(!current || current=="off") { sendEvent(name:"switch", value:"$device.label", isStateChange:true, displayed:false) }
}

def df(e) {
	//  *  df(e) - Date Format "E"
	//  *     Takes epoch time format and returns Date formatted in current timezone
	//  *  Copyright 2014 Cooper Lee
	def locale = getWeatherFeature("geolookup", zip); def tz = TimeZone.getTimeZone(locale.location.tz_long); def formatted
	if(e) { formatted = new Date(e).format("EEE, MMM d, 'at' hh:mm aaa", tz); return formatted }

}

Whenever I turn on any of the 5 newly created virtual devices I receive the following logs:

In the main device 'Pool' when turning on switch 5 I see:

51%20AM

In the log for the device switch 5, I see:

Any ideas?

You are making a call to getWeatherFeature() we don't support that method, and it is returning null

1 Like

Gotchaā€¦ I will comment out the line, but I wouldnā€™t think that would stop the device from responding.

Would you?

the code above is a virtual device and appears to be working fine. from your logs it appears there is another device that should be triggered? do you have the code for that and where you think it is going wrong?

I agree that the code for the virtual device works "fine" except that nothing happens when I actually turn on/off the device.

Frankly, there seem to be several issues with the main device code (which is pasted at the top of the post).

For instance, the device has temperature capability. Temperature will not display. The device also has the ability to 'getquickwatertemp'. When I try this this is the error message received in the logs:

Like I said, some functions of the device work. Of the 5 switches, 2 work. Also, the ability to turn on Speed 4 of the pump works.

Functionality just seems all over the place with the device.

My bad... here is the actual device

I see what you mean, there is some strange things going on in thereā€¦ what is delayBetweenLog method? I would recommend adding some more logging to various methods to narrow down where you are getting the error from.

Ok. Iā€™m going to have to seek out the guy that wrote the ST app to get his input.

I do know when I helped him test he literally input manual commands with ā€˜delaysā€™ to allow the device to execute the commandsā€¦ I think it had to do with setting the thermostat.

I was mainly puzzled as why I cannot see the temperature on the device.

Hi, @justin.bennett (JDogg016). I saw your shout-out on the ST thread today. Iā€™m ready glad to see youā€™ve made so much progress with this project. It was on my list tentatively titled how-am-I-ever-going-to-get-that-to-work-on-Hubitat

But I also have to say that Iā€™m honestly petrified of excluding this beast from ST. There was a large degree of black magic involved to get it included the first time and Iā€™ve not touched it since.

I took the leapā€¦ getting the device on the Z-wave network was not the challenge. Getting the driver/app to do what it did is ST is the challenge. I think Iā€™ve made a bit of headway on that and I have some other thoughts. Right now I can:

  1. Adjust temperature up and down;
  2. Run on/off the pool light (switch 1);
  3. Turn the pump on (speed unknown although I have a VSP);
  4. Change the mode from pool to spa and vice versa.__

TAKE THE LEAP!!!

1 Like

Do you also have the PE953 remote on the network? As I recall, part of the problem I encountered involved pairing the remote as a secondary controller. Iā€™d be happy if all I had to do was unpair & re-pair the 653 (and the remote just stayed along for the ride attached in the background to the 653).

I had all the same trepidations you had. On ST, I did have the remote paired to the Z-Wave device, but NOT to ST.

Also, I cannot honestly recall whether it was primary or secondary and I am going to fudge with the remote if I have free time. I will tell you (personally) after setting up ST, I NEVER used the remote. In fact the battery is dead, but yes my goal is to get the remote back as a secondary controller but I view that as a secondary (PUN) issue to hubitat.

As long as I can turn on/off the pool light and turn on the pump it is enough of a start to not cause damage to my pool.

The trick is getting the remote to behave properly. One thought I have had that I have not had time to test (as I can only access Hubitat when at home) is whether I have the correct iteration on the ST Multi-wave device.

I ask because on ST, the ST multi wave app created 10 virtual devices. Items 1-5 were pool functions such as light and the blower for the hot tub whereas 6-10 where the speeds for the pump. Right now running the Multichannel app gets me 5 virtual devices in hubitat only one of which responds to on/off commands.

I think Keith created a different ST Multi Channel device and the one I may be working with may only have 5 devices and that might be my current impediment. Do you know anything of that?__

1 Like

I'm not sure I can answer your question. Here is what I do know. I am using v2.06, dated 5/13/17, of the DTH.

Here is what the app shows for the "Pool Intermatic PE653" device:

The "Pool Pump" is (and the other two devices I use [sw4,sw5] are similar):

In the IDE, I have this for the PE953 (remote):

and these eight devices that are for the PE653:


I use the native PE653 programming for the pump (single speed) because I couldn't trust ST with my pump running times. I use ST to program the pool light (sw5) and the Pool Waterfall (sw4). I have never used, and wouldn't know what they even do, the "Dimmer Endpoint 7" and "Pool Switch #6". I don't use, but can guess that "Pool Switch #3" and "Pool Pump (Lo-speed)" are for their respective capabilities.

Please tell me if there is any info or clarification that will help you.

You actually raise an interest eating question that someone may be able to help me with.

In ST the user has the ability to change the preferences of a device (driver in hubitat).

I cannot seem to do this in hubitat. How can I change the hubitat driver code to enable this?

Anyone?

Driver preferences work the same way in Hubitat, they are written into the driver.

Then forgive me for asking but where can I set driver preferences? I donā€™t see it within the device or driver code?