Centralite In Wall Dimmer driver

Hey all. Trying to make the full switch from Smartthings and I have a few devices that I am having issue with. I got a bunch of Centralite inwall dimmers, I went through this same issue with Smartthings, but eventually found a device handler that made it much more functional. Currently, they connect to Hubitat using the Generic Zigbee Dimmer driver, however they really only have on, off, and dim functionality and they aren't very smooth when they come on. It's like getting a flashbulb to the face if it comes on from 0-100. I also lose the button functionality when I tap it. I have to use the app or voice control. I first tried to just import the code from the custom Smartthings Device Handler that I found to see what I got as a hubitat driver. Of course, I'm getting some errors on lines that I just don't understand, as I am a novice on Smartthings handlers and completely iggnorant on Hubitat drivers. There isn't a whole lot of code there, and most of it is pretty strightforward from what I can understand about the logic, but I would really like to get these devices working properly as replacing 8 in wall dimmers whould be a huge pain and expense. Can anyone point me to a resouce that could possibly help me learn the Hubitat driver framework or take a look at this Smartthings Handler code and see if it is something that can be easlily adapted to Hubitat?

1 Like

If you have a Smartthings DH it can usually be converted by following this.
If you get stuck, there are plenty of people here that can give you guidance.

1 Like

Perfect! Thank you. I'd rather take the time learning this way than just having someone do it for me. Thank you so much.

1 Like

Good luck. Do update this post as you go.

Will do. I do see already that it notes that Hubitat uses the "Button" function differently. I'm sure that this will be a sketchy patch for me once I get there. Time for non programmer to get dirty. Cheers.

1 Like

Well, I changed a couple of words outlined in the info you sent and was able to get to save without errors. It turns on and off and reports the correct level. However, I cannot get the paddle to turn the thing on and off. I figured out out to create a "Pushable Button" and it shows up in the app. It shows that the device has 2 buttons. I assume that is paddle up and paddle down. I got the "button" to work by tapping it in the app, but the physical paddles still don't function. This stuff is over my head at this point and I just don't see anyone talking about a simple "Make my paddle work on my dimmer". Most of the chatter is not being able to make double or triple tap work and those discusions are like listening to nuclear physists talk. This is what I have so far.

metadata {
definition (name: "WorksWith Dimmer", namespace: "jkrischt", author: "Brad Krischke") {
capability "Actuator"
capability "PushableButton"
command "push", ["number"]

    capability "Configuration"
    capability "Refresh"
    capability "Sensor"
    capability "Switch"
    capability "Switch Level"

    fingerprint profileId: "0104", deviceId: "0101", inClusters: "0000, 0003, 0004, 0005, 0006, 0008", manufacturer: "CentraLite Systems", model: "Dimmer Switch", deviceJoinName: "WorksWith Dimmer"
  }

tiles(scale: 2) {
    multiAttributeTile(name:"switch", type: "lighting", width: 6, height: 4, canChangeIcon: true){
        tileAttribute ("device.switch", key: "PRIMARY_CONTROL") {
            attributeState "on", label:'${name}', action:"switch.off", icon:"st.switches.light.on", backgroundColor:"#79b821", nextState:"turningOff"
            attributeState "off", label:'${name}', action:"switch.on", icon:"st.switches.light.off", backgroundColor:"#ffffff", nextState:"turningOn"
            attributeState "turningOn", label:'${name}', action:"switch.off", icon:"st.switches.light.on", backgroundColor:"#79b821", nextState:"turningOff"
            attributeState "turningOff", label:'${name}', action:"switch.on", icon:"st.switches.light.off", backgroundColor:"#ffffff", nextState:"turningOn"
        }
        tileAttribute ("device.level", key: "SLIDER_CONTROL") {
            attributeState "level", action:"switch level.setLevel"
        }
    }
    standardTile("refresh", "device.refresh", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
        state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
    }
    main "switch"
    details(["switch", "refresh"])
}

}

// Parse incoming device messages to generate events
def parse(String description) {
Map map = [:]
log.debug "description is $description"

def event = zigbee.getEvent(description)

if (description?.startsWith('catchall:')) {
   // call parseCatchAllMessage to parse the catchall message received
   map = parseCatchAllMessage(description)
   if (map.value == "pushed") {
     List cmds = onoffResponse()
     def result = []
	 log.trace "Sending current state to device ${cmds}"
     result = cmds?.collect { new hubitat.device.HubAction(it) }  
     return result
   }
}

if (event) {
	log.info event
	if (event.name == "level") {
		event.value = (event.value as Integer) * 100 / 39  //update level to overcome return of 39 as max from switch
        sendEvent(event)
	}
	else {
   		sendEvent(event)
    }
}
else {
    log.warn "DID NOT PARSE MESSAGE for description : $description"
    log.debug zigbee.parseDescriptionAsMap(description)
}

}

