homespun / homebridge-accessory-apcupsd

An apcusbd accessory plugin for Homebridge: https://github.com/nfarina/homebridge
MIT License
6 stars 4 forks source link

"Eve Reset Total" read handler errors #7

Open jlg89 opened 3 years ago

jlg89 commented 3 years ago

As of homebridge 1.3.1, I'm seeing odd errors in the log:

3/9/2021, 9:29:46 AM [HOOBS 3DD1@Main UPS@Main UPS Battery History@Eve Reset Total] The read handler for the characteristic 'Eve Reset Total' was slow to respond! 3/9/2021, 9:29:52 AM [HOOBS 3DD1@Main UPS@Main UPS Battery History@Eve Reset Total] The read handler for the characteristic 'Eve Reset Total' didn't respond at all!. Please check that you properly call the callback!

jlg89 commented 3 years ago

Maybe a more descriptive log message chain:

3/9/2021, 9:41:25 AM [HOOBS 3DD1@Main UPS@Main UPS Battery History@Eve Reset Total] Characteristic not in required or optional characteristic section for service FakeGatoHistory. Adding anyway.
3/9/2021, 9:41:25 AM (node:5864) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: iid cannot be undefined for characteristic 'Eve Reset Total'
3/9/2021, 9:41:25 AM at CommunityTypes.EveResetTotal.Characteristic.internalHAPRepresentation (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs/src/lib/Characteristic.ts:2246:11)
3/9/2021, 9:41:25 AM at CommunityTypes.EveResetTotal. (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs/src/lib/Characteristic.ts:2220:25)
3/9/2021, 9:41:25 AM at step (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/tslib/tslib.js:143:27)
3/9/2021, 9:41:25 AM at Object.next (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/tslib/tslib.js:124:57)
3/9/2021, 9:41:25 AM at /usr/local/lib/node_modules/@hoobs/hoobs/node_modules/tslib/tslib.js:117:75
3/9/2021, 9:41:25 AM at new Promise ()
3/9/2021, 9:41:25 AM at Object.__awaiter (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/tslib/tslib.js:113:16)
3/9/2021, 9:41:25 AM at CommunityTypes.EveResetTotal.Characteristic.toHAP (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs/dist/lib/Characteristic.js:1434:24)
3/9/2021, 9:41:25 AM at _loop_1 (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs/src/lib/Service.ts:601:24)
3/9/2021, 9:41:25 AM at /usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs/dist/lib/Service.js:450:21
3/9/2021, 9:41:25 AM at new Promise ()
3/9/2021, 9:41:25 AM at FakeGatoHistory.Service.toHAP (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs/src/lib/Service.ts:549:12)
3/9/2021, 9:41:25 AM at /usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs/src/lib/Accessory.ts:1034:72
3/9/2021, 9:41:25 AM at Array.map ()
3/9/2021, 9:41:25 AM at Accessory. (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs/src/lib/Accessory.ts:1034:49)
3/9/2021, 9:41:25 AM at step (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/tslib/tslib.js:143:27)
3/9/2021, 9:41:25 AM (Use `node --trace-warnings ...` to show where the warning was created)
3/9/2021, 9:41:25 AM (node:5864) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
3/9/2021, 9:41:25 AM (node:5864) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
3/9/2021, 9:41:28 AM [HOOBS 3DD1@Main UPS@Main UPS Battery History@Eve Reset Total] The read handler for the characteristic 'Eve Reset Total' was slow to respond!
angladacamps commented 3 years ago

me too... Eve reset total

[22/03/2021, 21:11:36] [homebridge-accessory-apcupsd] This plugin slows down Homebridge. The read handler for the characteristic 'Eve Reset Total' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.

rheid commented 3 years ago

hi @angladacamps , @jlg89, I setup the plugin today and is not working with the same error as you posted here. On your site the hole plug is not working or do I something wrong in the config?

Thanks !

{ "accessory": "apcupsd", "name": "Battery", "location": "127.0.0.1:3551", "model": "Back-UPS XS 950U", "serialNo": "4B2049P01854", "firmware": "925.T2 .I USB FW:T2" }

steverice commented 2 years ago

I believe this only happens under Node 16

dragosde commented 2 years ago

Any chance to fix this? I get warning for the "Eve Reset Total" too. I wouldn't mind them but I can't upgrade to Node 16 because the plugin is crashing my homebridge on Node 16. I identified this plugin to be the offending one. On the other side, staying on node 14.18 triggers tons of warnings from other plugins asking for the upgrade of Node. And I am pretty sure eventually Node 16 will be the norm.