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

Unable to retrieve token/key through discovery #113

Open rtblair opened 4 weeks ago

rtblair commented 4 weeks ago

Describe The Bug:

When I use the UI Configuration screen to discover IDs, tokens, and other attributes for air conditioners, the token/key column does not populate and shows as "token missing key missing". Same result whether the "Use default Midea SmartHome profile" is toggled on, or off with my valid username and password.

To Reproduce:

Expected behavior:

Table should populate with tokens and keys, but it does not.

Logs:

[10/29/2024, 12:16:12 AM] [Homebridge UI] [homebridge-midea-platform] Custom UI created.
[10/29/2024, 12:16:13 AM] [Homebridge UI] [homebridge-midea-platform] Incoming Request: /getDefaults
[10/29/2024, 12:16:13 AM] [Homebridge UI] [homebridge-midea-platform] Incoming Request: /mergeToDefault
[10/29/2024, 12:16:19 AM] [Homebridge UI] [homebridge-midea-platform] Incoming Request: /login
[10/29/2024, 12:16:20 AM] [Homebridge UI] [homebridge-midea-platform] Incoming Request: /mergeToDefault
[10/29/2024, 12:16:20 AM] [Homebridge UI] [homebridge-midea-platform] Incoming Request: /discover
[10/29/2024, 12:16:20 AM] [Homebridge UI] [homebridge-midea-platform] Start device discovery...
[10/29/2024, 12:16:21 AM] [Homebridge UI] [homebridge-midea-platform] Discovered device: {"ip":"192.168.7.189","port":6444,"id":[ID1],"model":"00000Q1F","sn":"[SN1]","name":"net_ac_[code1]","type":172,"version":3}
[10/29/2024, 12:16:21 AM] [Homebridge UI] [homebridge-midea-platform] Discovered device: {"ip":"192.168.7.129","port":6444,"id":[ID2],"model":"00000Q15","sn":"[SN2]","name":"net_ac_[code2]","type":172,"version":3}
[10/29/2024, 12:16:21 AM] [Homebridge UI] [homebridge-midea-platform] Discovered device: {"ip":"192.168.7.199","port":6444,"id":[ID3],"model":"00000Q1F","sn":"[SN3]","name":"net_ac_[code3]","type":172,"version":3}
[10/29/2024, 12:16:22 AM] [Homebridge UI] [homebridge-midea-platform] Device discovery complete.
[10/29/2024, 12:16:24 AM] [Homebridge UI] [homebridge-midea-platform] Device discovery complete.
[10/29/2024, 12:16:26 AM] [Homebridge UI] [homebridge-midea-platform] Device discovery complete.
[10/29/2024, 12:16:28 AM] [Homebridge UI] [homebridge-midea-platform] Device discovery complete.
[10/29/2024, 12:16:28 AM] [Homebridge UI] [homebridge-midea-platform] [net_ac_[code1]] Retrieve credentials.
[10/29/2024, 12:16:29 AM] [Homebridge UI] [homebridge-midea-platform] [net_ac_[code2]] Retrieve credentials.
[10/29/2024, 12:16:29 AM] [Homebridge UI] [homebridge-midea-platform] [net_ac_[code3]] Retrieve credentials.

Plugin Config:

Note that this is sparse because the failure is happening before I can get the info necessary to configure the plugin.

{
    "platform": "midea-platform",
    "name": "midea-platform"
}

Environment:

kovapatrik commented 4 weeks ago

Hm yeah, it's indeed hard to debug this using this much information.

Are these devices added to a SmartHome (or any other) account?

kovapatrik commented 4 weeks ago

If you have btw, can you turn on debug logs inside your Homebridge instance? There might be some other logs as well while the discovery is running.

rtblair commented 4 weeks ago

Thanks @kovapatrik

Are these devices added to a SmartHome (or any other) account?

They are added to a Midea SmartHome account, but nothing else.

If you have btw, can you turn on debug logs inside your Homebridge instance? There might be some other logs as well while the discovery is running.

I do have debug logs running. Will check them when I am back on site.

kovapatrik commented 4 weeks ago

From your logs, I thought it was disabled as there should be more logs in debug mode., but please do that recheck! You might also try to see if there are any errors in the developer tools console tab (in case you are using Safari, you can enable this menu using this guide: https://support.apple.com/en-gb/guide/safari/sfri20948/mac)