def onoffResponse() {
log.debug "Creating on/off response"
def swtch = device.currentState("switch")?.value // Get the current on off value
if (swtch == "on"){
swtch = "0"
}else{
swtch = "1"
}
[
"st cmd 0x${device.deviceNetworkId} 0x${device.endpointId} 6 ${swtch} {}" // Set On or Off
]
}

def off() {
zigbee.off()
}

def on() {
zigbee.on()
}

def setLevel(value) {
zigbee.setLevel(value*39/100)
}

def refresh() {
zigbee.onOffRefresh() + zigbee.levelRefresh() + zigbee.onOffConfig() + zigbee.levelConfig()
}

def configure() {
log.debug "Configuring Reporting and Bindings."
zigbee.onOffConfig() + zigbee.levelConfig() + zigbee.onOffRefresh() + zigbee.levelRefresh()
}

}

private Map parseCatchAllMessage(String description) {
// Create a map from the raw zigbee message to make parsing more intuitive
def msg = zigbee.parse(description)
Map result = [:]
switch(msg.clusterId) {
case 6:
switch(msg.command) {
case 2: // button pressed
result = [
name: 'button',
value: 'pushed',
data: [buttonNumber: 1],
descriptionText: "$device.displayName button was pressed",
isStateChange: true
]
log.debug "Parse returned ${result?.descriptionText}"
return result
break
}
}
result = [value: 'nothing']
}

I have one of these someplace, and I don't recall having any issues with basic physical activity using any of the built in zigbee dimmer drivers.
None of the built in drivers have button support, I would make sure the device works properly using a standard driver after a fresh join, then move on to trying your custom driver.

Yeah. It has basic function. But not being able to use the paddle and the harsh turn on that flashes you like a paparazzi is intolerable. Although hubitat provides very snappy action on my hardwired
devices through Konnected (mainly hardwired motion), It is just far short of my smartthings setup. I'm pretty much resigned to the fact that this just does not provide nearly the device support that the smartthings community does. Not trying to knock the community, but the most typical response I see here is "well, that isn't a popular device, get this one", but with smartthings, I've always had a smart dude jump in and help get my oddball devices working well. It's a shame really. I thought this was the possible full boat. It isn't. I can see all of my Arlo and Ring cameras right on the ST classic app, all of my oddball devices have really nice custom drivers, but my hardwired motion makes me stand in the dark for 10 seconds through Konnected. I think I'll slap an iris motion up and stay with ST.

I have the exact same issue as @kavery3141 . Same driver, same switches, same result. I'm hoping by bumping this post, someone will chime in to help. I logged my switch to see where the problem is with the driver and got this:
sys:12021-12-07 03:09:23.902 pm Unable to execute hubAction:st cmd 0xBA03 0x01 6 0 {} sent from Master WC Light, invalid or unspecified protocol.
dev:482021-12-07 03:09:23.898 pm traceSending current state to device [st cmd 0xBA03 0x01 6 0 {}]
dev:482021-12-07 03:09:23.894 pm debugCreating on/off response
dev:482021-12-07 03:09:23.889 pm debugParse returned Master WC Light button was pressed
dev:482021-12-07 03:09:23.884 pm debugdescription is catchall: 0104 0006 01 01 0040 00 BA03 01 00 0000 02 00
dev:482021-12-07 03:09:23.275 pm info[name:level, value:39]
dev:482021-12-07 03:09:23.270 pm debugdescription is read attr - raw: BA030100080800002064, dni: BA03, endpoint: 01, cluster: 0008, size: 08, attrId: 0000, encoding: 20, command: 0A, value: 64
dev:482021-12-07 03:09:22.272 pm info[name:level, value:39]
dev:482021-12-07 03:09:22.267 pm debugdescription is read attr - raw: BA030100080800002064, dni: BA03, endpoint: 01, cluster: 0008, size: 08, attrId: 0000, encoding: 20, command: 0A, value: 64
sys:12021-12-07 03:09:21.447 pm Unable to execute hubAction:st cmd 0xBA03 0x01 6 0 {} sent from Master WC Light, invalid or unspecified protocol.
dev:482021-12-07 03:09:21.444 pm traceSending current state to device [st cmd 0xBA03 0x01 6 0 {}]
dev:482021-12-07 03:09:21.441 pm debugCreating on/off response
dev:482021-12-07 03:09:21.439 pm debugParse returned Master WC Light button was pressed
dev:482021-12-07 03:09:21.436 pm debugdescription is catchall: 0104 0006 01 01 0040 00 BA03 01 00 0000 02 00
dev:482021-12-07 03:09:21.267 pm info[name:level, value:39]
dev:482021-12-07 03:09:21.262 pm debugdescription is read attr - raw: BA030100080800002064, dni: BA03, endpoint: 01, cluster: 0008, size: 08, attrId: 0000, encoding: 20, command: 0A, value: 64

