Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homebridge 1.3.1 warnings every minute #92

Closed
TzachiGuetta opened this issue Feb 23, 2021 · 11 comments · Fixed by #93
Closed

Homebridge 1.3.1 warnings every minute #92

TzachiGuetta opened this issue Feb 23, 2021 · 11 comments · Fixed by #93
Labels

Comments

@TzachiGuetta
Copy link

TzachiGuetta commented Feb 23, 2021

[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)

@TzachiGuetta
Copy link
Author

@okonet

@okonet
Copy link
Collaborator

okonet commented Feb 23, 2021

Feel free to dig deeper and fix those! :)

@TzachiGuetta
Copy link
Author

TzachiGuetta commented Feb 24, 2021

@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

@okonet
Copy link
Collaborator

okonet commented Feb 26, 2021

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.

@TzachiGuetta
Copy link
Author

TzachiGuetta commented Mar 1, 2021

@okonet Its an homebridge issue?

@okonet
Copy link
Collaborator

okonet commented Mar 1, 2021

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

@vieira
Copy link
Owner

vieira commented Mar 1, 2021

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);

@okonet
Copy link
Collaborator

okonet commented Mar 1, 2021

Ah that would make sense! Thanks for pointing out.

vieira added a commit that referenced this issue Mar 1, 2021
This should fix #92. The callback for the characteristic set handler is
not expected to ba called with a value, only with null or err.
@TzachiGuetta
Copy link
Author

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

@vieira
Copy link
Owner

vieira commented Mar 2, 2021

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.

@okonet okonet closed this as completed in #93 Mar 3, 2021
okonet pushed a commit that referenced this issue Mar 3, 2021
This should fix #92. The callback for the characteristic set handler is
not expected to ba called with a value, only with null or err.
@github-actions
Copy link

github-actions bot commented Mar 3, 2021

🎉 This issue has been resolved in version 2.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants