Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.98k stars 1.67k forks source link

Ikea e27 LED2109G6 wrong color temp range #23343

Open capjack92 opened 3 months ago

capjack92 commented 3 months ago

What happened?

I'm taking inspiration from another post to highlight a problem that I hope can be solved regarding the temperature range of this light bulb. It should be from 6000k to 1780k, but instead it goes from 4000k to 2200k:

Based on the manual of the bulb, it should have a way broader spectrum of white tones.

In the generated definition, the range is 250 to 454 mireds:

extend: [light({"colorTemp":{"range":[250,454]},"color":{"modes":["xy","hs"],"enhancedHue":true}})]

This is what the manual states: image

Based on my calculations the range should be from 167 to 562. Cold sky: 1.000.000 / 6000 = 166,66666666666666666666666666667 Candle light: 1.000.000 / 1780 = 561,79775280898876404494382022472

@Koenkk Is that something that is not detected properly by Zigbee2MQTT when the external definition is generated? If you change these values, will that work?

The definition also shows that it should support XY and HS colors, but in the Zigbee2MQTT front-end, only XY is shown, does that need to be fixed? If we have HS, would it add something to the light? image

Originally posted by @YannickvanVugt in https://github.com/Koenkk/zigbee2mqtt/issues/21755#issuecomment-2179440909

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.39

Adapter firmware version

20220219

Adapter

Sonoff dongle P

Setup

add-on on Home assistant os on mini pc

Debug log

No response

YannickvanVugt commented 3 months ago

I have been wondering if it could be that the Ikea Dirigera Hub mixes in tints of red for warmer colors and blue for colder colors from it's RGB LEDs. Also not sure what the hub would show if you link it up to Home Assistant via Matter, I don't have one. Maybe someone who looks at this post?

I haven't opened up one of the lights to check if the white channel are separate LEDs, as the bulbs were a gift for someone.

Very curious what is going on and if we can get it fixed, I am sure there are more lights that suffer from this.

capjack92 commented 3 months ago

These are the only ones that suffer from this problem... I have several Ikea bulbs, Hue etc.... For example, the Ikea GU10s have the same color spectrum and temperature as the E27s, but on Z2M with the GU10s I don't have this problem because the temp color range goes from 153 to 500. For the hue White Ambiance and hue color e27 the range are the same @YannickvanVugt

luuuuurin commented 1 month ago

Did you find a way to fix it?

capjack92 commented 1 month ago

No, i think @Koenkk needs to modify the database or something similar to fix the problem

Koenkk commented 1 month ago

The values you see in the generated definition are read from the device (so they should be correct).

Based on my calculations the range should be from 167 to 562.

What if you update the external definition with this? Does setting 562 make a diff compared to 454?

capjack92 commented 1 month ago

The values you see in the generated definition are read from the device (so they should be correct).

Based on my calculations the range should be from 167 to 562.

What if you update the external definition with this? Does setting 562 make a diff compared to 454?

Thank you very much for your attention. Regarding the problem, as you can see from the first post, in the manual there are two readings of the device:

on z2m it is practically the definition of the first reading, the limited one. The problem lies in the fact that when you have this bulb in a group with other IKEA Gu10s or Hues, you have different temperature and color results if set simultaneously. I'll give you an example: I have a group with these e27s and some IKEA gu10s, I set a temperature of coolest white for the whole group. I end up with the gu10s which indicate that they are in temp color in a cold white, while the e27s fall into the x/y colors like light blue but this is a software limit because in truth with the IKEA hub they can reach the same (or almost) same color temperature range

Koenkk commented 1 month ago

@capjack92 I guess they set the XY color and not the color temperature then?

capjack92 commented 1 month ago

This happens because the color temperature and color range are incorrect on definition in z2m. Look at these screenshot taken from the manual of this e27. 341201862-8c6512e4-b416-4921-aa72-6d804807e4c6 From the GU10 manual report the same exact information but on z2m the gu10 in color temp the range is 153 to 500 (like hue bulb), while the e27 in color temp the range is 250 to 454. Actually, according to the IKEA manual, the E27 bulb should have the same color range and temperature as the GU10 (and the Hue).

