kovapatrik / homebridge-midea-platform

Homebridge plugin for Midea devices
https://www.npmjs.com/package/homebridge-midea-platform
Apache License 2.0
29 stars 2 forks source link

Doesn't discover credentials #108

Closed itaysk closed 2 months ago

itaysk commented 2 months ago

Describe Your Problem:

Doesn't discover credentials. I'm using an "Electra" brand AC which is a Midea rebranded. The Electra support tells me to use the Nethome Plus app which works.

When trying to use this plugin the AC was discovered but without credentials. I tried all discovery methods, and only the Meiju option was able to retrieve credentials. but in the logs I get thebelow error.

Logs:

[9/7/2024, 2:56:04 PM] TypeError: The "key" argument must be of type string or an instance of ArrayBuffer, Buffer, TypedArray, DataView, KeyObject, or CryptoKey. Received undefined
    at prepareSecretKey (node:internal/crypto/keys:596:11)
    at Cipheriv.createCipherWithIV (node:internal/crypto/cipher:138:9)
    at new Cipheriv (node:internal/crypto/cipher:243:3)
    at createCipheriv (node:crypto:147:10)
    at LocalSecurity.aes_cbc_encrpyt (/var/lib/homebridge/node_modules/homebridge-midea-platform/src/core/MideaSecurity.ts:169:34)
    at LocalSecurity.encode_8370 (/var/lib/homebridge/node_modules/homebridge-midea-platform/src/core/MideaSecurity.ts:241:34)
    at MideaACDevice.send_message_v3 (/var/lib/homebridge/node_modules/homebridge-midea-platform/src/core/MideaDevice.ts:207:42)
    at MideaACDevice.send_message (/var/lib/homebridge/node_modules/homebridge-midea-platform/src/core/MideaDevice.ts:181:18)
    at MideaACDevice.send_heartbeat (/var/lib/homebridge/node_modules/homebridge-midea-platform/src/core/MideaDevice.ts:361:16)
    at MideaACDevice.run (/var/lib/homebridge/node_modules/homebridge-midea-platform/src/core/MideaDevice.ts:423:18)
[9/7/2024, 2:56:04 PM] Got SIGTERM, shutting down Homebridge...

Plugin Config:

Screenshots:

Environment:

kovapatrik commented 2 months ago

Did you try to login with your credentials using the NetHome Plus option in the discovery form?

itaysk commented 2 months ago

I have signed in to NetHome Plus using Apple. When I go to NetHome Plus app profile, under name and email I see some sort of ID in the pattern of number.long-hex.number. I don't think I have chosen a password. Do you happen to know how auth work with Apple?

itaysk commented 2 months ago

I have recreated a NetHome Plus account with normal credentials, and it works now. Many thanks for this plugin!!