FAQ: Exact remote needed to reset Hue bulbs? (UK)

Hey Kevin,

These two bulbs are Hue lux. Yes they do appear as things and act the way you described.

I also have a Hue white still connected to Hue hub.

My conclusion is:

The old hue bulbs are okay with ST. Hue lux and White are not
Can someone help? Would logs help?

Thanks

Can you go to the Device screen for one of the bulbs in the IDE and paste here what is in the line Raw Description?

There was a similar issue with Osram simple white bulbs where the stock zigbee bulb devicetypes wouldn’t work. We might be able to hard code the endpoint number to get it working like we did for the Osram.

Hi @Sticks18, not sure if that request was directed at me or @ktsi, but unfortunately the Raw Description field is not present in the IDE for the bulb, I guess this is due to the fact It never finishes the identification process in the app.

Is there any other way to acquire it?

It’s also sometimes in the join event, so if you could reset and re-pair the bulb while running live logging, you might see it there.

In general if you set the bulb to the zigbee dimmer device type, start live logging and try to dim/turn on/off; do you get an error in the logs?

Nothing shows up in the logs when I set the device type to Zigbee dimmer, and I don’t have a remote handy to reset the bulb so I cant properly reset it. I’ve tried removing the bulb and then repairing, but again nothing written to the logs.

Possibly @ktsi may have more luck as he has a remote to reset the bulbs, but after reading his earlier post I’m not 100% convinced it will work. I was contemplating buying a remote for myself but it wasn’t much more expensive to buy another Osram Lightify bulb which do work so chose that option instead.

Hopefully we’ll be able to get the bulbs working as I think the New Hue bulbs are brighter and have a better colour temperature range.

The Hue White bulbs can’t vary their color temperature that I’m aware of. Only the Hue color can do both RBG and White color temp. Maybe something is out in the UK though…

If Hue always uses the same endpoint, then this might work:

/**
 *  Copyright 2015 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.
 *
 */
metadata {
	definition (name: "Zigbee Hue White - HC", namespace: "smartthings", author: "SmartThings") {
		capability "Switch Level"
		capability "Actuator"
		capability "Switch"
		capability "Configuration"
		capability "Sensor"
		capability "Refresh"

		fingerprint profileId: "C05E", inClusters: "0000,0003,0004,0005,0006,0008", 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 "on", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#79b821", nextState:"turningOff"
			state "off", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
			state "turningOn", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#79b821", nextState:"turningOff"
			state "turningOff", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
		}
		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:'${currentValue} %', unit:"%", backgroundColor:"#ffffff"
		}
		main "switch"
		details(["switch", "refresh", "level", "levelSliderControl"])
	}
}

// Parse incoming device messages to generate events
def parse(String description) {
	log.info description
	def msg = zigbee.parse(description)
	if (description?.startsWith("catchall:")) {
		log.trace msg
		if(description?.endsWith("0100") ||description?.endsWith("1001")) {
			def result = createEvent(name: "switch", value: "on")
			log.debug "Parse returned ${result?.descriptionText}"
			return result
		}
		if(description?.endsWith("0000") || description?.endsWith("1000")) {
			def result = createEvent(name: "switch", value: "off")
	log.debug "Parse returned ${result?.descriptionText}"
	return result
		}
	}
	else {
		def name = description?.startsWith("on/off: ") ? "switch" : null
		def value = name == "switch" ? (description?.endsWith(" 1") ? "on" : "off") : null
		def result = createEvent(name: name, value: value)
		log.debug "Parse returned ${result?.descriptionText}"
		return result
	}

   if (description?.startsWith("read attr")) {
		Map descMap = (description - "read attr - ").split(",").inject([:]) { map, param ->
			def nameAndValue = param.split(":")
			map += [(nameAndValue[0].trim()):nameAndValue[1].trim()]
			}
		
		log.debug "Desc Map: $descMap"
 
		switch (descMap.cluster) {

			case "0008":

				log.debug description[-2..-1]
				def i = Math.round(convertHexToInt(descMap.value) / 256 * 100 )
				sendEvent( name: "level", value: i )
		sendEvent( name: "switch.setLevel", value: i) //added to help subscribers
		break
		}
  	}
}


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

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

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

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

	sendEvent(name: "level", value: value)
	def level = hexString(Math.round(value * 255/100))
	cmds << "st cmd 0x${device.deviceNetworkId} 0x0B 8 4 {${level} 1500}"

	//log.debug cmds
	cmds
}

def refresh() {
	[
		"st wattr 0x${device.deviceNetworkId} 0x0B 6 0", "delay 200",
		"st wattr 0x${device.deviceNetworkId} 0x0B 8 0"
	]
}

def configure() {

	log.debug "binding to switch and level control cluster"
	[
		"zdo bind 0x${device.deviceNetworkId} 0x0B 1 6 {${device.zigbeeId}} {}", "delay 1000",
		"zdo bind 0x${device.deviceNetworkId} 0x0B 1 8 {${device.zigbeeId}} {}", "delay 500",

		//Switch Reporting
		"zcl global send-me-a-report 6 0 0x10 0 3600 {01}", "delay 500",
		"send 0x${device.deviceNetworkId} 0x0B 1", "delay 500",

		//Level Control Reporting
		"zcl global send-me-a-report 8 0 0x20 5 3600 {0010}", "delay 200",
		"send 0x${device.deviceNetworkId} 0x0B 1"
	]

}



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