Is it possible to modify the database to have the same definitions of gu10 as ranges?

Sorry for my english, is not my first language

Koenkk commented 1 month ago

Try to stop z2m, edit data/database.db and modify the color temp range (colorTempPhysicalMin/colorTempPhysicalMax) and use the generated definition.

YannickvanVugt commented 1 month ago

Try to stop z2m, edit data/database.db and modify the color temp range (colorTempPhysicalMin/colorTempPhysicalMax) and use the generated definition.

Thanks Koen!

Quickly picked up such a bulb for myself yesterday to try your suggestion.

I did just that, the new generated definition shows a wider temperature range, but it does not allow me to select that range in either the z2m interface or Home Assistant. What's next to try?

const {light} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = {
    zigbeeModel: ['TRADFRI bulb E27 CWS globe 806lm'],
    model: 'TRADFRI bulb E27 CWS globe 806lm',
    vendor: 'IKEA of Sweden',
    description: 'Automatically generated definition',
    extend: [light({"colorTemp":{"range":[167,562]},"color":{"modes":["xy","hs"],"enhancedHue":true}})],
    meta: {},
};

module.exports = definition;

image

image

Koenkk commented 1 month ago

Is the converter loaded? (check that the description in the about page is now Automatically generated definition)

YannickvanVugt commented 1 month ago

Is the converter loaded? (check that the description in the about page is now Automatically generated definition)

I didn't get that you wanted me to create a custom definition with those details. I just did, but when going from cool (250) to coolest (167) or warm (454) to warmest (562), it does not change any color. If I change the color via the Home Assistant front end, it just pushes the value back to 250 or 454 after setting it to the lower or higher values.

So I guess it is a feature only supported by the Ikea Dirigera hub then, it probably does some custom commands to mix in more color, but I am unable to check if it really shows a broader range.

Would there be any way to check that? Or would that require some sniffing of a Dirigera hub, if you could intercept the PAN ID and security keys, to see the packets that it is sending to the bulb?

I guess this ticket can be closed for now as long as there are no other options. Thanks for your help and time! 🙌🏻

capjack92 commented 1 month ago

@YannickvanVugt

what I noticed is that the gu10 (always IKEA) in the z2m database reports "colorTempPhysicalMin":250,"colorTempPhysicalMax":454 ... But on z2m dashboard it actually has a wider range 153-500

YannickvanVugt commented 1 month ago

@YannickvanVugt

what I noticed is that the gu10 (always IKEA) in the z2m database reports "colorTempPhysicalMin":250,"colorTempPhysicalMax":454 ... But on z2m dashboard it actually has a wider range 153-500

Looking at the source code of Zigbee2MQTT, I see the following for these bulbs:

    {
        zigbeeModel: ['TRADFRI bulb GU10 CWS 345lm', 'TRADFRI bulb GU10 CWS 380lm'],
        model: 'LED1923R5',
        vendor: 'IKEA',
        description: 'TRADFRI bulb GU10, color/white spectrum, 345/380 lm',
        extend: [
            addCustomClusterManuSpecificIkeaUnknown(),
            ikeaLight({colorTemp: {range: [153, 500], viaColor: true}, color: true}), // light is pure RGB (XY), advertise 2000K-6500K
            identify(),
        ],
    },

Could you get me the generated definition of these? "viaColor: true" looks promosing, but I need to see it from the definition as the format is different and I do not have these bulbs.

Thanks for your reply, it maybe got us on the right path now!

capjack92 commented 1 month ago

