midea-air-condition
midea-air-condition copied to clipboard
Local mode
Hi!
Thank you very much for this api, it works very well.
Do you know how to change it to use on local network (connect to device directly) instead of using cloud?
Best regards, Jacek
Hi JacekDob,
I saw that the latest version of the app does use a different way to communicate with the AC locally, so once the implementation is complete, I will investigate further.
It does require a specialized setup with packet capturing and port scanning though, it's going to take a bit of time.
But I will definitely add that as a feature later, the latency with the cloud service is horrible.
Yes, you are right,: latency with the cloud service is horrible.
Sry I did not see this issue. I tried to find a way, but I could not issue commands on UDP. It's an issue for us not because of the latency, but the external cloud service sometimes lists devices offline, but we know it's not offline. I will try to find what I have now (for a while I had to abandon my reverse-engineering work on it because I have no spare time with my projects)
@yitsushi I've been trying hard to get the local broadcast to work, and I can see packets from the devices, even if the cloud service is offline (manually disconnected from my internet connection on my router). The problem is that the UDP packets seem to be encrypted differently to the messages going to the cloud service. I don't think there is any authentication that happens there, which is a major change from the API.
@NeoAcheron : That's where I stuck too. Soon I will publish my research pack (part of it, sry but the rest may contain sensitive information and I'm lazy to clean-up; and meanwhile I replaced my computer and I don't find my files about UDP packets).
I'm not sure if it's encrypted, but it has a checksum I could not figure out. I found some references on MD5 in beam functions, but with a bruteforce logic I could not figure out what it uses for the hash and what it does exactly with the hash.
Another interesting part: In NetLanBroadcastResponse there is a mRandomCode
which is 16 bytes long and maybe that's what I tried to identify as an md5 hash which is 16 bytes too.
And then ... I had to suspend the project.
I pushed up some maybe useful materials/docs into the research-pack
branch
any news about the local mode? this feature would be very nice!
@NeoAcheron any update regarding local mode? Or any information you could share regarding it ?
@NeoAcheron any update regarding local mode? Or any information you could share regarding it ?
Sorry @gelsas, I do not have access to a Midea based AC anymore, since I moved.
I believe most up to date repo is this one: https://github.com/andersonshatch/midea-ac-py
@NeoAcheron I do have one more question maybe you are able to help with that even tough you do not have access to a midea based AC anymore.
Each time the call is made to get the current state of the AC is causing my ac to change to fan only and set to 17 degrees. Many others have similar issues with some midea AC models
Do you have any idea what could cause this or how to maybe fix it ?
The main cause can be the way I constructed the payload. I tried to fetch information from the server and use those values in there, but I'm not sure if I covered all the values, so maybe there are some values that are handled as a constant like value in the payload and basically the constant value is the one we were using in the office.
Thank you for your answer.
Any suggestions for a "beginner" like me how I could fix it ?
(Unrelated Info) Nowadays there are new apps from Midea, from what I found out they use this sdk https://github.com/midea-sdk-org/android-sdk Could we use it to get the values etc in another way ?
Best, gelsas
There is a branch named research-pack
, it contains a lot of information how I reverse engineered the android app before. I'm not sure if everything is there or not because it was 2yrs ago.
I'll mark this repo as Archived becaus no future update expected on this repo, at least not from me because of technical reasons.
Maybe the 7-temp-unit
branch can be useful too.