Cree to offer Zigbee LED smart bulb

I’ve tried most of the device types that I thought were in any way applicable, and nothing.

I do see (from an older thread concerning the GE Link bulbs) that I have an old version of firmware (000.011.00603) and Zigbee firmware (1.3.1) on my hub that wasn’t working well with those, so that could be part of the problem. Emailing support to try and get an update done.

Update: Tyler pushed the latest firmware to my Hub, none of the applicable device types work. Still have the old ZigBee FW but I will ask for that to be updated as well.

By the way, if anyone is looking to pick these up, they were listed as ‘no home’ in my local Home Depot, meaning they weren’t on display and an associate had to get them down off top stock for me.

Picked up 2 of these today at Home Depot. They were on the shelf with the Leviton Zwave switches/outlets at the end of the lighting aisle. Also no luck in getting it connected with ST.

I see I can pick up either a Wink Hub for about $20, or get a Hue bridge - perhaps 35’ish on eBay. Would you say the Wink Hub is the cheapest temporary solution to get the bulbs running?

Thanks

Support told me they are going to be working on this starting Monday, and hope to have something out early in the week. So I would at least give them a few days to get it sorted.

Did you try “Zigbee Hue Bulb”? Or maybe suggestions from the below thread. What does the raw description say in the IDE?

Tried the following: (not in order, just top of the list down)

Dimmer Switch
GE Link Bulb
Hue Bulb
SmartPower Outlet
Sylvania Ultra IQ
TCP Bulb
ZigBee Dimmer
ZigBee Hub Bulb

Raw Description is: 0A C05E 0100 02 07 0000 1000 0004 0003 0005 0006 0008 02 0000 0019

You could try this code. I just altered the GE Link Bulb to match the right fingerprint profile/clusters. If it doesn’t seem to work, try starting the live logs in the IDE and pressing refresh. My guess is the device types aren’t talking to the correct endpoint on the Cree.

/**
 *  Test
 *
 *  Copyright 2014 SmartThings
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 *  Thanks to Chad Monroe @cmonroe and Patrick Stuart @pstuart
 *
 */
metadata {
	definition (name: "Zigbee Cree Bulb", namespace: "smartthings", author: "SmartThings") {
	
    	capability "Actuator"
        capability "Configuration"
        capability "Refresh"
		capability "Sensor"
        capability "Switch"
		capability "Switch Level"

		fingerprint profileId: "C05E", inClusters: "0000,0003,0004,0005,0006,0008,1000", outClusters: "0000,0019"
	}

	// simulator metadata
	simulator {
		// status messages
		status "on": "on/off: 1"
		status "off": "on/off: 0"

		// reply messages
		reply "zcl on-off on": "on/off: 1"
		reply "zcl on-off off": "on/off: 0"
	}

	// UI tile definitions
	tiles {
		standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) {
			state "off", label: '${name}', action: "switch.on", icon: "st.switches.light.off", backgroundColor: "#ffffff"
			state "on", label: '${name}', action: "switch.off", icon: "st.switches.light.on", backgroundColor: "#79b821"
		}
		standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat") {
			state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
		}
		controlTile("levelSliderControl", "device.level", "slider", height: 1, width: 3, inactiveLabel: false) {
			state "level", action:"switch level.setLevel"
		}
		valueTile("level", "device.level", inactiveLabel: false, decoration: "flat") {
			state "level", label: 'Level ${currentValue}%'
		}
		

		main(["switch"])
		details(["switch", "level", "levelSliderControl", "refresh"])
	}
}