{"id":46,"type":"Router","ieeeAddr":"0xa46dd4fffe4d1934","nwkAddr":52975,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb GU10 CWS 345lm","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":269,"inClusterList":[0,3,4,5,6,8,768,4096,64636],"outClusterList":[25],"clusters":{"genOnOff":{"attributes":{"onOff":1}},"lightingColorCtrl":{"attributes":{"colorCapabilities":31,"colorTempPhysicalMin":250,"colorTempPhysicalMax":454,"colorMode":1,"currentX":20512,"currentY":13762}},"genLevelCtrl":{"attributes":{"currentLevel":51}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":1,"stackVersion":113,"hwVersion":1,"dateCode":"20230913","swBuildId":"1.0.38","zclVersion":8,"interviewCompleted":true,"meta":{"configured":332242049},"lastSeen":1726690613727}

This is what results from database.db sorry but I'm new to z2m so I'm struggling

This is the e27 {"id":47,"type":"Router","ieeeAddr":"0xa46dd4fffe5c598e","nwkAddr":63873,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb E27 CWS globe 806lm","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":269,"inClusterList":[0,3,4,5,6,8,768,4096,64636],"outClusterList":[25],"clusters":{"genOnOff":{"attributes":{"onOff":1}},"genBasic":{"attributes":{"zclVersion":8,"modelId":"TRADFRI bulb E27 CWS globe 806lm","manufacturerName":"IKEA of Sweden","powerSource":1,"appVersion":1,"stackVersion":113,"hwVersion":1,"dateCode":"20230913","swBuildId":"1.0.38"}},"lightingColorCtrl":{"attributes":{"colorCapabilities":31,"colorTempPhysicalMin":250,"colorTempPhysicalMax":454,"colorMode":2,"currentX":37040,"currentY":19700,"colorTemperature":454,"enhancedCurrentHue":0,"currentSaturation":201}},"genLevelCtrl":{"attributes":{"currentLevel":26}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":1,"stackVersion":113,"hwVersion":1,"dateCode":"20230913","swBuildId":"1.0.38","zclVersion":8,"interviewCompleted":true,"meta":{"configured":332242049},"lastSeen":1726694887354}

YannickvanVugt commented 1 month ago

{"id":46,"type":"Router","ieeeAddr":"0xa46dd4fffe4d1934","nwkAddr":52975,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb GU10 CWS 345lm","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":269,"inClusterList":[0,3,4,5,6,8,768,4096,64636],"outClusterList":[25],"clusters":{"genOnOff":{"attributes":{"onOff":1}},"lightingColorCtrl":{"attributes":{"colorCapabilities":31,"colorTempPhysicalMin":250,"colorTempPhysicalMax":454,"colorMode":1,"currentX":20512,"currentY":13762}},"genLevelCtrl":{"attributes":{"currentLevel":51}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":1,"stackVersion":113,"hwVersion":1,"dateCode":"20230913","swBuildId":"1.0.38","zclVersion":8,"interviewCompleted":true,"meta":{"configured":332242049},"lastSeen":1726690613727}

This is what results from database.db sorry but I'm new to z2m so I'm struggling

That's one useful part as well, please check step 2. Creating the external definition, the data from there is what I need. You don't need to do 2.1. 😀

https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html#_2-creating-the-external-definition

capjack92 commented 1 month ago

here it is

`const {light} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = { zigbeeModel: ['TRADFRI bulb GU10 CWS 345lm'], model: 'TRADFRI bulb GU10 CWS 345lm', vendor: 'IKEA of Sweden', description: 'Automatically generated definition', extend: [light({"colorTemp":{"range":[250,454]},"color":{"modes":["xy","hs"],"enhancedHue":true}})], meta: {}, };

module.exports = definition;`

gu10

as you can see it shows the range as 250-454 in generated definition but in truth from the dashboard I can do 153-500 (and it is a real range compared with hue bulbs seen up close)

capjack92 commented 1 month ago

@Koenkk I also tried as a yannik with the same results This is the generated definition

`const {light} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = { zigbeeModel: ['TRADFRI bulb E27 CWS globe 806lm'], model: 'TRADFRI bulb E27 CWS globe 806lm', vendor: 'IKEA of Sweden', description: 'Automatically generated definition', extend: [light({"colorTemp":{"range":[153,500]},"color":{"modes":["xy","hs"],"enhancedHue":true}})], meta: {}, };

module.exports = definition;`

