Problems with certain Color Temperature & RGBW Bulbs

Here is a screenshot of the bulb event log:


Look at the time stamps.
See how I activated the scene at 01:46:49 - Only colorTemperature event is sent and the level remains unchanged. I don't know what this colorName is, still it is probably not related to the level. After I repeated the the scene activation at 01:52:41 the level event is sent and the device changed it's level accordingly.

I use all my RGBW devices as CT devices actually, and these IKEA bulbs are CT. I don't see setColor in the events. Is this is what happens in the back-end when I see colorTemperature and level in the events?

Yeah, I've seen this before. But it's not actually an issue with Scene. It has to do with the device or its driver. Turn on logging for the device, maybe even debug logging.

For color temperature Scene does send two commands, the setColorTemperature first, followed by setLevel. For color it sends a single setColor command. What happens after that is up to the driver and device.

The IKEA device has its debug logging on and description text logging on. It is using Generic Zigbee CT Bulb (dev) driver.

I have the device at 100% and 4000k. I turn on a scene to make it 50% and 3200K. This is what I am seeing in the log:

dev:4892020-09-13 02:47:57.661 infoWork Place Spot 1 is 100%
dev:4892020-09-13 02:47:57.657 debugevt- rawValue:254, value: 100, descT: Work Place Spot 1 is 100%
dev:4892020-09-13 02:47:57.632 debugParse: read attr - raw: 21090100080A000020FE, dni: 2109, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: FE
dev:4892020-09-13 02:47:57.555 infoWork Place Spot 1 color temperature was set to 3205°K
dev:4892020-09-13 02:47:57.552 debugevt- rawValue:312, value: 3205, descT: Work Place Spot 1 color temperature was set to 3205°K
dev:4892020-09-13 02:47:57.547 infoWork Place Spot 1 color is Soft White
dev:4892020-09-13 02:47:57.543 debugParse: read attr - raw: 21090103000C0700213801, dni: 2109, endpoint: 01, cluster: 0300, size: 0C, attrId: 0007, encoding: 21, command: 01, value: 3801
dev:4892020-09-13 02:47:56.170 debugParse: catchall: 0104 0008 01 01 0040 00 2109 00 00 0000 0B 01 0400
dev:4892020-09-13 02:47:56.110 debugParse: catchall: 0104 0300 01 01 0040 00 2109 00 00 0000 0B 01 0A00

Why it is sending level 100% to the bulb instead of 50%?

Activating the scene for a second time and the Log says:

dev:4892020-09-13 02:54:52.851 infoWork Place Spot 1 was set to 50%
dev:4892020-09-13 02:54:52.848 debugevt- rawValue:127, value: 50, descT: Work Place Spot 1 was set to 50%
dev:4892020-09-13 02:54:52.840 debugParse: read attr - raw: 21090100080A0000207F, dni: 2109, endpoint: 01, cluster: 0008, size: 0A, attrId: 0000, encoding: 20, command: 01, value: 7F
dev:4892020-09-13 02:54:52.822 infoWork Place Spot 1 color temperature is 3205°K
dev:4892020-09-13 02:54:52.819 debugevt- rawValue:312, value: 3205, descT: Work Place Spot 1 color temperature is 3205°K
dev:4892020-09-13 02:54:52.808 infoWork Place Spot 1 color is Soft White
dev:4892020-09-13 02:54:52.804 debugParse: read attr - raw: 21090103000C0700213801, dni: 2109, endpoint: 01, cluster: 0300, size: 0C, attrId: 0007, encoding: 21, command: 01, value: 3801
dev:4892020-09-13 02:54:51.337 debugParse: catchall: 0104 0008 01 01 0040 00 2109 00 00 0000 0B 01 0400
dev:4892020-09-13 02:54:51.311 debugParse: catchall: 0104 0300 01 01 0040 00 2109 00 00 0000 0B 01 0A00

And now finally the 50% level is sent.
A bug?