// Parse incoming device messages to generate events
def parse(String description) {
	log.trace description
	if (description?.startsWith("catchall:")) {
		//def msg = zigbee.parse(description)
		//log.trace msg
		//log.trace "data: $msg.data"
        if(description?.endsWith("0100"))
        {
        	def result = createEvent(name: "switch", value: "on")
            log.debug "Parse returned ${result?.descriptionText}"
            return result
        }
        if(description?.endsWith("0000"))
        {
        	def result = createEvent(name: "switch", value: "off")
            log.debug "Parse returned ${result?.descriptionText}"
            return result
        }
	}
    if (description?.startsWith("read attr")) {
    	log.debug description[-2..-1]
        def i = Math.round(convertHexToInt(description[-2..-1]) / 256 * 100 )
        
		sendEvent( name: "level", value: i )
    }
    
	
}

def on() {
	log.debug "on()"
	sendEvent(name: "switch", value: "on")
	"st cmd 0x${device.deviceNetworkId} 1 6 1 {}"
}

def off() {
	log.debug "off()"
	sendEvent(name: "switch", value: "off")
	"st cmd 0x${device.deviceNetworkId} 1 6 0 {}"
}

def refresh() {
	[
	"st rattr 0x${device.deviceNetworkId} 1 6 0", "delay 500",
    "st rattr 0x${device.deviceNetworkId} 1 8 0"
    ]
}

def setLevel(value) {
	log.trace "setLevel($value)"
	def cmds = []

	if (value == 0) {
		sendEvent(name: "switch", value: "off")
		cmds << "st cmd 0x${device.deviceNetworkId} 1 8 0 {0000 0000}"
	}
	else if (device.latestValue("switch") == "off") {
		sendEvent(name: "switch", value: "on")
	}

	sendEvent(name: "level", value: value)
	def level = new BigInteger(Math.round(value * 255 / 100).toString()).toString(16)
	cmds << "st cmd 0x${device.deviceNetworkId} 1 8 4 {${level} 0000}"

	//log.debug cmds
	cmds
}

def configure() {

	String zigbeeId = swapEndianHex(device.hub.zigbeeId)
	log.debug "Confuguring Reporting and Bindings."
	def configCmds = [	
  
        //Switch Reporting
        "zcl global send-me-a-report 6 0 0x10 0 3600 {01}", "delay 500",
        "send 0x${device.deviceNetworkId} 1 1", "delay 1000",
        
        //Level Control Reporting
        "zcl global send-me-a-report 8 0 0x20 5 3600 {0010}", "delay 200",
        "send 0x${device.deviceNetworkId} 1 1", "delay 1500",
        
        "zdo bind 0x${device.deviceNetworkId} 1 1 6 {${device.zigbeeId}} {}", "delay 1000",
		"zdo bind 0x${device.deviceNetworkId} 1 1 8 {${device.zigbeeId}} {}", "delay 500",
	]
    return configCmds + refresh() // send refresh cmds as part of config
}



private hex(value, width=2) {
	def s = new BigInteger(Math.round(value).toString()).toString(16)
	while (s.size() < width) {
		s = "0" + s
	}
	s
}

private Integer convertHexToInt(hex) {
	Integer.parseInt(hex,16)
}

private String swapEndianHex(String hex) {
    reverseArray(hex.decodeHex()).encodeHex()
}

private byte[] reverseArray(byte[] array) {
    int i = 0;
    int j = array.length - 1;
    byte tmp;
    while (j > i) {
        tmp = array[j];
        array[j] = array[i];
        array[i] = tmp;
        j--;
        i++;
    }
    return array
}

Tried the code. No luck. What am I looking for in the logging?

This is all it shows:

b8a65154-0382-42a9-a024-c60a1357fe7f 10:12:42 AM: trace setLevel(62)
b8a65154-0382-42a9-a024-c60a1357fe7f 10:12:33 AM: trace setLevel(34)
b8a65154-0382-42a9-a024-c60a1357fe7f 10:12:25 AM: debug on()
b8a65154-0382-42a9-a024-c60a1357fe7f 10:12:23 AM: debug off()
b8a65154-0382-42a9-a024-c60a1357fe7f 10:12:04 AM: debug on()
b8a65154-0382-42a9-a024-c60a1357fe7f 10:11:41 AM: debug off()
b8a65154-0382-42a9-a024-c60a1357fe7f 10:11:38 AM: debug off()
b8a65154-0382-42a9-a024-c60a1357fe7f 10:11:37 AM: debug off()