As you can see from the previous post, with the IKEA gu10 I have the same ranges as the e27 in the original generated definitions (range 250-454), but in truth the selectable range is 153-500

YannickvanVugt commented 1 month ago

here it is

`const {light} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = { zigbeeModel: ['TRADFRI bulb GU10 CWS 345lm'], model: 'TRADFRI bulb GU10 CWS 345lm', vendor: 'IKEA of Sweden', description: 'Automatically generated definition', extend: [light({"colorTemp":{"range":[250,454]},"color":{"modes":["xy","hs"],"enhancedHue":true}})], meta: {}, };

module.exports = definition;`

gu10

as you can see it shows the range as 250-454 in generated definition but in truth from the dashboard I can do 153-500 (and it is a real range compared with hue bulbs seen up close)

IT WORKS!!!!

Thanks so much for your help and input, I don't really think that by the original specification these bulbs will/would go further than their advertised generated definition, but thanks to the 'viaColor: true' option it does, but this really works for ANY Ikea bulb that would allow that option! It is an option that is only there for Ikea bulbs.

By my testing, colors are EXACTLY the same when using it with and without viaColor, so that is a VERY GOOD thing.

I have used some unsupported stuff that's not in the official documentation to test this. 🤭 I have been messing with the following piece of code:

const {light} = require('zigbee-herdsman-converters/lib/modernExtend');
const {ikeaLight} = require('zigbee-herdsman-converters/lib/ikea');
// const {DefinitionWithExtend} = require('zigbee-herdsman-converters/lib/types');

const definition = {
    zigbeeModel: ['TRADFRI bulb E27 CWS globe 806lm'],
    model: 'TRADFRI bulb E27 CWS globe 806lm',
    vendor: 'IKEA of Sweden',
    description: 'Automatically generated definition',
    extend: [ikeaLight({"colorTemp":{"range":[100,1000]},"color":{"modes":["xy","hs"],"enhancedHue":true}})],
    // extend: [ikeaLight({"colorTemp":{"range":[100,1000],"viaColor":true},"color":{"modes":["xy","hs"],"enhancedHue":true}})],
    // extend: [addCustomClusterManuSpecificIkeaUnknown(), ikeaLight({"colorTemp":{"range":[167,562],"viaColor":true},"color":{"modes":["xy","hs"],"enhancedHue":true}}), identify()],
    meta: {},
};

module.exports = definition;

// : DefinitionWithExtend[]

The currently used, so the not commented "extend:", only allows me the default range from 250 to 454.

The second "extend:", first comment, allows me fully from the warm red tone (just pure red, 1000k) and "Candle light" (1780k) to "Blue sky" (10000k). As long as you use viaColor, anything will work. So now I can even operate this light outside it's, by manual advertised, range and it all works.

The third "extend:" was just an example, but didn't add much for testing.

Literally any range you throw at it when using the 'viaColor' option will work. From extreme cold (100, 10000k, RGB: 201, 218, 255) to extremely warm (1000, 1000k, almost completely red, RGB: 255, 67, 0). Warmer is not possible, colder is possible, but I haven't checked past 12000k as it's very unlikely that anybody would use that.

@Koenkk : How would you go about the color range?

image

Koenkk commented 1 month ago

When using viaColor, are the color temperatures as accurate as when not using it? This was only meant to be used on IKEA bulbs which support color but not color temp.

YannickvanVugt commented 1 month ago

When using viaColor, are the color temperatures as accurate as when not using it? This was only meant to be used on IKEA bulbs which support color but not color temp.

I only have one bulb at the moment, but it seems to be very accurate from the few datapoints I checked.

I switched everytime between the definition in Z2M and the custom definition and applied the next or previous value to that current temperature and most of the time it didn't change. It's spot on.

Is it with the viaColor option just an RGB value that is send to the bulb?

