Hi,
I want to try first time this binding, and not working with my Midea MA-12NXD0-I.
I installed the binding, then configured, and the binding filled the device id, token and key.
But the thing is offline with COMMUNICATION_ERROR
The log is:
How do i connect with this plugin? I need the key and the token from midea but i don’t know how to get it. I don’t know the link. Can someone help me with this please?
The error you posted shows the token and key used are not valid incorrect Illegal key size
clear out the values for the id username and password for the online account you used for discovery and save and retry the configuration process also make sure what you used for the online account works and you can control your a/c from the online app and the device you discovered is actually controllable from that online account.
you need to use the credentials that you used when you first set up the a/c to connect to your online account either Nethome plus or Midea air or MSmartHome app then binding can connect to the online service for the one time retrial using any one of those 3 app accounts to obtain the token and key but you have to have a valid account able to log on to that online account and your A/C is set up in that online account.
This is only used 1 time to get the token and key pair after it is configured the binding only talks to the unit on your local network and that online account email(username) and that online account password are no longer used.
Then I tried to use the key/token with the nbogojevic/midea-beautiful-air script, still not working.
Then I tried to obtain the key/token with the mac-zhou/midea-msmart discovery tool, if I execute it with the AC ip or account/pass it receives a different key/token every time.
This key/token can be used with the nbogojevic/midea-beautiful-air script. It throws an exception, but the AC can be switched on/off or change the target temperature.
Then I removed the email and password from the binding and put these key/token.
And it is not working with the error in previous post.
The MsmartHome app working correctly with the email/password.
the mac-zhou discover will pull a new token key pair every time you run it that is the normal however any matched set of token and key pair you get should work and can be reused.
Did you try using the example.py from mac-zhou to see if you could return the status and change values?
I have seen that same behavior of the nbogojevic script also it works but as you said it will return errors.
all of what you post still seem to indicate a bad token key pair populated in the thing remember spaces and carriage returns are also counted as a character so be sure you are not copying any unexpected hidden character values when you populate the fields in the a/c thing
Such as you placed the values in notepad and you had wordwrap on as one example or you direct copied the values from the return log from the discover and got a leading or trailing space
what link are you asking for?
Did you use an app to set up your a/c initially and to get the network configured? The most common used are one of the 3 listed in the thing after the binding is installed and you either scanned and found the thing or you manually added the thing so in the things drop down you chose cloud provider make sure you choose the correct one same as your preestablished and validated account with that provider is set up for.
I tried the mac-zhou example.py with the binding downloaded key/token pair. It not working with authentication error.
Then I tried with a mac-zhou discovered token which is working, I can change the values correctly.
Then I removed the user/pass from the binding and put the key/token from the working example.py.
The thing now online but the errors remain same in my first comment. The items connected to channels can’t updated and all is NULL.
Hi Jacek, it was just an idea. I tried to figure out what the problem could be, but I couldn’t get any further. I have come to the point that as long as only one device is configured, it works without any problems. As soon as I set up the second device and saved its settings, the previous one stops working. Although the device set as the second device works for a while, it can no longer be controlled after a while. According to tcpdump, there is an error in the communication. Even i set the Openhab log level to TRACE, I did not get any meaningful information. I think i will install a new instance of Openhab from stratch then start playing with it. Anyone else has encountered any similar problem?
Hi, actually i have 7 devices. All devices are v3 and according to tcpdump it seems Openhab uses random/different source ports for all devices. Any idea further idea would be appriciated. Thank You, Zoltan
Good morning everyone, I tried to install the latest official version of this binding. Adding it to OpenHab 3.2.0 was no problem. OpenHab recognizes the binding and after specifying the IP address of my AC unit, I can also get more information. Since my AC unit has already installed version V3, I have to use the Token & Key method. Unfortunately I get the following error message.
2022-09-26 11:03:00.719 [INFO ] [ler.MideaACHandler$ConnectionManager] - Retrieving Token and Key from cloud
2022-09-26 11:03:06.868 [WARN ] [ler.MideaACHandler$ConnectionManager] - Token and Key obtained from cloud, saving, initializing
2022-09-26 11:03:06.873 [INFO ] [ler.MideaACHandler$ConnectionManager] - Connected to mideaac:ac:6h5f8s6d5f at XXX.XXX.XXX.XXX
2022-09-26 11:03:07.277 [WARN ] [ler.MideaACHandler$ConnectionManager] - Authentication reponse unexpected data length (13 instead of 72)!
A token and also a key are obtained from Midea Air and displayed… But unfortunately the binding does not start. Has anyone of you had this problem before or can give me a hint what I should do differently?
Hello Zoltan,
Yes I have unfortunately only devices with V3 version, almost 3 months ago they all made an involuntary FW update :(. The firmware on the WLAN sticks which is installed in the indoor units is: V 3.0.8.
I have now also looked at the DEBUG information, but unfortunately this has not helped me.
I have seven devices with 3 different firmwares (1.0.7, 150029082115 and 150029092122 but i have not any device with the mentioned FW. I use a modified plugin because this version did not work for me with multiple devices as the same time. If you want i can share it with you but i am not considered that will solve your problem.
I have also tested to control only one of the indoor units… But also without success. The binding complains that a returning payload is 13 instead of 72… Do you know what exactly this means? Is it possibly only because of the validation of the received data? Everything else that the plugin should do (logging in to the cloud to create the token… reading the device serial number USW… is running well…) I would almost guess that the whole thing fails because of an internal binding validation or am I seeing it wrong?
When plugin calls doAthentication method the code will build a request which is encoded with the token, send to the device then expects a non null and 72 long response. If it is not will throw the mentioned error.