private getEndpointId() {
	new BigInteger(device.endpointId, 16).toString()
}
1 Like

Thanks for this, I’ll give it a try when I get home. Regarding the Hue colour temp, not entirely sure if they do have it, just noticed it when trying one of the Hue Zigbee white device types and assumed they would have it. Either way though, the out of the box colour temp is better than anything I can get from my Osram bulbs.

Just tried the new device handler and it works!!!
I cannot thank you enough my friend!

BTW, i have gathered logs from the time i tried connecting the bulb to the hub. This was before i saw your latest post. If you think you need them, please let me know.

Again THANK YOU so much!

2 Likes

You’ve only gone and done it… Working perfectly, thanks so much.:grinning:

2 Likes

Hey guys,

Sorry I’m not using any of the new Hue White bulbs so I can’t try reseting them with the remote. I bought a couple only to realize that they were screw when I need bayonet…

I’d be very surprised if the generic ZigBee Dimmer device handler does not work for the new Hue Whites though.

I’ve noticed that ST have deprecated device handlers for various ZigBee HA bulbs (like the WeMo bulbs) and moved the footprints for those handlers into the ZigBee Dimmer type. I’ve converted all my Hue Lux and WeMo bulbs to this type and they work fine.

Glad to hear its working though…

1 Like

I agree that they should work with the generic Zigbee dimmer. Based on the raw description being missing, I suspect the initial join didn’t complete fully causing the devicetype code that pulls the endpointId dynamically to fail. It simply can’t find the endpointId properly, which is why the hardcoded endpoint works.

I’ve seen it happen in several threads with unsupported Osram lights and a report of the Kudle hue clone. Unfortunately, ST support understandably won’t be much help because the devices are not officially supported. Usually the users have reported trying to reset and pair again with no success, so I’m happy to try and get someone that works even if it’s not ideal.

@ktsi and @kjj1978, if you’re able and inclined to try, I would suggest you reset your bulbs and pair them again very close to your hub to see if you get a better join. Then see if the Raw Description gets populated and the generic device handler works. You can always fall back to this code again,

Hi there!

I have one Hue white bulb that is currently connected to Hue hub.
I will attempt later on today to reset it as well and connect it to ST hub.

Note however that when I was trying to connect (already have logs - need to get back home first) the two Hue bulbs I was doing that with the hub almost touching the bulb, so distance was no issue.

Do you want these logs?

BTW, i have this screenshot of the “thing” device handler.

I have ordered some more bulbs which should arrive reset so will try your suggestion, either way I’m happy now I can connect them and they seem to function ok.

I’m interested to hear if @ktsi has any success resetting his bulbs, if he does I will purchase the remote. I have no intention of getting the hue bridge, but at some point I can guarantee I will need to replace / upgrade my hub and will need some way of migrating the bulbs over to the new one.

Hey Kev,

What i know is that the philips remote can steal bulbs from the hue hub (zigbee lightlink) and reset them so that the ST hub (zigbee HA 1.2) can see them.

As far as i am aware (i am just saying what i have read), this particular remote cannot steal the bulbs from the ST hub. So if you pair them to the ST hub you are stuck there forever.

Unless you use a special daughterboard (xBee) for a raspberry pi and install the right software. In that case you can reset the bulbs at will and make them available for either the hue or the ST hub.

I think I might do without the remote for now then. I don’t actually need it at the moment, I just don’t want to go and buy a load of Philips Hue bulbs and then have my hub need to be replaced for whatever reason and then have a load of bulbs that are no longer smart.

I might investigate the Raspberry PI option for a more reliable method of resetting, you never know, Smartthings or someone on here may develop a way of doing it through the IDE or app…

I have the remote from this product:
http://www.ebay.com/itm/Philips-LivingColors-Aura-LED-colour-changing-table-lamp-white-remote-control-8W-/131227123006?hash=item1e8dbefd3e:g:hKQAAMXQuCdTfgot

But it does not help resetting my bulb to ZL profile.
How does the remote here differ from it ?

I have this remote and I used it to"steal" hue bulbs from the hue hub. I do not think it can be used if you want to steal bulbs from the ST hub.

1 Like

Hi, don’t know whether this helps but…

I have 4 Hue Lux White bulbs - 3 were connected to the Hue hub and 1 directly connected to ST

My ST Hub failed and had to be replaced, this meant everything had to be reconnected to the new hub

I bought one of the remotes (pictured above), reset every bulb, omitted the Hue hub and paired them all to ST

1 Like

which one you mean ?
the one from the living colors aura or the bigger one with more buttons.
because for the bigger one I read on this thread that it can be used to reset hue bulbs (like the Lutron remote)

This is the one

Took 3 bulbs away from the Hue Bridge

One bulb was paired to the ST hub that was broken and returned
The remote reset the bulb and I just paired to the new ST hub