Edit: Oh, I just got that I am seeing what the device is reporting for level and temperature. Can't tell what is being sent, though.

Yeah. Scene is sending the right value, I'd imagine. Not sure why the bulb is missing it. If I get some time I'll post is little app to test with, to get Scene out of the equation. Question is, does the bulb respond correctly when temperature and level are sent back to back in quick succession. I may not get to this until tomorrow, but it would be very interesting to see if that's the problem.

Here is the little test app. See if your bulbs turn on as expected with this.

definition(
	name: "ColorTemp Bulb Tester",
	namespace: "hubitat",
	author: "Bruce Ravenel",
	description: "Color Temperature Bulb Tester",
	category: "Convenience",
	iconUrl: "",
	iconX2Url: ""
)

preferences {
	page(name: "mainPage")
}

def mainPage() {
	dynamicPage(name: "mainPage", title: "ColorTemp Bulb Tester", uninstall: true, install: true) {
		section {
			input "bulb", "capability.colorTemperature", title: "Select color temperature bulb(s)", multiple: true, submitOnChange: true
			input "level", "number", title: "Set level", submitOnChange: true, range: "0..100", width: 6
			input "temp", "number", title: "Set temperature", submitOnChange: true, range: "1500..9000", width: 6
			input "turnOn", "button", title: "Turn On", width: 2
			input "turnOff", "button", title: "Turn Off", width: 2
		}
	}
}

def appButtonHandler(btn) {
	switch(btn) {
		case "turnOn":
			bulb.setColorTemperature(temp)
			bulb.setLevel(level)
			break
		case "turnOff": bulb.off()
	}
}

def updated() {
}

def installed() {
}

Just in case this helps; I have been using scenes with motion lighting and button controller apps to set CT and level throughout the day. I have not experienced any problems with it not working as expected. I have mostly Sylvania Smart+ rgbws and some Sengled rgbw bulbs (my Hue use the Hue scenes). I do have color prestaging enabled on all of them if it matters (it shouldn’t). All bulbs are on the latest firmware as well. On the other hand, I have seen people mention that the timings, or lack of delay between commands, in the driver are to much for some bulbs to keep up with.

1 Like

Yes a known issue with European lamps and ZigBee 3.0 lamps that was found beginning of last year. They have to be turned ON before they except a change in Kelvin or RGB. The built in driver doesn't expect this and give options for pre staging which doesn't work with them. The way to prove this is on the device page, set a colour or temp then turn it off and send a different colour or temp and it will only turn ON to the previous values. On and l set level is the only things that are accepted. It happened on ST too but it was more random on there and I put that down too how slow it was so sometimes it would get the command.

The fix is a new driver for ZigBee 3.0 lamps that when sending a colour or temp if the lamp is off split the commands send a ON then a delay of 200ms then the RGB or Kelvin value. The "issue" with this is that the lights transition when they turn ON but if that's how it's always been it's not a problem. The current driver can still be used for legacy lamps it's just that every ZigBee 3.0 lamp I have tried don't work like that.

1 Like

You have mentioned that before, but I forgot about that. Is there a revised driver yet?

unfortunately not, they have a box full of aurora zigbee 3.0 lamps to test with and create drivers for but my guess is that the C7 got in the way. It seems to pop up more and more often so my guess is there is more of these newer lamps getting into the market, so they will have to put some time aside and get it done soon.

Thank you very much.
I am trying it now and it repeats the behaviour from yesterday. First time pressing on changes the level second time changes the color temp. I changed the order of the commands in the app and the same thing happened still in another order.

OK. This is going to require fixes to the drivers for color temperature bulbs. We will look further into this. Meanwhile, here is a variation of the app from above, that allows the introduction of a delay between the two commands. Play with this and see if there is a combination that works.

definition(
	name: "ColorTemp Bulb Tester",
	namespace: "hubitat",
	author: "Bruce Ravenel",
	description: "Color Temperature Bulb Tester",
	category: "Convenience",
	iconUrl: "",
	iconX2Url: ""
)

