karlg100 / homebridge-frigidaire

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

New Frigidaire App #47

Open pman193 opened 1 year ago

pman193 commented 1 year ago

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

pman193 commented 1 year ago

[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)

amaisano commented 1 year ago

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.

pman193 commented 1 year ago

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?

amaisano commented 1 year ago

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 commented 1 year ago

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.

pman193 commented 1 year ago

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

pman193 commented 1 year ago

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)

brew99 commented 1 year ago

i'm looking for an update by the author also

pman193 commented 1 year ago

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.