I will do some more testing if you'd like.

capjack92 commented 1 month ago

@YannickvanVugt I have several bulbs, I can try it myself... Now I'm reading your previous comment, hoping to be able to replicate what you did

@YannickvanVugt i need your help to do what you did

YannickvanVugt commented 1 month ago

@YannickvanVugt I have several bulbs, I can try it myself... Now I'm reading your previous comment, hoping to be able to replicate what you did

@YannickvanVugt i need your help to do what you did

You will need a second Zigbee2MQTT instance and Zigbee stick to test this! You can not apply this to a single bulb, it will be applied to all bulbs of the same type in an instance.

There is several ways to get this going. If you only have a single Home Assistant installation you can add the repository for the Z2M addon once more with an extra / https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/ A third instance is possible with https://github.com/zigbee2mqtt/hassio-zigbee2mqtt//

You will need to configure Zigbee2MQTT to use another folder, MQTT topic, Zigbee channel, PAN_ID and different network_key.

In the Zigbee2MQTT folder, create the file 'ikea-test.js' with this code:

const {light} = require('zigbee-herdsman-converters/lib/modernExtend');
const {ikeaLight} = require('zigbee-herdsman-converters/lib/ikea');

const definition = {
    zigbeeModel: ['TRADFRI bulb E27 CWS globe 806lm'],
    model: 'TRADFRI bulb E27 CWS globe 806lm',
    vendor: 'IKEA of Sweden',
    description: 'Automatically generated definition',
    extend: [ikeaLight({"colorTemp":{"range":[100,1000],"viaColor":true},"color":{"modes":["xy","hs"],"enhancedHue":true}})],
    meta: {},
};

module.exports = definition;

Add the following to the Zigbee2MQTT configuration.yaml:

external_converters:
    - ikea-test.js

That should be enough to get that going. 😄

capjack92 commented 4 weeks ago

@YannickvanVugt @Koenkk Below I explain what I did:

Assumption: The modified IKEA light bulb has a fuchsia label in the photos. As regards the ranges set in the modification file, I didn't enter 100,1000 but I entered the ranges that both the IKEA gu10 and the e27, gu10 hue color have, i.e. 153,500

First comparison, modified e27 vs original e27 (brightness set to "10" otherwise it was impossible to notice the differences from the photos due to the high brightness).. temp range 500vs454.. I noticed that the modified bulb becomes slightly warmer but the lumens of the bulb automatically increase as shown in the photo below: 20240922_174251

Then I increased the lumens of the original bulb (brightness range to "50"), without changing the temp range and leaving the brightness of the modified E27 unchanged, to make a more accurate comparison with similar bulb brightness: 20240922_180158

Then I made the comparison with the same bulbs, brightness range "10", temp range "153" vs "250".. Here the difference is clear: 20240922_173800

