aarons22 / homebridge-bond

Homebridge plugin for Bond
MIT License
64 stars 31 forks source link

Serial Number Error #137

Closed Brwndude2160 closed 3 years ago

Brwndude2160 commented 3 years ago

Describe the bug Suddenly showed up after the update, the error does not cause issues with the usability of the plugin. just wanted to know if there is anything i or dev can do to fix the error.

Information (please complete the following information):

Logs [22/02/2021, 10:22:51] [homebridge-bond] This plugin threw an error from the characteristic 'Serial Number': Error: [Serial Number] characteristic must have a length of more than 1 character otherwise HomeKit will reject this accessory. Ignoring new value. at SerialNumber.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1991:38) at SerialNumber.Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1257:20) at AccessoryInformation.Service.setCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:459:35) at Object.create (/usr/local/lib/node_modules/homebridge-bond/dist/platformAccessory.js:17:14) at BondPlatform.create (/usr/local/lib/node_modules/homebridge-bond/dist/platform.js:173:65) at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-bond/dist/platform.js:155:26) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) See https://git.io/JtMGR for more info.

aarons22 commented 3 years ago

weird, the serial number is set based on the deviceId provided by bond. If you re-boot homebridge does this still happen?

KCFT23 commented 3 years ago

Yes, I can confirm I get the same error. I have rebooted several times in the last few days and it always comes back.

aarons22 commented 3 years ago

Would you mind providing logs? Preferably in debug mode: https://github.com/aarons22/homebridge-bond/wiki/Enabling-Debug-Mode

Brwndude2160 commented 3 years ago

Bond Error In Debug mode:

[31/03/2021, 21:46:14] [homebridge-bond] Error: at SerialNumber.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2038:105) at SerialNumber.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1991:16) at SerialNumber.Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1298:20) at AccessoryInformation.Service.setCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:459:35) at Object.create (/usr/local/lib/node_modules/homebridge-bond/dist/platformAccessory.js:17:14) at BondPlatform.create (/usr/local/lib/node_modules/homebridge-bond/dist/platform.js:173:65) at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-bond/dist/platform.js:155:26) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) [31/03/2021, 21:46:14] [Bond] Request (185e22c7029d8000) [get http://192.168.1.140/v2/devices/1/state] [31/03/2021, 21:46:14] [Bond] UDP Message received from 192.168.1.140:30007 - {"B":"KSMWSCE78990"} [31/03/2021, 21:46:14] [Bond] Response (185e22c7029d8000) [get http://192.168.1.140/v2/devices/1/state] - {"power":0,"speed":2,"light":0,"brightness":100,"brightness_cyclephase":-1,"timer":0,"breeze":[0,50,50],"direction":1,"":"e81b5310"}

aarons22 commented 3 years ago

Ahhhh I think I see the issue. Your device id is 1, which is only 1 character 😄

This should be fixed in 3.2.6

aarons22 commented 3 years ago

I'm going to consider this closed since I was able to replicate the issue and then fix in 3.2.6!