I was hoping to see some kind of zigbee message from the bulb back to the hub. It doesn’t look like any communication is happening or else we should see the incoming message via parse() logging. Might have to wait for ST to get on this.

Ah, ok. Yeah, I tried a few different device types right now and got no response back at all.

+1 on this I have 3 of them. Home Depot has started carrying them

+1 as well. I picked up 2 of these today to replace a few GE Links I picked up last week. I’m a Cree fas, so I wanted to replace the GEs with Cree. Hopefully these will be working with Smartthings soon.

I also picked up a CREE connected bulb today at Home Depot. As mentioned in earlier post, They were not located where you would expect and had to get someone look up and search for the location of the 11 bulbs that were supposed to be in the store. Found them on high shelf not even close to where LED bulbs were located … very new in store :slight_smile:
Brought it home, turned on sniffer, allowed it to join and as indicated before, it was listed as unknown.
I am sure the ST team will have this up and running properly very quickly. the two main items that need to be modified is the profile ID and the end point. I use the GE bulb as starting point. and edited the profile from 0104 which is ZHA to C05E which is for ZLL ( that is what the CREE bulb is designed for ( but ZLL has modes that are compatible with ZHA )
then in the various command lines … the GE bulb is using end point 1 and i changed that to 10 as indicated by the sniffer captures i had from when the bulb joined the network.
So now i can tune the CREE bulb on and off and dim … Did not try to go beyond that at this time. but certainly this will be easy to get everything properly working by the ST team.

1 Like

Ok… Here is what I have so far No dimming working but on/ off is…

/**

  • Cree Connected from GE Link Bulb
  • Copyright 2014 SmartThings
  • Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at:
  •  http://www.apache.org/licenses/LICENSE-2.0
    
  • Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
  • on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
  • for the specific language governing permissions and limitations under the License.
  • Thanks to Chad Monroe @cmonroe and Patrick Stuart @pstuart

*/
metadata {
definition (name: “Cree Connected Beta TEMP”, namespace: “Temp”, author: “JGray”) {

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

	fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0008,1000", outClusters: "0019"
}

// simulator metadata
simulator {
	// status messages
	status "on": "on/off: 1"
	status "off": "on/off: 0"

	// reply messages
	reply "zcl on-off on": "on/off: 1"
	reply "zcl on-off off": "on/off: 0"
}

// UI tile definitions
tiles {
	standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) {
		state "off", label: '${name}', action: "switch.on", icon: "st.switches.light.off", backgroundColor: "#ffffff"
		state "on", label: '${name}', action: "switch.off", icon: "st.switches.light.on", backgroundColor: "#79b821"
	}
	standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat") {
		state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
	}
	controlTile("levelSliderControl", "device.level", "slider", height: 1, width: 3, inactiveLabel: false) {
		state "level", action:"switch level.setLevel"
	}
	valueTile("level", "device.level", inactiveLabel: false, decoration: "flat") {
		state "level", label: 'Level ${currentValue}%'
	}
	

	main(["switch"])
	details(["switch", "level", "levelSliderControl", "refresh"])
}

}

// Parse incoming device messages to generate events
def parse(String description) {
log.trace description
if (description?.startsWith(“catchall:”)) {
//def msg = zigbee.parse(description)
//log.trace msg
//log.trace "data: $msg.data"
if(description?.endsWith(“0100”))
{
def result = createEvent(name: “switch”, value: “on”)
log.debug "Parse returned ${result?.descriptionText}"
return result
}
if(description?.endsWith(“0000”))
{
def result = createEvent(name: “switch”, value: “off”)
log.debug "Parse returned ${result?.descriptionText}"
return result
}
}
if (description?.startsWith(“read attr”)) {
log.debug description[-2…-1]
def i = Math.round(convertHexToInt(description[-2…-1]) / 256 * 100 )

	sendEvent( name: "level", value: i )
}

}

