Porting Zooz ZEN27 from SmartThings

Hubitat's button model is different from SmartThings'. On SmartThings, you'd see something like this when button 1 is pushed:

sendEvent(name: "button", value: "pushed", data:[buttonNumber: 1], isStateChange: true)

On Hubitat, "button" is not an event name at all. The event name is "pushed", the value is the button number, and you don't need data. So that would be:

sendEvent(name: "pushed", value: 1, isStateChange: true)

Also, "Button" is not a capability on Hubitat. You have "PushableButton", "HoldableButton", "ReleaseableButton", and "DoulbeTapableButton" (sic.), depending on what events of "pushed", "held", "released", and "doubleTapped" you do. The Zooz can report all of those, but it's a matter of how you want to report everything since I think they support 3 taps and Hubitat doesn't natively (I like to do odd numbers for up taps, even numbers for down taps, and ignore doubleTapped since it doesn't help, with held and released having their usual meanings, but that's just me).

Driver porting is usually easy, but the button thing makes it a bit more involved. :slight_smile:

PS - Someone (now a staff member) already wrote a Hubitat driver for this if you don't want to use the built-in one and wanted to start with something that's already written for Hubitat:

(Off the bat, it just looks like it would need minor modification to work on a C-7 if paired with S2, but on a C-5 or with either S0 or no security, it should be fine. I'd replace either the contents of the two secureCommand() methods with zwaveSecureEncap(cmd) or just replace all references to them with the same. The built-in zwaveSecureEncap() method accepts, like both of these methods, either a Command object or a "formatted" String command and takes care of everything for you if S0/S2 is used.)