Next I tested the modified e27 with an e27 hue color. As for the hue color, it has a crazy low brightness capacity (I don't know if it's a limitation of the hardware of the IKEA bulbs or the software, I don't have an IKEA hub to try). which is why, to make a comparison that makes sense, I increased the brightness range of the hue color to 50, compared to the "10" range of the modified e27. Here is the comparison with temp range 500vs500: 20240922_175053

Here is the comparison with temp range 153vs153: 20240922_174823

As you can see the color temperature seems really similar. If you need other tests, just ask, although there is the possibility of trying to somehow bring the brightness of the IKEA bulbs lower.

EDIT: Tests also carried out with the IKEA GU10, the result was similar to the results obtained with the Hue. I noticed something about the gu10: with the range set to 500 only the "yellow" LEDs are activated, with the range set to 153 the blues are activated but also a little yellow (I don't know if this is considered a important thing, but I noticed it and I'll point it out to you too). on the e27 I can't say because I tried to remove the dome but it's not screwed in, so I'm afraid of breaking it.

YannickvanVugt commented 4 weeks ago

@YannickvanVugt

@Koenkk

Below I explain what I did:

  • Created a virtual machine with HA

  • Everything configured and z2m installed with alternative zigbee coordinator

  • followed your steps (Creating files in the z2m folder, added the lines of code in configuration.yaml always in the z2m folder

-added an ikea e27 equal to the others on z2m modified and connected next to an ikea e27 without modifications to see the

differences

-compare the differences also with an e27 hue color

Assumption: The modified IKEA light bulb has a fuchsia label in the photos. As regards the ranges set in the modification file, I didn't enter 100,1000 but I entered the ranges that both the IKEA gu10 and the e27, gu10 hue color have, i.e. 153,500

First comparison, modified e27 vs original e27 (brightness set to "10" otherwise it was impossible to notice the differences from the photos due to the high brightness).. temp range 500vs454..

I noticed that the modified bulb becomes slightly warmer but the lumens of the bulb automatically increase as shown in the photo below:

20240922_174251

Then I increased the lumens of the original bulb (brightness range to "50"), without changing the temp range and leaving the brightness of the modified E27 unchanged, to make a more accurate comparison with similar bulb brightness:

20240922_180158

Then I made the comparison with the same bulbs, brightness range "10", temp range "153" vs "250"..

Here the difference is clear:

20240922_173800

Next I tested the modified e27 with an e27 hue color. As for the hue color, it has a crazy low brightness capacity (I don't know if it's a limitation of the hardware of the IKEA bulbs or the software, I don't have an IKEA hub to try).

which is why, to make a comparison that makes sense, I increased the brightness range of the hue color to 50, compared to the "10" range of the modified e27.

Here is the comparison with temp range 500vs500:

20240922_175053

Here is the comparison with temp range 153vs153:

20240922_174823

As you can see the color temperature seems really similar.

If you need other tests, just ask, although there is the possibility of trying to somehow bring the brightness of the IKEA bulbs lower.

Thanks for your tests, it is important to know if both the LED2109G6, if set to the same value, has the same colors.

Of course 454 and 500 do not compare, but it would be great to know if 250 without and with the 'viaColor' option compare. And 280, 300, 320 and so on. To see if the 'viaColor' option is accurate.

Good to know it at least is quite comparable to Hue lights.

capjack92 commented 4 weeks ago

Thanks for your tests, it is important to know if both the LED2109G6, if set to the same value, has the same colors.

Do you mean to use both bulbs on the same z2m with the same settings to see if they differ? @YannickvanVugt

ok maybe I understand what you mean, anyway yes I tried both IKEA E27s even with the same color range and brightness (temp range 454) and they looked practically identical, I didn't take photos, but if you want I'll reconnect them and take a photo

YannickvanVugt commented 4 weeks ago

Thanks for your tests, it is important to know if both the LED2109G6, if set to the same value, has the same colors.

Do you mean to use both bulbs on the same z2m with the same settings to see if they differ? @YannickvanVugt

Nope. That wouldn't add anything.

The 'viaColor' option sends an RGB value to the bulb, which is produced by Z2M.

A stock Z2M instance will send a temperature command to the bulb that is processed by the bulb.

We'd like to know if both create the same or somewhat comparable color temperature to each other on a LED2109G6 bulb.

capjack92 commented 4 weeks ago

@YannickvanVugt yes, in fact, I edited the previous comment because I later understood what you meant. As I wrote in the previous comment, tried (but only with temp range 454) and they seemed identical, soon I will also try other ranges

capjack92 commented 4 weeks ago

Ok done, I think they are identical. Perhaps from the photos it is confusing which of the two has the label, so to be safe I tell you that the modified e27 is the one on the top right. @YannickvanVugt @Koenkk

post the photos below:

temp range 250: 20240922_193152

temp range 300: 20240922_193225

temp range 350: 20240922_193245

temp range 400: 20240922_193327

temp range 450: 20240922_193418

tested also rgb. Red: 20240922_193440

green: 20240922_193458

blue: 20240922_193526

YannickvanVugt commented 4 weeks ago

Ok done, I think they are identical. Perhaps from the photos it is confusing which of the two has the label, so to be safe I tell you that the modified e27 is the one on the top right. @YannickvanVugt @Koenkk

Thanks mate! That's amazing!

So the 'viaColor' option is very reliable to use as a replacement for color temperature.

@Koenkk Did you only add this for Ikea bulbs for a (specific) reason or would this be a possible solution for other bulbs and strips as well? As long as we know that the calculation from temperature to RGB is reliable, anything is possible right?

Nobody uses either end of the possible spectrum, but a broad range would be nice. Let's say 1700k/1780k up to 6000k or something, as mentioned in the Ikea manual for that bulb and kind of normal range as mentioned on Wikipedia.

What would be a good temperature range to allow? 1780k to 6000k would be 167 to 562, as with what we started the topic.

Thanks for both your help and input!

Koenkk commented 3 weeks ago

Did you only add this for Ikea bulbs for a (specific) reason or would this be a possible solution for other bulbs and strips as well?

this is currently only done for LED1624G9 and LED1923R5 since do not support the color temp commands. This bulb does so I'm a bit hesitant to add this (since it bypasses the native commands). Why don't you just set the color? Because now we are basically abusing color temp to set colors. Note that this will also not work when you try to control multiple bulbs via a group.

capjack92 commented 3 weeks ago

Did you only add this for Ikea bulbs for a (specific) reason or would this be a possible solution for other bulbs and strips as well?

this is currently only done for LED1624G9 and LED1923R5 since do not support the color temp commands. This bulb does so I'm a bit hesitant to add this (since it bypasses the native commands). Why don't you just set the color? Because now we are basically abusing color temp to set colors. Note that this will also not work when you try to control multiple bulbs via a group.

Yes, in fact, I used the "standard" color temperature values ​​(153,500), those used by Hue and the IKEA Gu10. In doing so, in my opinion, the IKEA E27 performed very well even from a mixed lighting control perspective (Hue , gu10 ikea and e27 ikea), while with the original configuration I have problems controlling the lights together because the e27 is limited via software, this is the reason why I opened this issue.

@Koenkk What do you think based on the comparison photos I took above?

Koenkk commented 3 weeks ago

With controlling lights together, do you mean a Zigbee group?

capjack92 commented 3 weeks ago

With controlling lights together, do you mean a Zigbee group?

Yes, I use them both in Zigbee groups and with a customized addon that simulates the functionality of the Philips Hue app on Home Assistant where I can manage them individually and simultaneously in a very simple and clear way. I'm attaching a screenshot for you to see

Prova1

This is a mix of gu10 and e27 ikea

when I go to set a temperature that the e27 does not allow (without modification) automatically sets the maximum temperature that the bulb allows (for example gu10 at 500 while e27 at 454). Except that afterwards it starts to give a series of problems if I try again, for example it doesn't understand if I'm on temperature or color.

Which doesn't happen for example in other groups where I don't have Ikea E27 but I have Hue, Ikea Gu10 and Stripled Zigbee RGBCCT lights. In this group everything works perfectly.

As far as standard light control is concerned, for example, if I create a lighting group (IKEA GU10 and E27) via the home assistant helper or via Z2M and try to set a temperature at which the E27 cannot reach while the GU10 can then brings the temperature of all bulbs to what the e27 allows, limiting the gu10

dirrgang commented 5 hours ago

I just ran into this issue myself. Though it seems like a fix has been found? Is someone else going to do a PR to modify the converters, or should I give it a try?

My bulb in question is a LED2111G6 (E14 globe)

capjack92 commented 4 hours ago

I just ran into this issue myself. Though it seems like a fix has been found? Is someone else going to do a PR to modify the converters, or should I give it a try?

My bulb in question is a LED2111G6 (E14 globe)

At the moment the only solution is the one proposed above by Yannick, manually modifying the light bulb database by activating the viacolor option with the difference of inserting 153,500 as colortemp range