def on() {
log.debug "on()"
sendEvent(name: “switch”, value: “on”)
“st cmd 0x${device.deviceNetworkId} 10 6 1 {}”
}

def off() {
log.debug "off()"
sendEvent(name: “switch”, value: “off”)
“st cmd 0x${device.deviceNetworkId} 10 6 0 {}”
}

def refresh() {
[
“st rattr 0x${device.deviceNetworkId} 1 6 0”, “delay 500”,
“st rattr 0x${device.deviceNetworkId} 1 8 0”
]
}

def setLevel(value) {
log.trace "setLevel($value)"
def cmds = []

if (value == 0) {
	sendEvent(name: "switch", value: "off")
	cmds << "st cmd 0x${device.deviceNetworkId} 1 8 0 {0000 0000}"
}
else if (device.latestValue("switch") == "off") {
	sendEvent(name: "switch", value: "on")
}

sendEvent(name: "level", value: value)
def level = new BigInteger(Math.round(value * 255 / 100).toString()).toString(16)
cmds << "st cmd 0x${device.deviceNetworkId} 1 8 4 {${level} 0000}"

//log.debug cmds
cmds

}

def configure() {

String zigbeeId = swapEndianHex(device.hub.zigbeeId)
log.debug "Confuguring Reporting and Bindings."
def configCmds = [	

    //Switch Reporting
    "zcl global send-me-a-report 6 0 0x10 0 3600 {01}", "delay 500",
    "send 0x${device.deviceNetworkId} 1 1", "delay 1000",
    
    //Level Control Reporting
    "zcl global send-me-a-report 8 0 0x20 5 3600 {0010}", "delay 200",
    "send 0x${device.deviceNetworkId} 1 1", "delay 1500",
    
    "zdo bind 0x${device.deviceNetworkId} 1 1 6 {${device.zigbeeId}} {}", "delay 1000",
	"zdo bind 0x${device.deviceNetworkId} 1 1 8 {${device.zigbeeId}} {}", "delay 500",
]
return configCmds + refresh() // send refresh cmds as part of config

}

private hex(value, width=2) {
def s = new BigInteger(Math.round(value).toString()).toString(16)
while (s.size() < width) {
s = “0” + s
}
s
}

private Integer convertHexToInt(hex) {
Integer.parseInt(hex,16)
}

private String swapEndianHex(String hex) {
reverseArray(hex.decodeHex()).encodeHex()
}

private byte[] reverseArray(byte[] array) {
int i = 0;
int j = array.length - 1;
byte tmp;
while (j > i) {
tmp = array[j];
array[j] = array[i];
array[i] = tmp;
j–;
i++;
}
return array
}

1 Like

New to Smartthings.

Called the my local Home Depot earlier in the week and the employee said he just got them in. He made space on the shelf and I was able to pick a few up today. Glad to see folks working on a solution.

Also noticed that the GE Link bulbs were being advertised for 14.97…

Joshua,

I tried your Device Type but doesn’t seem to work for me. My steps so far:

  • I already had the device added to the hub, detected as generic “Thing”
  • I added your devicetype
  • I assigned my Cree lightbulb devicetype to the device
  • Refreshed the app, saw the light controls
  • Toggled light on/off a few times, but no luck
  • Removed device
  • Readded device (Again detected as generic thing)
  • Manually changed the device type to cree lightbulb
  • Toggled the light on/off a few times, but no luck

Thanks for publishing your device type.
-Pablo

Any update from the ST team on getting this working?

1 Like

I’ve wrapped your code in a code block so that it is easier to read:


