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

This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. #74

Closed
lintegras opened this issue Jan 30, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@lintegras
Copy link

Describe The Bug:
This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://homebridge.io/w/JtMGR for more info.

NOTE: I do have a Levoit purifier and humidifier; device discovery pulls both successfully. I am unsure if the error is associated to the purifier.

To Reproduce:
Load and configure plugin, launch Homebridge.

Expected behavior:
Absence of warning in logs.

Logs:

[1/30/2024, 1:56:13   PM] Homebridge v1.7.0 (HAP v0.11.1) (Homebridge 37D2) is running on port   51669.
--
[1/30/2024, 1:56:13 PM] [Levoit   Humidifiers] [DEBUG]: [LOGIN] Authentication was successful
[1/30/2024, 1:56:13 PM] [Levoit   Humidifiers] Discovering devices...
[1/30/2024, 1:56:14 PM] [Levoit   Humidifiers] [DEBUG]: [GET DEVICES] Device List -> JSON:   [{"deviceRegion":"US","isOwner":true,"authKey":null,"deviceName":"HoMe   Purifier","deviceImg":"https://image.vesync.com/defaultImages/deviceDefaultImages/wfon_apr_lap-c601s-wus_us_240.png","cid":"<removed in case identifying>","deviceStatus":"on","connectionStatus":"online","connectionType":"WiFi+BTOnboarding+BTNotify","deviceType":"LAP-C601S-WUS","type":"wifi-air","uuid":"<removed in case identifying>","configModule":"WFON_APR_LAP-C601S-WUS_US","macID":"<removed in case identifying>","mode":null,"speed":null,"currentFirmVersion":null,"subDeviceNo":null,"subDeviceType":null,"deviceFirstSetupTime":"Nov   17, 2022 7:57:25   PM","subDeviceList":null,"extension":{"airQuality":-1,"airQualityLevel":1,"mode":"auto","fanSpeedLevel":"1"},"deviceProp":null},{"deviceRegion":"US","isOwner":true,"authKey":null,"deviceName":"Nursery   humidifier   ","deviceImg":"https://image.vesync.com/defaultImages/deviceDefaultImages/wifibtonboardingnotify_airhumidifier_classic200s_us_240.png","cid":"<removed in case identifying>","deviceStatus":"off","connectionStatus":"online","connectionType":"WiFi+BTOnboarding+BTNotify","deviceType":"Classic200S","type":"wifi-air","uuid":"<removed in case identifying>","configModule":"WiFiBTOnboardingNotify_AirHumidifier_Classic200S_US","macID":"<removed in case identifying>","mode":null,"speed":null,"currentFirmVersion":null,"subDeviceNo":null,"subDeviceType":null,"deviceFirstSetupTime":"Nov   1, 2022 11:29:28 PM","subDeviceList":null,"extension":null,"deviceProp":null}]
[1/30/2024, 1:56:14 PM] [Levoit   Humidifiers] [DEBUG]: [GET DEVICE INFO] Getting device info...
[1/30/2024, 1:56:14 PM] [Levoit   Humidifiers] [DEBUG]: [DEVICE INFO]   {"traceId":"1706648174163","code":0,"msg":"request   success","module":null,"stacktrace":null,"result":{"traceId":"1706648174163","code":0,"result":{"enabled":false,"mist_virtual_level":9,"mist_level":3,"mode":"manual","water_lacks":false,"water_tank_lifted":false,"humidity":0,"humidity_high":false,"indicator_light_switch":false,"automatic_stop_reach_target":false,"configuration":{"auto_target_humidity":80,"indicator_light_switch":false,"automatic_stop":false}}}}
[1/30/2024, 1:56:14 PM] [Levoit   Humidifiers] Restoring existing accessory from cache: Nursery humidifier
[1/30/2024, 1:56:14 PM]   [homebridge-levoit-humidifiers] This plugin generated a warning from the   characteristic 'On': characteristic value expected boolean and received   undefined. See https://homebridge.io/w/JtMGR for more info.
[1/30/2024, 1:56:14 PM]   [homebridge-levoit-humidifiers] Error:
at On.Characteristic.characteristicWarning   (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:3011:105)
at On.Characteristic.validateUserInput   (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2887:12)
at On.<anonymous>   (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2405:24)
at step   (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:195:27)
at Object.next   (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:176:57)
at fulfilled   (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:166:62)
at processTicksAndRejections (node:internal/process/task_queues:95:5)

Plugin Config:

{
--
"name": "Levoit Humidifiers",
"email": <removed>,
"password": <removed>,
"accessories": {
"humidity_sensor": true,
"mist": true,
"warm_mist": false,
"sleep_mode": false,
"display": true,
"night_light": false,
"auto_pro": false
},
"options": {
"showOffWhenDisconnected": false
},
"platform": "LevoitHumidifiers",
"enableDebugMode": true
}

Screenshots:
image

Environment:

  • Plugin Version: 1.12.3
  • Homebridge Version: 1.7.0
  • Node.js Version: 18.19.0
  • NPM Version: 10.2.3
  • Operating System: Docker
@lintegras lintegras added the bug Something isn't working label Jan 30, 2024
@lintegras
Copy link
Author

Additional note - I updated node.js to v20.11.0 and that did not impact the issue.

@pschroeder89
Copy link
Owner

pschroeder89 commented Feb 4, 2024

@lintegras I published 1.12.4, which should prevent this error. But something seems wrong with your device to get this error, On should never be undefined. In the response, it even looks normal, so I'm unsure why Homebridge read the value as undefined. Let me know if 1.12.4 works better, and if not, we'll have to investigate some more.

@lintegras
Copy link
Author

@pschroeder89 evidence on my end indicates the changes you made have resolved this issue. I realized after you mentioned there must be an issue with my device that the humidity sensor on the device is no longer reporting a value back (always shows 0%) in the native app; this may have contributed to the error.

Thank you for the quick investigation and resolution to this one-off problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants