AlCalzone / node-tradfri-client

Library to talk to IKEA Trådfri Gateways without external binaries
MIT License
265 stars 30 forks source link

High transition time is ignored in my setup #571

Open emmettprexus opened 2 years ago

emmettprexus commented 2 years ago

Hello,

I have playing around with long transition times (eg 1,5 hour = 5.400 seconds) to make whatever lamp is still on in the group, slowly dim over the next few hours. It does not seem to work though:

const options = {
    transitionTime: 5400,
    dimmer: 0
}

await client.operateGroup(group, options, true);

My bulbs stay at 100% even after a looong time. Is there a limit to the transition time?

AlCalzone commented 2 years ago

Is there a limit to the transition time?

I think there is, but I'm not sure how long. AFAIK some users who need long transitions use multiple commands for that combined with shorter transition durations, e.g. 1 minute for 1% or so.

bitwranglr commented 1 year ago

I've got a similar problem and have discovered that it seems to work perfectly for transition times up to 6553 seconds. Presumably, the transition time is being multiplied by 10 somewhere and encoded with a data type that can't handle numbers larger than 16 bits, i.e. max value of 65535. I hope this can get fixed! Thanks.

AlCalzone commented 1 year ago

I'm afraid this is nothing I can fix. The communication with the gateway is JSON based. If 16 bits are limiting, it's in the zigbee part between the gateway and the devices.