Add capability "ChangeLevel" to Generic Z-Wave Shades

Hi Hubitat devs,

I was trying to add button controller to control shades. Without the ChangeLevel capability from Generic Z-Wave Shades driver, I'm unable to program a button hold for raising/lowering shades and button release for stop(). Well, I guess I could make the up button hold to issue a set level command to 100 or down button hold to issue a set level command to 0. That just seems hacky. It's better to have the driver support ChangeLevel capability natively and use the z-wave switchMultilevelStartLevelChange and switchMultilevelStopLevelChange API respectively.

The driver for Generic Z-Wave Shades is close sourced. Could the Hubitat dev add ChangeLevel capability to the driver? It should be very trivial amount of work.
borrowing from https://github.com/hubitat/HubitatPublic/blob/master/examples/drivers/genericZWaveCentralSceneDimmer.groovy:

String startLevelChange(direction){
    Integer upDown = direction == "down" ? 1 : 0
    return secure(zwave.switchMultilevelV1.switchMultilevelStartLevelChange(upDown: upDown, ignoreStartLevel: 1, startLevel: 0))
}

List<String> stopLevelChange(){
    return [
            secure(zwave.switchMultilevelV1.switchMultilevelStopLevelChange())
            ,"delay 200"
            ,secure(zwave.basicV1.basicGet())
    ]
}
1 Like

Can this be addressed in the next release? It's a super small change. If you open source the driver code for Generic Z-Wave Shades, I'll send you a pull request. Thank you!

1 Like

Do you know that your shades work with this? Mine don't, but they're really blinds and not shades, where the usefulness is probably not as apparent.

If you want a starting place for something that vaguely resembles a generic shade driver, you can start with mine that I wrote for mine, which are iBlinds v3 units (I also have a driver for their v2, but I wouldn't recommend starting with that one since it has a couple workarounds for v2 device oddities). You can probably remove everything related to configuring Z-Wave parameters (lines 31-44, 60-62, and 93-100; possibly more), which are specific to the units I wrote this for. Otherwise, this would probably give you a good starting point.

I forked this, and this is my modification to add start/stopLevelChange.

Everything works, but there's still a bug for reporting the shade status in the dashboard which I have yet had the time to fix.

The built-in Generic Z-Wave Shades driver doesn't have that issue. All it's missing is the start/stopLevelChange methods. I'm just hoping the devs can add those 2 methods and the driver will be complete.