Open cojoj opened 4 years ago
Thank you for the kind words. A lot of things can definitely be improved in the plugin. The number one problem right now is the lack of any official documentation.
I am using the following existing implementations to find out how the API actually works:
https://github.com/TA2k/ioBroker.midea https://github.com/NeoAcheron/midea-ac-py https://github.com/yitsushi/midea-air-condition https://github.com/andersonshatch/midea-ac-py https://github.com/barban-dev/midea_inventor_dehumidifier
Using these I have developed some sense of how the API actually works, at least for some devices. Some settings like the Fahrenheit/Celsius switch are single-bit values inside the byte-array so they're quite a bit tricky to find, especially with all the encryption going on (I suspect the extra AES encryption is due to some sort of encryption restriction in China).
Other than that, I've also just been using BurpSuite to MITM the app requests and I've decompiled the Android app. Midea provides statically compiled SDK frameworks for both iOS and Android, however I have been unable to gain any new and useful information from them other than some new error codes.
I would suggest you start by going through some of those projects linked above (including their wiki pages) to gain an understanding of how the API might work and then start MITM'ing your apps requests and decrypting the data as shown in the Util class.
I am already testing something like that as most of the properties of a service can be set in JS/TS using setProps, however I can still adjust the dial lower than 17 °C so I don't know what wrong there.
This is related to a feature request regarding Fahrenheit support, you need to read the value from the ApplianceResponse and send it right back with your update
Same as 1
Good luck with the API :)
This just depends on the polling interval you set in the config.json. You can set it to something like 0.5 to make it 30 seconds or even less.
I am currently still in the process of actually getting the code somewhat structured, go ahead and check out the development branch if you want to help :)
Hey, first of all, a big round of 👏 for creating this plugin.
I'm based in Poland and I'm using Rotenso Split AC. They're also using this WiFi module from Midea and are using NetHome Plus app for communication from mobile devices. I was able to integrate this plugin with my Homebridge instance and it seems to work (more or less 😅). I've spotted a couple of issues here and there and I'm not really sure whether they're related to the type of devices I have or they're simply some bugs, WIPs or features. Anyway, I'll list them below and maybe we can discuss it in the issue?
Selecting fan speed using a slider is also not the best option since devices actually use enum for this with a couple of values + auto mode. I think supporting this would improve the overall usability of this HomeKit component.I've noticed thatCharacteristic.RotationSpeed
only supports values from 0 to 100, so no enum here. I've also noticed there's aMin Step
and maybe it's possible to modify this value to jump every 25 instead of the default of 1.supportedSwingMode
doesn't work with my devices at all and I suspect this might be related to the device's manufacturer, but I'd love to see this working.I know this is a lot to digest and I'm not here to throw least expected:
But rather to help out as much as possible. I'm an iOS developer (I don't have JS expertise at all), so I can help out with reverse engineering network traffic, checking the iOS SDK or do some other things as well. Also, I'm willing to try and contribute to this repo, but I'd need some guidance in understanding what's happening.