vieira/homebridge-yeelight-wifi

Homebridge 1.3.1 warnings every minute

Closed this issue · 11 comments

[23/02/2021, 10:47:06] [homebridge-yeelight-wifi] This plugin generated a warning from the characteristic 'Color Temperature': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.
[23/02/2021, 10:47:06] [homebridge-yeelight-wifi] This plugin generated a warning from the characteristic 'Color Temperature': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.
[23/02/2021, 10:48:06] [homebridge-yeelight-wifi] This plugin generated a warning from the characteristic 'Color Temperature': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.
[23/02/2021, 10:48:06] [homebridge-yeelight-wifi] This plugin generated a warning from the characteristic 'Color Temperature': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.
[23/02/2021, 10:49:06] [homebridge-yeelight-wifi] This plugin generated a warning from the characteristic 'Color Temperature': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.
[23/02/2021, 10:49:06] [homebridge-yeelight-wifi] This plugin generated a warning from the characteristic 'Color Temperature': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.
[23/02/2021, 10:50:06] [homebridge-yeelight-wifi] This plugin generated a warning from the characteristic 'Color Temperature': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.
[23/02/2021, 10:50:06] [homebridge-yeelight-wifi] This plugin generated a warning from the characteristic 'Color Temperature': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.

### DEBUG MODE:

[23/02/2021, 13:27:30] [Yeelight] {"method":"set_ct_abx","params":[5524.861878453039,"smooth",400],"id":14}
[23/02/2021, 13:27:30] [Yeelight] { id: 14, result: [ 'ok' ] }
[23/02/2021, 13:27:30] [homebridge-yeelight-wifi] This plugin generated a warning from the characteristic 'Color Temperature': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.
[23/02/2021, 13:27:30] [homebridge-yeelight-wifi] Error:
at Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2164:105)
at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1645:22
at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
at Characteristic. (/usr/local/lib/node_modules/homebridge-yeelight-wifi/bulbs/temperature.js:20:15)
at processTicksAndRejections (internal/process/task_queues.js:93:5)

Feel free to dig deeper and fix those! :)

@okonet teach me how to fix

in order to reproduce the issue:

  • the bulb can be off\on state
  • adaptive lightning is enabled
  • adaptive lightning is selected per bulb

meaning: the issue is relevant only when 'adaptive lightning' is selected on bulb

Adaptive lightning is a feature of homebridge which sets CT on devices automatically every minute. You can't control it, so I think the issue isn't really in it but in the way the set request is handled in this library. I have no idea myself how to fix it.

@okonet Its an homebridge issue?

No, I don’t think. They started to issue warning with the v1.3 that’s why it started to be visible.

This is probably caused by passing a second argument to the callback when setting characteristics, I'll open a PR if someone can test, as I don't have access to the the bulbs at the moment.

if (this.activeMode === 0) {
await this.setTemperature(value);
callback(null, value);
} else {
platform.log.debug(
`Device ${this.did} activeMode is ${this.activeMode}. Skipping setting temperature in moonlight mode.`
);
callback(null, this.temperature);

Ah that would make sense! Thanks for pointing out.

This is probably caused by passing a second argument to the callback when setting characteristics, I'll open a PR if someone can test, as I don't have access to the the bulbs at the moment.

if (this.activeMode === 0) {
await this.setTemperature(value);
callback(null, value);
} else {
platform.log.debug(
`Device ${this.did} activeMode is ${this.activeMode}. Skipping setting temperature in moonlight mode.`
);
callback(null, this.temperature);

@vieira can you tag it? I will test

I have sent a request for review to @okonet, as he is maintaining this now I will let him handle it as any other PR.

🎉 This issue has been resolved in version 2.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