Z-Wave Multi Channel (PE653)

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?

After you add the device, go to the device details page, and the preferences are set there, much the same as in Smartthings. :wink:

In the actual code, it’s in the preferences {} section, usually near the top.

I got all that. Here are the screens for the device... no preferences.

This is a custom driver, yes? What preference are you trying to set?

The preferences are supposed to let me select the type of pool pump

Here is the driver code.