karlg100 / homebridge-frigidaire

homebridge Platform plugin for Frigidaire connected appliances
29 stars 10 forks source link

Addition of Filter accessory causing warnings #36

Open amaisano opened 3 years ago

amaisano commented 3 years ago

2.1.3 is causing the AC unit to become unavailable every time it is polled for the filter status. Please revert or adjust!

The unavailability is unrelated and due to something that dropped with today's Home Assistant update, but these errors below are indeed new with 2.1.3 for me:

Wed, 07 Jul 2021 21:21:00 GMT frigidaire:homebridge getFilter:  0
[7/7/2021, 5:21:00 PM] [homebridge-frigidaire] This plugin generated a warning from the characteristic 'Filter Change Indication': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[7/7/2021, 5:21:00 PM] [homebridge-frigidaire] Error: 
    at FilterChangeIndication.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2038:105)
    at FilterChangeIndication.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1931:16)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1533:24
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at /homebridge/node_modules/homebridge-frigidaire/index.js:431:14
    at /homebridge/node_modules/homebridge-frigidaire/node_modules/frigidaire/lib/frigidaire.js:1004:17
    at Frigidaire.getValue (/homebridge/node_modules/homebridge-frigidaire/node_modules/frigidaire/lib/frigidaire.js:765:13)
    at Frigidaire.getFilter (/homebridge/node_modules/homebridge-frigidaire/node_modules/frigidaire/lib/frigidaire.js:1000:11)
    at FrigidaireAirConditionerAccessory.getFilter (/homebridge/node_modules/homebridge-frigidaire/index.js:416:13)
    at FilterChangeIndication.emit (events.js:376:20)
brsowers commented 3 years ago

I found the issue. On index.js line 431 there's a typo:

coded as: return callback(null, self.fulter);

should be: return callback(null, self.filter);

I made the change in my local and no longer have the error in my log

ozedown10 commented 2 years ago

Receiving similar error unable to resolve [6/9/2022, 1:30:32 PM] [homebridge-frigidaire] This plugin generated a warning from the characteristic 'Filter Change Indication': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info. Error: maximum retries, giving up. at Request.postResponseCallback [as _callback] (/usr/local/lib/node_modules/homebridge-frigidaire/node_modules/frigidaire/lib/frigidaire.js:361:28) at Request.self.callback (/usr/local/lib/node_modules/homebridge-frigidaire/node_modules/request/request.js:185:22) at Request.emit (node:events:527:28) at Request. (/usr/local/lib/node_modules/homebridge-frigidaire/node_modules/request/request.js:1154:10) at Request.emit (node:events:527:28) at IncomingMessage. (/usr/local/lib/node_modules/homebridge-frigidaire/node_modules/request/request.js:1076:12) at Object.onceWrapper (node:events:641:28) at IncomingMessage.emit (node:events:539:35) at endReadableNT (node:internal/streams/readable:1345:12) at processTicksAndRejections (node:internal/process/task_queues:83:21)