/**
 *  Cree Connected from GE Link Bulb
 *
 *  Copyright 2014 SmartThings
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 *  Thanks to Chad Monroe @cmonroe and Patrick Stuart @pstuart
 *
 */
metadata {
    definition (name: "Cree Connected Beta TEMP", namespace: "Temp", author: "JGray") {
    
        capability "Actuator"
        capability "Configuration"
        capability "Refresh"
        capability "Sensor"
        capability "Switch"
        capability "Switch Level"

        fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0008,1000", outClusters: "0019"
    }

    // simulator metadata
    simulator {
        // status messages
        status "on": "on/off: 1"
        status "off": "on/off: 0"

        // reply messages
        reply "zcl on-off on": "on/off: 1"
        reply "zcl on-off off": "on/off: 0"
    }

    // UI tile definitions
    tiles {
        standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) {
            state "off", label: '${name}', action: "switch.on", icon: "st.switches.light.off", backgroundColor: "#ffffff"
            state "on", label: '${name}', action: "switch.off", icon: "st.switches.light.on", backgroundColor: "#79b821"
        }
        standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat") {
            state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
        }
        controlTile("levelSliderControl", "device.level", "slider", height: 1, width: 3, inactiveLabel: false) {
            state "level", action:"switch level.setLevel"
        }
        valueTile("level", "device.level", inactiveLabel: false, decoration: "flat") {
            state "level", label: 'Level ${currentValue}%'
        }
        

        main(["switch"])
        details(["switch", "level", "levelSliderControl", "refresh"])
    }
}

// Parse incoming device messages to generate events
def parse(String description) {
    log.trace description
    if (description?.startsWith("catchall:")) {
        //def msg = zigbee.parse(description)
        //log.trace msg
        //log.trace "data: $msg.data"
        if(description?.endsWith("0100"))
        {
            def result = createEvent(name: "switch", value: "on")
            log.debug "Parse returned ${result?.descriptionText}"
            return result
        }
        if(description?.endsWith("0000"))
        {
            def result = createEvent(name: "switch", value: "off")
            log.debug "Parse returned ${result?.descriptionText}"
            return result
        }
    }
    if (description?.startsWith("read attr")) {
        log.debug description[-2..-1]
        def i = Math.round(convertHexToInt(description[-2..-1]) / 256 * 100 )
        
        sendEvent( name: "level", value: i )
    }
    
    
}

def on() {
    log.debug "on()"
    sendEvent(name: "switch", value: "on")
    "st cmd 0x${device.deviceNetworkId} 10 6 1 {}"
}

def off() {
    log.debug "off()"
    sendEvent(name: "switch", value: "off")
    "st cmd 0x${device.deviceNetworkId} 10 6 0 {}"
}

def refresh() {
    [
    "st rattr 0x${device.deviceNetworkId} 1 6 0", "delay 500",
    "st rattr 0x${device.deviceNetworkId} 1 8 0"
    ]
}

def setLevel(value) {
    log.trace "setLevel($value)"
    def cmds = []

    if (value == 0) {
        sendEvent(name: "switch", value: "off")
        cmds << "st cmd 0x${device.deviceNetworkId} 1 8 0 {0000 0000}"
    }
    else if (device.latestValue("switch") == "off") {
        sendEvent(name: "switch", value: "on")
    }

    sendEvent(name: "level", value: value)
    def level = new BigInteger(Math.round(value * 255 / 100).toString()).toString(16)
    cmds < i) {
        tmp = array[j];
        array[j] = array[i];
        array[i] = tmp;
        j--;
        i++;
    }
    return array
}
4 Likes

@dckirker has a device type that we’re testing. It’s currently working with on/off and dimming.

3 Likes

Getting an error with that code in the ide

× No signature of method: script14223174801861098918835.metadata() is applicable for argument types: (script14223174801861098918835$_run_closure1) values: [script14223174801861098918835$_run_closure1@352338ac] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)

Unable to save it. Getting an error that I posted above.