reneklootwijk / node-mideahvac

MIT License
76 stars 7 forks source link

No Authentication Key and Token #18

Open jeburkha opened 9 months ago

jeburkha commented 9 months ago

Hi

Midea-discover finds my appliance, but when I try to get an authentication key and token, I get:

The credentials work on the SmartHome App on my Android phone, but the App is now called SmartHome, not MSmartHome any more. Would appreciate a hint!

svobol13 commented 6 months ago

@jeburkha I had a same problem. Found out that building serialbridge dongle is really easy (thus I do not need any authentication nor 3rd party cloud):

⚠️ Do not connect the ESP8266 to AC with the programmer USB module. You have to use the 3.3V to 5V adapter (I damaged one board by not doing this). The programmer is used only for flashing.

image image image image

jeburkha commented 6 months ago

Yes, I know, I already implemented this workaround. But it doesn't solve the problem that it is not possible any more to get an authentication key and token from Smart Home.

reneklootwijk commented 6 months ago

I had another look at the code and I think I fixed the issue. Would be great if you can test.

jeburkha commented 6 months ago

Ok, great! I will do the test, but it will take some time, because i first have to change the interface...

reneklootwijk commented 6 months ago

You can just run the discover command to obtain token and key, no need to change anything on your side.

jeburkha commented 6 months ago

Does the discover command work without an interface in my network? Because I changed the interface to the self built one... If not, I first have to change the interface in my AC!

reneklootwijk commented 6 months ago

Ah, I think I misunderstood you. You have to put the original dongle in the appliance you mean? The discovery command indeed only works with the original dongle (it does not make sense when using a DIY dongle).

reneklootwijk commented 6 months ago

BTW in my experience a DIY dongle is far more stable than the original dongle. The original dongle periodically loses its WiFi connection and needs to be power cycled to recover again.

jeburkha commented 6 months ago

Yes, I use the diy interface at the moment, but it's my request after all, so I'll do the test when I get the chance. But please be patient! Yes I confirm. My original interface lost the connection almost all days.

jeburkha commented 5 months ago

I wanted to do the test with the original interface this weekend, but unfortunately I can't find it anymore! I probably put it in the original packaging of the air conditioning system and then disposed of the box later. I'm really sorry. But to everyone reading this: Don't buy the original interface. It keeps losing the connection. The DIY interface works much more reliable.

svobol13 commented 5 months ago

@jeburkha upgraded to 0.3.1 and unfortunately it does not work for me with same error as before.

reneklootwijk commented 2 months ago

Maybe the issue you experienced was due to a breaking change in node > 20.x where the dns lookup fails. Support for node version > 20.x has been added in version 0.3.3.