{"id":22352115,"url":"https://github.com/dudanov/mideauart","last_synced_at":"2025-04-07T05:10:04.965Z","repository":{"id":37244686,"uuid":"394967745","full_name":"dudanov/MideaUART","owner":"dudanov","description":"A library for controlling Midea home appliances using the UART protocol.","archived":false,"fork":false,"pushed_at":"2025-02-11T11:12:31.000Z","size":467,"stargazers_count":76,"open_issues_count":13,"forks_count":22,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-31T04:06:43.462Z","etag":null,"topics":["air-conditioner","artel","carrier","comfee","control","electrolux","home-automation","inventor","iot","midea","midea-dongle","protocol","qlima","serial","uart"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dudanov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-11T11:37:13.000Z","updated_at":"2025-03-08T21:23:13.000Z","dependencies_parsed_at":"2024-07-29T10:56:20.466Z","dependency_job_id":"0e72505a-4a67-4502-ad67-9795c12fc7a9","html_url":"https://github.com/dudanov/MideaUART","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dudanov%2FMideaUART","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dudanov%2FMideaUART/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dudanov%2FMideaUART/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dudanov%2FMideaUART/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dudanov","download_url":"https://codeload.github.com/dudanov/MideaUART/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595334,"owners_count":20963943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["air-conditioner","artel","carrier","comfee","control","electrolux","home-automation","inventor","iot","midea","midea-dongle","protocol","qlima","serial","uart"],"created_at":"2024-12-04T12:17:12.705Z","updated_at":"2025-04-07T05:10:04.872Z","avatar_url":"https://github.com/dudanov.png","language":"C++","funding_links":["https://paypal.me/dudan0v"],"categories":[],"sub_categories":[],"readme":"# MideaUART\nArduino framework library for controlling Midea home appliances using the UART protocol.\n\nControl 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.\n\nA far from complete list of supported brands:\n1. [Midea](https://www.midea.com/)\n2. [Electrolux](https://www.electrolux.ru/)\n3. [Qlima](https://www.qlima.com/)\n4. [Artel](https://www.artelgroup.com/)\n5. [Carrier](https://www.carrier.com/)\n6. [Comfee](http://www.comfee-russia.ru/)\n7. [Inventor](https://www.inventorairconditioner.com/)\n8. [Dimstal/Simando](https://www.simando24.de/)\n\n## Using\nIt's simple.\n1. Create appliance instance of `dudanov::midea::ac::AirConditioner`.\n2. Set serial stream interface and communication mode to `9600 8N1`.\n3. Add `setup()` and `loop()` methods to the same-named global functions of the project.\n4. Control device via `void control(const Control \u0026control)` with optional parameters.\n5. You may optionally add your callback function for receive state changes notifications.\n\n```cpp\n#include \u003cArduino.h\u003e\n#include \u003cAppliance/AirConditioner/AirConditioner.h\u003e\n\nusing namespace dudanov::midea::ac;\n\nAirConditioner ac;\n\n// Example how can change work mode easily\nstatic inline void switchMode(Mode mode) {\n  Control control;\n  control.mode = mode;\n  ac.control(control);\n}\n\n// Example how can change mode and temp in same time\nstatic inline void changeState(Mode mode, float targetTemp) {\n  Control control;\n  control.mode = mode;\n  control.targetTemp = targetTemp;\n  ac.control(control);\n}\n\n// Example how can change power state\nstatic inline void setPowerState(bool state) {\n  ac.setPowerState(state);\n}\n\n// Example how can change mode to AUTO and set target temp to 25C\nstatic inline void changeAuto25() {\n  Control control;\n  control.mode = Mode::MODE_AUTO;\n  control.targetTemp = 25.0f;\n  ac.control(control);\n}\n\n// Here you may get new properties states\nvoid onStateChange() {\n  ac.getTargetTemp();\n  ac.getIndoorTemp();\n  ac.getMode();\n  ac.getPreset();\n  ac.getSwingMode();\n  ac.getFanMode();\n}\n\nvoid setup() {\n  Serial.begin(9600);     // set serial baudrate to 9600 8N1\n  ac.setStream(\u0026Serial);  // set stream serial interface\n  ac.addOnStateCallback(onStateChange); // add callback\n  ac.setup();\n}\n\nvoid loop() {\n  ac.loop();\n}\n```\n\n## My thanks\n\nto the following people for their contributions to reverse engineering the UART protocol and source code in the following repositories:\n\n* [Mac Zhou](https://github.com/mac-zhou/midea-msmart)\n* [Rene Klootwijk](https://github.com/reneklootwijk/midea-uart)\n* [NeoAcheron](https://github.com/NeoAcheron/midea-ac-py)\n\n### Your thanks\n\nIf this project was useful to you, you can [buy me](https://paypal.me/dudan0v) a Cup of coffee :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdudanov%2Fmideauart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdudanov%2Fmideauart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdudanov%2Fmideauart/lists"}