homebridge-frigidaire icon indicating copy to clipboard operation
homebridge-frigidaire copied to clipboard

New Frigidaire App

Open pman193 opened this issue 1 year ago • 9 comments

New Frigidaire App is causing issues. It's preventing your plugin from working.

pman193 avatar Jun 03 '23 18:06 pman193

[6/3/2023, 2:13:22 PM] [homebridge-frigidaire] Child bridge process ended [6/3/2023, 2:13:22 PM] [homebridge-frigidaire] Process Ended. Code: 1, Signal: null [6/3/2023, 2:13:29 PM] [homebridge-frigidaire] Restarting Process... [6/3/2023, 2:13:30 PM] [homebridge-frigidaire] Launched child bridge with PID 28321 [6/3/2023, 2:13:30 PM] Registering platform 'homebridge-frigidaire.Frigidaire' [6/3/2023, 2:13:30 PM] [homebridge-frigidaire] Loaded homebridge-frigidaire v2.1.3 child bridge successfully [6/3/2023, 2:13:30 PM] Loaded 0 cached accessories from cachedAccessories.0E422A0DF100. failed to parse auth result json: '[object Object]'

/usr/lib/node_modules/homebridge-frigidaire/node_modules/frigidaire/lib/frigidaire.js:540 var sessionKey = body.data.sessionKey ^ TypeError: Cannot read properties of undefined (reading 'sessionKey') at Request.authPostCallback [as _callback] (/usr/lib/node_modules/homebridge-frigidaire/node_modules/frigidaire/lib/frigidaire.js:540:37) at Request.self.callback (/usr/lib/node_modules/homebridge-frigidaire/node_modules/request/request.js:185:22) at Request.emit (node:events:513:28) at Request. (/usr/lib/node_modules/homebridge-frigidaire/node_modules/request/request.js:1154:10) at Request.emit (node:events:513:28) at IncomingMessage. (/usr/lib/node_modules/homebridge-frigidaire/node_modules/request/request.js:1076:12) at Object.onceWrapper (node:events:627:28) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1359:12) at processTicksAndRejections (node:internal/process/task_queues:82:21)

pman193 avatar Jun 03 '23 18:06 pman193

You will all want to adapt the code changes from a recent server change, as seen here: https://github.com/bm1549/frigidaire/pull/18

Basically some of the API has changed and these clients needs updating.

amaisano avatar Jun 04 '23 20:06 amaisano

Tried changing the lines in the Frigidaire.js file but I'm unable to save due to file permissions. Any way that y'all can update the plugin?

pman193 avatar Jun 04 '23 23:06 pman193

I've opened a pull request at https://github.com/karlg100/frigidaire/pull/12 to fix it the proper way. That will need to get merged by the author, then re-released, and then I think THIS plugin will need to be updated with a new release as well.

@karlg100 please check it out. Thanks.

amaisano avatar Jun 05 '23 00:06 amaisano

Tried changing the lines in the Frigidaire.js file but I'm unable to save due to file permissions. Any way that y'all can update the plugin?

In the meantime, you should be able to get into your Homebridge container and edit the dependency files that this plugin downloads as requirements, if you want to debug. I don't currently have a HB server setup any more (switched to Home Assistant), so can't give you step by step. I just know I've done it before (with THIS plugin, haha).

If you do find it and can edit it, just make the same changes that I did in https://github.com/karlg100/frigidaire/pull/12 until it's officially updated.

amaisano avatar Jun 05 '23 00:06 amaisano

Thank you for looking into this! I'll wait for the update. It won't let me save changes to the file.

pman193 avatar Jun 05 '23 00:06 pman193

I was able to change file permissions from a command prompt. Replaced the file with the new code. This is from Homebridge status.

[6/4/2023, 11:01:15 PM] [homebridge-frigidaire] Child bridge process ended [6/4/2023, 11:01:15 PM] [homebridge-frigidaire] Process Ended. Code: 1, Signal: null [6/4/2023, 11:01:22 PM] [homebridge-frigidaire] Restarting Process... [6/4/2023, 11:01:23 PM] [homebridge-frigidaire] Launched child bridge with PID 8044 [6/4/2023, 11:01:24 PM] Registering platform 'homebridge-frigidaire.Frigidaire' [6/4/2023, 11:01:24 PM] [homebridge-frigidaire] Loaded homebridge-frigidaire v2.1.3 child bridge successfully failed to parse auth result json: '[object Object]'

/usr/lib/node_modules/homebridge-frigidaire/node_modules/frigidaire/lib/frigidaire.js:541 var sessionKey = body.data.sessionKey ^ TypeError: Cannot read properties of undefined (reading 'sessionKey') at Request.authPostCallback [as _callback] (/usr/lib/node_modules/homebridge-frigidaire/node_modules/frigidaire/lib/frigidaire.js:541:37) at Request.self.callback (/usr/lib/node_modules/homebridge-frigidaire/node_modules/request/request.js:185:22) at Request.emit (node:events:513:28) at Request. (/usr/lib/node_modules/homebridge-frigidaire/node_modules/request/request.js:1154:10) at Request.emit (node:events:513:28) at IncomingMessage. (/usr/lib/node_modules/homebridge-frigidaire/node_modules/request/request.js:1076:12) at Object.onceWrapper (node:events:627:28) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1359:12) at processTicksAndRejections (node:internal/process/task_queues:82:21)

pman193 avatar Jun 05 '23 03:06 pman193

i'm looking for an update by the author also

brew99 avatar Jun 10 '23 23:06 brew99

I finally got everything to work by editing the .js files with the updates posted by @amaisano and @marekbrz. I had to change the password to get everything to work. I copied and pasted their changes. Using the newest app released.

pman193 avatar Jun 10 '23 23:06 pman193