iklein99 / homebridge-smartthings

This is a plugin to Homebridge to connect your Smartthings network into Apple Home Kit.
Apache License 2.0
158 stars 53 forks source link

TypeError: Cannot read properties of undefined (reading 'hue') #47

Closed veonua closed 1 year ago

veonua commented 1 year ago

Describe The Bug: To Reproduce:

I've added several IKEA lamps with color temperature only

Expected behavior: ignore hue for color temp lights

Logs:

[17/10/2022, 12:34:28] TypeError: Cannot read properties of undefined (reading 'hue') at /var/lib/homebridge/node_modules/homebridge-smartthings-ik/src/lightBulbAccessory.ts:270:51 at processTicksAndRejections (node:internal/process/task_queues:96:5) [17/10/2022, 12:34:29] TypeError: Cannot read properties of undefined (reading 'hue') at /var/lib/homebridge/node_modules/homebridge-smartthings-ik/src/lightBulbAccessory.ts:270:51 at processTicksAndRejections (node:internal/process/task_queues:96:5) [17/10/2022, 12:34:29] TypeError: Cannot read properties of undefined (reading 'hue') at /var/lib/homebridge/node_modules/homebridge-smartthings-ik/src/lightBulbAccessory.ts:270:51 at processTicksAndRejections (node:internal/process/task_queues:96:5) [17/10/2022, 12:34:29] [Smartthings(new)] getSaturation() FAILED for lampC. Comm error. [17/10/2022, 12:34:29] [Smartthings(new)] getSaturation() FAILED for lampR. Comm error. [17/10/2022, 12:34:29] [Smartthings(new)] getSaturation() FAILED for lampL. Comm error.

Environment:

iklein99 commented 1 year ago

I'll look onto this. The device reports that it supports the colorControl capability, but it isn't supporting the required parameters of saturation and hue. I'll see what I can do. May be a little while.

veonua commented 1 year ago

it's cold warm light . it doesn't have hue . only color temperature

iklein99 commented 1 year ago

Do me a favor. Clear your logs, put Homebridge into debug mode, start it up and let it run for about 30 seconds. Look for the DEVICE DATA: log entry for the device and send that over. Unless there is a bug here, the device is reporting that is support colorControl which is Hue and Saturation. If it reports that but doesn’t really support it, that is the problem. Let me know.

On Oct 21, 2022, at 9:41 AM, Andrew Me @.***> wrote:

it's cold warm light . it doesn't have hue . only color temperature

— Reply to this email directly, view it on GitHub https://github.com/iklein99/homebridge-smartthings/issues/47#issuecomment-1286978554, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABG55EQHYXQM2P7XWEI35ZDWEKMRJANCNFSM6AAAAAARG55REI. You are receiving this because you commented.

iklein99 commented 1 year ago

Closing for now. Reopen if you can send me the log.