Need Help Making a Device Handler for Leviton DZ6HD Dimmer

Hi Everyone,

I have recently made the switch from Vera to Smartthings and for the most part everything is going well. The one thing that is really bothering me though is the lack of ability to change a z-wave parameter for a device. This was such a simple task in Vera yet with Smartthings it is the complete opposite.

I have tried using the z-wave tweaker smartapp but it doesn’t seem to be able to read the Leviton DZ6HD dimmer. From my reading the other method to accomplish this is by creating a custom device handler. I have already created device handlers for other devices using others code however I have not actually created one from scratch myself.

Can someone please help me get started on how I would create a device handler that simply sets parameter 5 to 100 (pre set dim to 100%) and parameter 8 to 1 (load type = LED).

Thanks so much!

Have you reported the problem you’re seeing in the tweaker DTH thread? I’m sure the author there would like to know what you’re seeing, and may be able to fix that to expose the parameters for you.

1 Like

Check back shortly, I may have something for you…

1 Like

Thank You!

No worries! Ready to try this?

Source DTH is ST’s Dimmer Switch.

Source for parameter values: https://www.leviton.com/en/docs/DI-000-DZ6HD-02A-W.pdf

Now please keep in mind I don’t have one of these devices to test with, but this should work for you. Once you create a custom DTH with my code, and edit the device to use it - please make sure to go to the device’s Preferences in the mobile app to make the changes you want. All the parameters are available for you to tweak. Once you tap on Done, it should configure the device for you. Watch your Live Logging to make sure, and to check for any errors.

The preferences screen may not look pretty, but it gets the job done. :wink:

https://raw.githubusercontent.com/constjs/jcdevhandlers/master/devicetypes/jscgs350/my-enhanced-leviton-dz6hd-dimmer.src/my-enhanced-leviton-dz6hd-dimmer.groovy

Awesome! Testing from work and from what I can tell it looks good. I will actually see if the light it responding the way I expect when I get home.

Thanks again!

2 Likes

Did this work as expected?

Sorry I didn’t get back to you sooner!

I did initially have issues where the device wouldn’t update properly in SmartThings. For example I would click off and it would say “turning off” for a long time and then show the light was still on even though it was not.

I do think that this was unrelated though as I unpaired the device, factory reset it and re-paired it. Since this I have been using your device handler for a day now and it seems to be working properly.

Thanks again!

1 Like

My pleasure!

Hello,
I recently purchases a number of these dimmers, well 10 to be exact. I prefer them over the other cheaper dimmers, however I am not able to adjust them in the manner that I like. Did you ever find a solution that worked for you? Thanks!

Not sure what you mean by adjusting them but I’ve been happy since using the device handler provided here. Does everything I need.

What more are you looking for?

Thanks for sharing these handlers, they really improve the experience with ST. Unrelated question: is anyone having issues with these dimmers and LEDs? I’ve tried setting the bulb type to LED and I am still only dimming down to 25%. My older GE/JASCO z wave dimmers are dimming lower, which doesn’t make much sense to me.

I just installed a Zwave, Leviton DZ6HD-1BZ with remote dimmer for 3 way switch in my Family Room .Works fine…but CANNOT get ST to find it.

Any similar issues with anyone here? I have tried talking to ST support and no help other than to bring the hub closer to pair it. But I have a GE smart Zwave switch right NEXT to it, and ST found it.

Any help is appreciated…

Try using the Z-wave utilities to exclude it first (under the Hub menu)

1 Like

Hi Jared,

Have you been successful at utilizing “input “parameterFive”, “number”, title: “Parameter 5: Preset Light Level : Valid values 0-100. default=0, 0=memory dim to prev state, 1-100 = % Level”, defaultValue: 0, range: “0…100”, required: false, displayDuringSetup: true”? I have been able to set and record the change live but upon switching on goes back to previous light level.

Thanks,

Nick

I am experiencing the same thing, and am working on my own handler, derived from the sample dimmer zWave code from SmartThings and the code linked to by johnconstantelo, above.

The issue is in these methods:

def setLevel(value) {
log.debug "setLevel >> value: $value"
def valueaux = value as Integer
def level = Math.max(Math.min(valueaux, 99), 0)
if (level > 0) {
sendEvent(name: “switch”, value: “on”)
} else {
sendEvent(name: “switch”, value: “off”)
}
sendEvent(name: “level”, value: level, unit: “%”)
delayBetween ([zwave.basicV1.basicSet(value: level).format(), zwave.switchMultilevelV1.switchMultilevelGet().format()], 5000)
}

def on() {
delayBetween([
zwave.basicV1.basicSet(value: 0xFF).format(),
zwave.switchMultilevelV1.switchMultilevelGet().format()
],5000)
}

Instead of just asking the switch component of the dimmer to turn on, it is setting the level. (As one might expect, the off() method has the same issue.)

I’ll be working on this over the next couple of days.

BTW, one thing I found is that the configure() method as provided by johnconstantelo changed the settings in the app, but not on the switch itself until I wrapped it in sendHubCommand(new physicalgraph.device.HubAction()). I posted a question on that today.

I found the answer in another post.

In “on()” change zwave.basicV1.basicSet(value: 0xFF).format()
to zwave.switchMultilevelV1.switchMultilevelSet(value: 0xFF).format()

After a factory reset much like Jared I was able to see configure() updates without wrapping in the sendHubCommand(). Works, just would be nice be able to call a device method from Core much like the set level and have it update the configuration.

nicksterz, I think that your reply probably better fits a different thread, where I posted about the need for the sendHubCommand wrapper?

For the novices (like me), can someone please post the correct Device Type Handler to use?

1 Like