sanjoyg / dirigera_platform

HomeAssistant Integration for Dirigera Platform
MIT License
71 stars 8 forks source link

Not full spectrum of color temp of smart bulbs #38

Closed oat1 closed 2 months ago

oat1 commented 2 months ago

I have 3 types of IKEA smart bulbs -TRADFRI bulb E27 WS opal 1000lm -TRADFRI bulb GU10 WS 400lm -TRADFRIbulbGU10WS345lm

And I have added them in two different ways ( to compare)

The problem is that with this addon the bulbs entities support less color temp range than via matter. Printscreen below, of the same bulb added via 2 different integrations ( this addon light with _1, matter _1_2). Can you please extend the range to the proper one?

image

vulcanoid1975 commented 2 months ago

Hi! I have the same for the:

They appear like this on States: image

Although the 4 light strips are in "Warm White" it's translated like this to the UI: image

2024-04-18 072754.408 INFO.txt

Hope this helps ...

Thank You!

oat1 commented 2 months ago

Also funny thing is when I change a bulb color temp via matter, it changes, also in this integration. Even if it is outside of the color temp range

image

sanjoyg commented 2 months ago

Interesting can put the json dump. The values are picked from the light attributes as returned by the hub

oat1 commented 2 months ago

@sanjoyg sure 2024-04-18 18:31:14.986 INFO (SyncWorker_4) [custom_components.dirigera_platform] === START Devices JSON === 2024-04-18 18:31:14.986 INFO (SyncWorker_4) [custom_components.dirigera_platform] -------------- 2024-04-18 18:31:16.430 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f3aea2686b0: NON 2.05 Content (MID 14415, token d5dc) remote <UDP6EndpointAddress 192.168.2.129 (locally 192.168.2.115%enp0s31f6)>, 3 option(s), 1448 byte(s) payload> 2024-04-18 18:31:16.430 DEBUG (MainThread) [coap] Received Response: <aiocoap.Message at 0x7f3aea2686b0: NON 2.05 Content (MID 14415, token d5dc) remote <UDP6EndpointAddress 192.168.2.129 (locally 192.168.2.115%enp0s31f6)>, 3 option(s), 1448 byte(s) payload> 2024-04-18 18:31:16.430 DEBUG (MainThread) [coap] Response <aiocoap.Message at 0x7f3aea2686b0: NON 2.05 Content (MID 14415, token d5dc) remote <UDP6EndpointAddress 192.168.2.129 (locally 192.168.2.115%enp0s31f6)>, 3 option(s), 1448 byte(s) payload> matched to request <Pipe at 0x7f3b11959bb0 around <aiocoap.Message at 0x7f3b0d4cec00: NON GET (MID 56510, token d5dc) remote <UDP6EndpointAddress 192.168.2.129 (locally 192.168.2.115%enp0s31f6)>, 2 option(s)> with 2 callbacks> 2024-04-18 18:31:16.430 DEBUG (MainThread) [coap.blockwise-requester] Notification received 2024-04-18 18:31:16.430 DEBUG (MainThread) [coap.blockwise-requester] Reporting completed notification 2024-04-18 18:31:16.431 DEBUG (MainThread) [aioairctrl.coap.client] observation status: {"state":{"reported":{"name":"Oczyszczacz","type":"AC2729","modelid":"AC2729/50","swversion":"0.2.1","range":"MicroMario","Runtime":96352372,"rssi":-46,"otacheck":false,"wifilog":false,"free_memory":58552,"WifiVersion":"AWS_Philips_AIR@73.1","ProductId":"cc9f4942e62311e8a1e3061302926720","DeviceId":"bb4e73166aec11ebb2a2de091e3f86f7","StatusType":"status","ConnectType":"Online","om":"1","pwr":"1","cl":false,"aqil":20,"uil":"1","dt":0,"dtrs":0,"mode":"A","func":"P","rhset":50,"rh":31,"temp":22,"pm25":9,"iaql":3,"aqit":10,"aqit_ext":0,"ddp":"3","rddp":"1","err":49408,"wl":0,"fltt1":"A3","fltt2":"C7","fltsts0":188,"fltsts1":953,"fltsts2":953,"wicksts":953},"desired":null}} 2024-04-18 18:31:16.557 INFO (SyncWorker_4) [custom_components.dirigera_platform] [{'id': 'd613d6b7-098e-4bdd-adff-16cc16aaf161_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:33.000Z', 'isReachable': True, 'lastSeen': '2024-04-18T18:29:20.000Z', 'attributes': {'customName': 'Światło 4', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': '680AE2FFFE11D61A', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 3448, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_blue_no_63', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': 'd9572831-60bc-4e89-8f03-2a3a3a24be31_1', 'relationId': 'd9572831-60bc-4e89-8f03-2a3a3a24be31', 'type': 'gateway', 'deviceType': 'gateway', 'createdAt': '2023-12-15T15:44:20.614Z', 'isReachable': True, 'lastSeen': '2024-04-18T16:31:00.692Z', 'attributes': {'customName': 'Dom', 'model': 'DIRIGERA Hub for smart products', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.556.0', 'hardwareVersion': 'P2.5', 'serialNumber': 'd9572831-60bc-4e89-8f03-2a3a3a24be31', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoDownload', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00', 'permittingJoin': False, 'backendConnected': True, 'backendConnectionPersistent': True, 'backendOnboardingComplete': True, 'backendRegion': 'eu-central-1', 'backendCountryCode': 'PL', 'userConsents': [{'name': 'analytics', 'value': 'enabled'}, {'name': 'diagnostics', 'value': 'enabled'}], 'logLevel': 3, 'coredump': False, 'timezone': 'Europe/Warsaw', 'nextSunSet': '2024-04-18T17:40:00.000Z', 'nextSunRise': '2024-04-19T03:30:00.000Z', 'homestate': 'home', 'countryCode': 'XZ', 'coordinates': {'latitude': 52.306306306306304, 'longitude': 20.98133894019359, 'accuracy': -1}, 'isOn': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'permittingJoin', 'userConsents', 'logLevel', 'time', 'timezone', 'countryCode', 'coordinates']}, 'deviceSet': [], 'remoteLinks': []}, {'id': '085bd163-c0b0-40a4-bb31-8091328d6ce3_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:30.000Z', 'isReachable': True, 'lastSeen': '2024-04-18T18:29:19.000Z', 'attributes': {'customName': 'Światło 2', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'CCCCCCFFFE3C7738', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 3448, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_blue_no_63', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': '36fee6ac-4395-44c2-acac-a0ef7a2c9cc0_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:22.000Z', 'isReachable': True, 'lastSeen': '2024-04-18T18:29:18.000Z', 'attributes': {'customName': 'Światło 1', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': '000D6FFFFE5ADEE7', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 3448, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_blue_no_63', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': 'c8c88287-41d6-407a-b087-fcea6f3b0332_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:31.000Z', 'isReachable': True, 'lastSeen': '2024-04-18T18:29:19.000Z', 'attributes': {'customName': 'Światło 3', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'CCCCCCFFFE3C7DEA', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 3448, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2024-03-05T18:43:58.000Z', 'identifyPeriod': 15, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_blue_no_63', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': '9a8c0cd4-0021-4482-9d6f-98e7057384db_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-04-18T13:50:16.000Z', 'isReachable': True, 'lastSeen': '2024-04-18T18:22:22.000Z', 'attributes': {'customName': 'Światło 5', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'manufacturer': 'IKEA of Sweden', 'model': 'TRADFRI bulb GU10 WS 400lm', 'productCode': 'LED1737R5GU10', 'serialNumber': 'CCCCCCFFFEDDF64C', 'isOn': False, 'startupOnOff': 'startPrevious', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorMode': 'temperature', 'startupTemperature': -1, 'colorTemperature': 3472, 'colorTemperatureMax': 2202, 'colorTemperatureMin': 4000, 'identifyPeriod': 0, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'permittingJoin': False, 'otaPolicy': 'autoUpdate', 'otaProgress': 0, 'otaScheduleEnd': '00:00', 'otaScheduleStart': '00:00', 'otaState': 'readyToCheck', 'otaStatus': 'upToDate'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Sypialnia', 'color': 'ikea_lilac_no_3', 'icon': 'rooms_bed'}, 'deviceSet': [{'id': '778485ae-0680-47c5-98ca-1947382faff0', 'name': 'Żyrandol Sypialnia', 'icon': 'lighting_spot_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': '001247f4-23f3-4402-b897-31bef9dbdbf8_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-04-18T13:50:18.000Z', 'isReachable': True, 'lastSeen': '2024-04-18T18:22:22.000Z', 'attributes': {'customName': 'Światło 6', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'manufacturer': 'IKEA of Sweden', 'model': 'TRADFRI bulb GU10 WS 400lm', 'productCode': 'LED1737R5GU10', 'serialNumber': 'EC1BBDFFFE467F3F', 'isOn': False, 'startupOnOff': 'startPrevious', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorMode': 'temperature', 'startupTemperature': -1, 'colorTemperature': 3472, 'colorTemperatureMax': 2202, 'colorTemperatureMin': 4000, 'identifyPeriod': 0, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'permittingJoin': False, 'otaPolicy': 'autoUpdate', 'otaProgress': 0, 'otaScheduleEnd': '00:00', 'otaScheduleStart': '00:00', 'otaState': 'readyToCheck', 'otaStatus': 'upToDate'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Sypialnia', 'color': 'ikea_lilac_no_3', 'icon': 'rooms_bed'}, 'deviceSet': [{'id': '778485ae-0680-47c5-98ca-1947382faff0', 'name': 'Żyrandol Sypialnia', 'icon': 'lighting_spot_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': '5f089392-0a3b-4666-82ff-7349019124f4_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-04-18T13:50:20.000Z', 'isReachable': True, 'lastSeen': '2024-04-18T18:22:22.000Z', 'attributes': {'customName': 'Światło 7', 'firmwareVersion': '1.0.012', 'hardwareVersion': '1', 'manufacturer': 'IKEA of Sweden', 'model': 'TRADFRIbulbGU10WS345lm', 'productCode': 'LED2005R5', 'serialNumber': '9035EAFFFE30B3B8', 'isOn': False, 'startupOnOff': 'startPrevious', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorMode': 'temperature', 'startupTemperature': -1, 'colorTemperature': 3472, 'colorTemperatureMax': 2202, 'colorTemperatureMin': 4000, 'identifyPeriod': 0, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'permittingJoin': False, 'otaPolicy': 'autoUpdate', 'otaProgress': 0, 'otaScheduleEnd': '00:00', 'otaScheduleStart': '00:00', 'otaState': 'readyToCheck', 'otaStatus': 'upToDate'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': '51349cda-556c-4d2c-a0f0-983a06699b84', 'name': 'Sypialnia', 'color': 'ikea_lilac_no_3', 'icon': 'rooms_bed'}, 'deviceSet': [{'id': '778485ae-0680-47c5-98ca-1947382faff0', 'name': 'Żyrandol Sypialnia', 'icon': 'lighting_spot_chandelier'}], 'remoteLinks': [], 'isHidden': False}] 2024-04-18 18:31:16.557 INFO (SyncWorker_4) [custom_components.dirigera_platform] -------------- 2024-04-18 18:31:16.557 INFO (SyncWorker_4) [custom_components.dirigera_platform] === END Devices JSON ===

sanjoyg commented 2 months ago

For the bulb that you pasted, here is what the hub returns

 "colorTemperature": 3448,
  "colorTemperatureMin": 4000,
  "colorTemperatureMax": 2202,

Possibly the "matter" add-on uses a constant range and the calibrates it based on the capability.

oat1 commented 2 months ago

So "it's not a bug, it's a feature" 😉

sanjoyg commented 2 months ago

Looks like that ;-), do try it out across the both plugins and if there is anything missing happy to implement.