node-mideahvac
node-mideahvac copied to clipboard
No Authentication Key and Token
Hi
Midea-discover finds my appliance, but when I try to get an authentication key and token, I get:
- Authentication Key: An unknown error occurred
- Authentication Token: An unknown error occurred
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!
@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):
- ESP8266 ESP-01S wifi module
- ESP8266 adapter 3.3V to 5V for ESP-01
- ESP-01 USB ESP8266 serial for programming (there are versions with programming switch and without - I got without and then followed instructions in this video to add jumpers: https://www.youtube.com/watch?v=6uaIWZCRSz8&t=187s)
- Jumper cables to connect adapter with AC
⚠️ 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.
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.
I had another look at the code and I think I fixed the issue. Would be great if you can test.
Ok, great! I will do the test, but it will take some time, because i first have to change the interface...
You can just run the discover command to obtain token and key, no need to change anything on your side.
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!
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).
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.
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.
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.
@jeburkha upgraded to 0.3.1 and unfortunately it does not work for me with same error as before.
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.