Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dudanov/mideauart
A library for controlling Midea home appliances using the UART protocol.
https://github.com/dudanov/mideauart
air-conditioner artel carrier comfee control electrolux home-automation inventor iot midea midea-dongle protocol qlima serial uart
Last synced: about 5 hours ago
JSON representation
A library for controlling Midea home appliances using the UART protocol.
- Host: GitHub
- URL: https://github.com/dudanov/mideauart
- Owner: dudanov
- Created: 2021-08-11T11:37:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-12T08:29:02.000Z (4 months ago)
- Last Synced: 2025-01-30T13:09:35.430Z (8 days ago)
- Topics: air-conditioner, artel, carrier, comfee, control, electrolux, home-automation, inventor, iot, midea, midea-dongle, protocol, qlima, serial, uart
- Language: C++
- Homepage:
- Size: 454 KB
- Stars: 72
- Watchers: 10
- Forks: 20
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MideaUART
Arduino framework library for controlling Midea home appliances using the UART protocol.Control is possible with a custom dongle. You can make it yourself according to numerous instructions on the Internet, or you can buy a ready-made one in [Tindie Shop](https://www.tindie.com/products/24607/), thereby supporting me and my work.
A far from complete list of supported brands:
1. [Midea](https://www.midea.com/)
2. [Electrolux](https://www.electrolux.ru/)
3. [Qlima](https://www.qlima.com/)
4. [Artel](https://www.artelgroup.com/)
5. [Carrier](https://www.carrier.com/)
6. [Comfee](http://www.comfee-russia.ru/)
7. [Inventor](https://www.inventorairconditioner.com/)
8. [Dimstal/Simando](https://www.simando24.de/)## Using
It's simple.
1. Create appliance instance of `dudanov::midea::ac::AirConditioner`.
2. Set serial stream interface and communication mode to `9600 8N1`.
3. Add `setup()` and `loop()` methods to the same-named global functions of the project.
4. Control device via `void control(const Control &control)` with optional parameters.
5. You may optionally add your callback function for receive state changes notifications.```cpp
#include
#includeusing namespace dudanov::midea::ac;
AirConditioner ac;
// Example how can change work mode easily
static inline void switchMode(Mode mode) {
Control control;
control.mode = mode;
ac.control(control);
}// Example how can change mode and temp in same time
static inline void changeState(Mode mode, float targetTemp) {
Control control;
control.mode = mode;
control.targetTemp = targetTemp;
ac.control(control);
}// Example how can change power state
static inline void setPowerState(bool state) {
ac.setPowerState(state);
}// Example how can change mode to AUTO and set target temp to 25C
static inline void changeAuto25() {
Control control;
control.mode = Mode::MODE_AUTO;
control.targetTemp = 25.0f;
ac.control(control);
}// Here you may get new properties states
void onStateChange() {
ac.getTargetTemp();
ac.getIndoorTemp();
ac.getMode();
ac.getPreset();
ac.getSwingMode();
ac.getFanMode();
}void setup() {
Serial.begin(9600); // set serial baudrate to 9600 8N1
ac.setStream(&Serial); // set stream serial interface
ac.addOnStateCallback(onStateChange); // add callback
ac.setup();
}void loop() {
ac.loop();
}
```## My thanks
to the following people for their contributions to reverse engineering the UART protocol and source code in the following repositories:
* [Mac Zhou](https://github.com/mac-zhou/midea-msmart)
* [Rene Klootwijk](https://github.com/reneklootwijk/midea-uart)
* [NeoAcheron](https://github.com/NeoAcheron/midea-ac-py)### Your thanks
If this project was useful to you, you can [buy me](https://paypal.me/dudan0v) a Cup of coffee :)