{"id":18188015,"url":"https://github.com/hypfer/esp8266-midea-dehumidifier","last_synced_at":"2025-03-02T13:12:39.296Z","repository":{"id":46345085,"uuid":"298391876","full_name":"Hypfer/esp8266-midea-dehumidifier","owner":"Hypfer","description":"Cloud-free wifi dehumidification","archived":false,"fork":false,"pushed_at":"2024-08-18T20:25:56.000Z","size":5987,"stargazers_count":127,"open_issues_count":9,"forks_count":24,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-02-16T03:44:55.263Z","etag":null,"topics":["cloud-free","comfee","esp8266","home-assistant","midea","mqtt","smarthome"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hypfer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"github":"hypfer","ko_fi":"hypfer"}},"created_at":"2020-09-24T20:48:44.000Z","updated_at":"2025-01-31T11:58:51.000Z","dependencies_parsed_at":"2025-01-19T00:37:44.464Z","dependency_job_id":"5bd9bddd-e532-45be-8880-b9ede45c194d","html_url":"https://github.com/Hypfer/esp8266-midea-dehumidifier","commit_stats":{"total_commits":19,"total_committers":8,"mean_commits":2.375,"dds":"0.42105263157894735","last_synced_commit":"317e2295dde70d7b20d649d6f0dda061c608fb11"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypfer%2Fesp8266-midea-dehumidifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypfer%2Fesp8266-midea-dehumidifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypfer%2Fesp8266-midea-dehumidifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hypfer%2Fesp8266-midea-dehumidifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hypfer","download_url":"https://codeload.github.com/Hypfer/esp8266-midea-dehumidifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241509653,"owners_count":19974071,"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":["cloud-free","comfee","esp8266","home-assistant","midea","mqtt","smarthome"],"created_at":"2024-11-03T02:04:21.965Z","updated_at":"2025-03-02T13:12:39.277Z","avatar_url":"https://github.com/Hypfer.png","language":"C++","funding_links":["https://github.com/sponsors/hypfer","https://ko-fi.com/hypfer"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/Hypfer/esp8266-midea-dehumidifier/blob/master/img/logo.svg\" width=\"800\" alt=\"esp8266-midea-dehumidifier\"\u003e\n    \u003cp align=\"center\"\u003e\u003ch2\u003eFree your dehumidifier from the cloud\u003c/h2\u003e\u003c/p\u003e\n\u003c/div\u003e\n\nThis repo contains software to build a replacement wifi adapter for your wifi-enabled midea dehumidifier\nwhich enables cloud-free operation utilizing MQTT.\n\nHome Assistant Autodiscovery for all features is supported since Home Assistant 2021.08.\nFurthermore, the WifiManager library is used for on-the-fly configuration.\nAlso, ArduinoOTA is used, so that firmware updates are possible even with a reassembled device.\n\n\nIf you're looking for the exact opposite of this, check out [esp8266-deerma-humidifier](https://github.com/Hypfer/esp8266-deerma-humidifier/).\nOr maybe even use both simultaneously and see who wins?\n\n\nThis should work with all wifi-enabled Midea-made dehumidifiers. They are sold under different brands including:\n* Comfee\n* Inventor\n\nQuoting from [node-mideahvac](https://github.com/reneklootwijk/node-mideahvac):\n\nThe WiFi interface [on these machines] is provided by a dongle, called WiFi SmartKey, either connected to an USB type-A\nconnector or a JST-HX type of connector. This dongle wraps the UART protocol used to communicate with the unit with a\nlayer for authentication and encryption for communication with a mobile app via the Midea cloud or directly via a local LAN connection.\n\nHowever, it turned out the dongle is just connected to a serial interface (TTL level) of the unit.\nThis means an alternative is to hook up directly to this serial interface and bypass the cloud, authentication and encryption stuff,\n[which is exactly what this project does].\n\n## Compatibility list\nThis list contains all tested and known-working dehumidifiers:\n\n* Midea MAD22S1WWT\n* Comfee MDDF-16DEN7-WF\n* Comfee MDDF-20DEN7-WF\n* Inventor Eva II PRO WI-FI\n* Inventor EVA ION PRO WiFi 20L\n* Midea Cube 20 ([#22](https://github.com/Hypfer/esp8266-midea-dehumidifier/issues/22))\n* Midea Cube 35 ([#29](https://github.com/Hypfer/esp8266-midea-dehumidifier/issues/29))\n* Midea Cube 50 ([#27](https://github.com/Hypfer/esp8266-midea-dehumidifier/issues/27))\n\nAdditionally, there are models that technically also work but have some issues:\n\n* Comfee MDDF-20DEN7 - lacks Wi-Fi Button and USB port. The guide below doesn't fully apply! ([#24](https://github.com/Hypfer/esp8266-midea-dehumidifier/pull/24))\n\n## Health and Safety\nPlease note that some of the supported dehumidifiers such as the Comfee MDDF-20DEN7-WF use R290 as its coolant which - [while having a much lower global warming potential than other coolants](https://en.wikipedia.org/wiki/Refrigerant#Environmental_issues) -\nis also **Propane**.\n\nYes, _the_ **Propane**.\n\nTherefore, when disassembling, please be extra careful so that you don't damage anything since a leak may result in\nyou blowing yourself up and/or burning your house down.\n\n## Building the Adapter\n![adapter](./img/adapter.jpg)\nThis is how the finished replacement adapter I'm using looks like.\n\nTo build one of these, you will need:\n\n* ESP8266 ESP-01 Module\n* ESP-01 Serial Adapter Board with 3.3v to 5v Level Shifters\n* USB A to Terminal Plug Adapter\n* Some Dupont Cables\n* Something to flash the ESP-01\n\nJust source those from the supplier of your choice and compare product listings with this finished adapter photo.\n\nFor flashing the ESP-01, there are some nice and self-contained USB to ESP-01 Adapters.\n\nHowever, they cannot flash the module without soldering an extra button to it.\nYou might want to get one of those as well and then follow [this instructable](https://www.instructables.com/id/USB-to-ESP-01-Board-Adapter-Modification/).\n\nThe firmware can be built and flashed using the Arduino IDE.\n\nFor this, you will need to add ESP8266 support to it by [using the Boards Manager](https://github.com/esp8266/Arduino#installing-with-boards-manager).\n\nFurthermore, you will also need to install the following libraries using the Library Manager:\n\n* ArduinoOTA 1.0.3\n* ArduinoJSON 6.10.1\n* PubSubClient 2.8.0\n* WiFiManager 0.15.0\n\n## Using the Adapter\nCurrent supported features are:\n\n* On/Off\n* Mode\n* Fan Speed\n* Humidity Setpoint\n\nAlso, the WiFi indicator on the unit continues to work like it's the real wifi adapter.\n\n### Configuring Wifi\nSince this project is using the WifiManager library, the ESP8266 will open up a WiFi Access Point for its initial configuration\nor if it is unable to connect to the previously configured WiFi.\n\nThe library pretends that said WiFi AP requires a captive portal which triggers a notification on recent android phones.\nSimply connect to the AP with your phone, tap the \"Login required\"-notification and you should be able to configure everything.\n\nIf for any reason you require to reconfigure everything, you can simply push and the WiFi button of your Dehumidifier for three seconds.\nThis also deletes the config and opens up the initial configuration Access Point again.\n\n### Controlling the Appliance\nSince we're using the Home Assistant Autodiscovery feature, everything should just work™.\n\nIf you're using something else other than Home Assistant, you can of course also control it by manually sending\nJSONs to the command mqtt topic of the unit:\n```\nesp8266-midea-dehumidifier/DEHUMIDIFIER-FFFFFF/command\n\n{\n\t\"state\": \"on\",\n\t\"humiditySetpoint\": 55,\n\t\"fanSpeed\": \"medium\",\n\t\"mode\": \"setpoint\"\n}\n```\nYou can omit parameters that you don't want to change.\n\nThe current status of the unit will be published like this:\n```\nesp8266-midea-dehumidifier/DEHUMIDIFIER-FFFFFF/state\n\n{\n\t\"state\": \"on\",\n\t\"humiditySetpoint\": 55,\n\t\"humidityCurrent\": 41,\n\t\"errorCode\": 0,\n\t\"fanSpeed\": \"medium\",\n\t\"mode\": \"setpoint\"\n}\n```\n\n## Misc\nAs you can see, on the Comfee MDDF-20DEN7-WF, the replacement adapter actually fits inside the mounting point of the regular WiFi adapter.\n![comfee adapter](./img/comfee_adapter_mounted.jpg)\n\n## References and sources\n\nThe knowledge to create the logic to monitor and control the Midea-'like' AC units was gathered by reverse engineering Android applications from various vendors, analyzing the UART protocol between an Artel unit and an SK103 SmartKey, documents found on the Internet, primarily in Chinese and the work from:\n\n* Mac Zhou: \u003chttps://github.com/mac-zhou/midea-msmart\u003e\n* NeoAcheron: \u003chttps://github.com/NeoAcheron/midea-ac-py\u003e\n* Rene Klootwijk: \u003chttps://github.com/reneklootwijk/node-mideahvac\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypfer%2Fesp8266-midea-dehumidifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhypfer%2Fesp8266-midea-dehumidifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypfer%2Fesp8266-midea-dehumidifier/lists"}