Here is where I'm at with the driver:

metadata {
    definition (name: "Centralite Dimmer", namespace: "sparks244", author: "Reid Keith") {
        capability "PushableButton"
        capability "Switch"
        capability "Switch Level"

        fingerprint profileId: "0104", deviceId: "0101", inClusters: "0000, 0003, 0004, 0005, 0006, 0008", manufacturer: "CentraLite Systems", model: "Dimmer Switch", deviceJoinName: "WorksWith Dimmer"
      }


}

// Parse incoming device messages to generate events
def parse(String description) {
    Map map = [:]
    log.debug "description is $description"
	
    def event = zigbee.getEvent(description)
    
    if (description?.startsWith('catchall:')) {
       // call parseCatchAllMessage to parse the catchall message received
       map = parseCatchAllMessage(description)
       if (map.value == "pushed") {
         List cmds = onoffResponse()
         def result = []
    	 log.trace "Sending current state to device ${cmds}"
         result = cmds?.collect { new hubitat.device.HubAction(it) }  
         return result
       }
    }
    
    if (event) {
    	log.info event
    	if (event.name == "level") {
    		event.value = (event.value as Integer) * 100 / 39  //update level to overcome return of 39 as max from switch
            sendEvent(event)
    	}
    	else {
       		sendEvent(event)
        }
    }
    else {
        log.warn "DID NOT PARSE MESSAGE for description : $description"
        log.debug zigbee.parseDescriptionAsMap(description)
    }
}

def onoffResponse() {
	log.debug "Creating on/off response"
    def swtch = device.currentState("switch")?.value	// Get the current on off value
    if (swtch == "on"){
        swtch = "0"								
    }else{
        swtch = "1"							
    }    
    [
       	"st cmd 0x${device.deviceNetworkId} 0x${device.endpointId} 6 ${swtch} {}"	// Set On or Off
    ]
}

def off() {
    zigbee.off()
}

def on() {
    zigbee.on()
}

def setLevel(value) {
    log.debug "setLevel called. Value: $value"
    state.level = value
    sendEvent(name: "level", value: value)
    zigbee.setLevel(value*39/100)
}

def refresh() {
    zigbee.onOffRefresh() + zigbee.levelRefresh() + zigbee.onOffConfig() + zigbee.levelConfig()
}

def configure() {
    log.debug "Configuring Reporting and Bindings."
    zigbee.onOffConfig() + zigbee.levelConfig() + zigbee.onOffRefresh() + zigbee.levelRefresh()
}

private Map parseCatchAllMessage(String description) {
  // Create a map from the raw zigbee message to make parsing more intuitive
  def msg = zigbee.parse(description)
  Map result = [:]
  switch(msg.clusterId) {
    case 6:
      switch(msg.command) {
        case 2: // button pressed
          result = [
            name: 'button',
            value: 'pushed',
            data: [buttonNumber: 1],
            descriptionText: "$device.displayName button was pressed",
            isStateChange: true
          ]
          log.debug "Parse returned ${result?.descriptionText}"
          return result
          break
      }
  }
  result = [value: 'nothing']
}

I know the problem is this line:
"st cmd 0x${device.deviceNetworkId} 0x${device.endpointId} 6 ${swtch} {}" // Set On or Off
I can't find the Hubitat equivalent in any of the documentation.

What exactly is the issue with the stock zigbee dimmer driver and this device?

The generic driver has the same issue. Will not actuate when button is pushed.

Also, the scaling for the dimmer is inaccurate. This driver compensates for the discrepancy.

I have no idea what this means, I've probably worked with 50 different cluster 8 devices and have never needed to do anything different with the setLevel level parameter.

When what button is pushed?, the on command in the driver?, again i dont know what this means either.

When I refer to button, I mean the physical button that is on the front of the wall mounted switch. The ST driver monitored the physical button and either turned on or off depending on the current state. The generic driver does not perform this function and the driver I used with ST has one line of code that is broken as I stated in my post. The software commands work fine with no issues.

It appears I have found a switch that you haven't worked with before. If you look at the driver I posted you'll see a scaling factor built in. This driver makes the switch dim appropriately from 1-100 instead of the default which maxes out at 39. I would be happy to send you a switch to use for development if it would help.

sure that would be great, I will return it.
Centralite sent me samples of these before they went bankrupt several years ago, but I prefer to work with a more recent sample in case they have different firmware.

I have them from a builder install a few years ago. Spectrum sponsored the install in my entire housing community. Many people did nothing with them or they swapped them out and discarded them, some signed up for the Spectrum home automation program and others, like myself paired them with another system. I think there are others out there that may have given up on integrating them due to lack of driver support. Hopefully if you're able to help, it will benefit others.

Thanks

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.