baboons / homebridge-electrolux-wellbeing

Homebridge plugin for Electrolux Pure A9
Apache License 2.0
15 stars 12 forks source link

Plugin failure: TypeError: Cannot read property 'temp' of undefined #6

Open Herlix opened 3 years ago

Herlix commented 3 years ago

Describe The Bug: Getting error logs in the homebridge panel and I am unable to control the device. Device: Electrolux PureA9 PA91-404GY

To Reproduce: Added login information and it has worked for long enough to add the device, but it fails on every polling interval.

Expected behavior: No error logs and working connectivity.

Logs:

[19/04/2021, 08:15:04] [ElectroluxWellbeing] Could not fetch appliances data
(node:28217) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'temp' of undefined
    at /usr/lib/node_modules/homebridge-electrolux-wellbeing/src/index.ts:185:72
    at Array.map (<anonymous>)
    at ElectroluxWellbeingPlatform.updateValues (/usr/lib/node_modules/homebridge-electrolux-wellbeing/src/index.ts:179:22)
    at ElectroluxWellbeingPlatform.checkAppliances (/usr/lib/node_modules/homebridge-electrolux-wellbeing/src/index.ts:101:10)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:28217) 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: 41651)

(node:28217) 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: 41651)

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.
 {
            "username": "email@emai.com",
            "password": "the_pass_word",
            "pollTime": 30,
            "platform": "ElectroluxWellbeing"
}

Screenshots:

Environment:

Herlix commented 3 years ago

No update here?

Might be that my unit is not tested.

A check might be needed for values, setting a default before handing the result to HB. https://github.com/baboons/homebridge-electrolux-wellbeing/blob/b41d7770c435c4a792151ba78cefcf728e00eec6/src/index.ts#L225

mhuiskes commented 2 years ago

Any update on this?

tomsinclair94 commented 1 year ago

Anyone have any fix for this? The plugin was working fine for a while and now this issue is affecting me and causing homebridge to restart every minute

davidjbradshaw commented 1 year ago

I’ve been seeing issues like this, it seems to be that the remote server logs you out after a while and then the plugin fails, rather than logs back in.

I’ve just tried to see if I can get it to relogions when this happens, but it’s slow to test changes, as I have to wait for the connection to timeout