preferences {
	page(name: "mainPage")
}

def mainPage() {
	dynamicPage(name: "mainPage", title: "ColorTemp Bulb Tester", uninstall: true, install: true) {
		section {
			input "bulb", "capability.colorTemperature", title: "Select color temperature bulb(s)", multiple: true, submitOnChange: true
			input "level", "number", title: "Set level", submitOnChange: true, range: "0..100", width: 4
			input "temp", "number", title: "Set temperature", submitOnChange: true, range: "1500..9000", width: 4
			input "delay", "number", title: "Set delay in milliseconds", submitOnChange: true, width: 4
			input "turnOn", "button", title: "Turn On", width: 2
			input "turnOff", "button", title: "Turn Off", width: 2
		}
	}
}

def appButtonHandler(btn) {
	switch(btn) {
		case "turnOn":
			bulb.setColorTemperature(temp)
			pauseExecution(delay)
			bulb.setLevel(level)
			break
		case "turnOff": bulb.off()
	}
}

def updated() {
}

def installed() {
}

Thanks @bravenel , I played with the updated app. I tried many delays and when I reached 1000ms it worked. So it seems that @BorrisTheCat advice for 200ms delay won't work for these IKEA bulbs.

I noticed that when I change the level or the color temp the bulb does a transition to a the new value, I think it is configured to take 1 second. During that second, the bulb is not accepting any other commands. Probably this is IKEA's implementation.

I wonder whether this is configurable via IKEA Gateway for example. I will look for that option.

Does someone know where I can find the source code of the Generic Zigbee CT Bulb (dev) driver? I wonder whether the timeout trick could be easily added?

These driver sources are not generally available. It's going to take some effort on our part to sort through this, as different brands of bulbs handle this differently.

For an interim work around, you could use a virtual switch in the scene. That switch could trigger a rule that handles the two commands with the 1 second delay.

i wouldn't say so as i just tried the app and can't get it to work correctly even at 1000ms. But if the driver has a 200 ms between commands it works. It's possible that different lamps need different delays though so maybe the delay could be a parameter?

i see the problem the order is back to front so its sending temp 1st which is why it wasn't working. It would never work from a off as the "issue" is it won't accept a command other than ON or level from OFF

@wastedabuser try this and it should work with less ms

definition(
	name: "ColorTemp Bulb Tester",
	namespace: "hubitat",
	author: "Bruce Ravenel",
	description: "Color Temperature Bulb Tester",
	category: "Convenience",
	iconUrl: "",
	iconX2Url: ""
)

preferences {
	page(name: "mainPage")
}

def mainPage() {
	dynamicPage(name: "mainPage", title: "ColorTemp Bulb Tester", uninstall: true, install: true) {
		section {
			input "bulb", "capability.colorTemperature", title: "Select color temperature bulb(s)", multiple: true, submitOnChange: true
			input "level", "number", title: "Set level", submitOnChange: true, range: "0..100", width: 4
			input "temp", "number", title: "Set temperature", submitOnChange: true, range: "1500..9000", width: 4
			input "delay", "number", title: "Set delay in milliseconds", submitOnChange: true, width: 4
			input "turnOn", "button", title: "Turn On", width: 2
			input "turnOff", "button", title: "Turn Off", width: 2
		}
	}
}

def appButtonHandler(btn) {
	switch(btn) {
		case "turnOn":
            bulb.setLevel(level)
			pauseExecution(delay)
			bulb.setColorTemperature(temp)
			break
		case "turnOff": bulb.off()
	}
}

def updated() {
}

def installed() {
}

Thanks, I will play with it and figure out a work around based on @bravenel advice .

yes this is the work, around but you can use the changes to confirm the exact delay you need, as i would expect it to be a lot less than 1 s. The key thing is to send the level 1st then the temperature, if you do it the other way round it still wont work correctly when the lamp is off.

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