Midea Climate support (#804)

* Midea Climate support

* Update Midea documentation

* Midea Docs: add links to open hardware implementation of UART-dongle

* Midea docs: add vendors information

* Midea docs: fixed lint errors

* Midea Docs: added words of thanks

* Midea Docs: updated

* Midea Docs: fix option name

* Added new option info

* Added example of using outdoor sensor option

* Update: new options added

* Added new power usage option

* Major changes of settings

* Fix link

* Remove midea-dongle from index.rst

* Fix option name
This commit is contained in:
Sergey V. DUDANOV 2021-03-18 00:28:09 +04:00 committed by GitHub
parent 62f08028a2
commit d5d917db3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 159 additions and 0 deletions

View File

@ -0,0 +1,115 @@
Midea Air Conditioner
=====================
.. seo::
:description: Instructions for setting up a Midea climate device
:image: air-conditioner.png
The ``midea_ac`` component creates a Midea air conditioner climate device.
This component requires a auto-loaded ``midea-dongle`` component, that use hardware UART.
.. note::
This protocol also used by some vendors:
- `Electrolux <https://www.electrolux.ru/>`_
- `Qlima <https://www.qlima.com/>`_
- `Artel <https://www.artelgroup.com/>`_
- `Carrier <https://www.carrier.com/>`_
- `Comfee <http://www.comfee-russia.ru/>`_
- `Inventor <https://www.inventorairconditioner.com/>`_
- and maybe others
Example of hardware implementation is `Midea Open Dongle <https://github.com/dudanov/midea-open-dongle>`_ in free `KiCad <https://kicad-pcb.org>`_ format.
.. code-block:: yaml
# Example configuration entry
# Disable logging over UART (required)
logger:
baud_rate: 0
# UART settings for Midea dongle (required)
uart:
tx_pin: 1
rx_pin: 3
baud_rate: 9600
# Optional (if you want modify settings)
midea_dongle:
strength_icon: true
# Main settings
climate:
- platform: midea_ac
name: "My Midea AC"
visual:
min_temperature: 18 °C
max_temperature: 25 °C
temperature_step: 0.1 °C
beeper: true
swing_horizontal: true
swing_both: true
outdoor_temperature:
name: "Temp"
power_usage:
name: "Power"
humidity_setpoint:
name: "Hum"
Configuration variables:
------------------------
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **midea_dongle_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the ``midea_dongle`` if you want to use multiple devices.
- **name** (**Required**, string): The name of the climate device.
- **outdoor_temperature** (*Optional*): The information for the outdoor temperature
sensor.
- **name** (**Required**, string): The name of the sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **power_usage** (*Optional*): The information for the current power consumption
sensor.
- **name** (**Required**, string): The name of the sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity_setpoint** (*Optional*): The information for the humidity indoor
sensor (experimental).
- **name** (**Required**, string): The name of the sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **beeper** (*Optional*, boolean): Beeper feedback on command. Defaults to ``False``.
- **swing_horizontal** (*Optional*, boolean): Enable **swing horizontal** option. Defaults to ``False``.
- **swing_both** (*Optional*, boolean): Enable **swing both** option. Defaults to ``False``.
- All other options from :ref:`Climate <config-climate>`.
Configuration variables of midea-dongle component:
**************************************************
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :doc:`../uart` if you want
to use multiple UART buses.
- **strength_icon** (*Optional*, boolean): Set if your device have signal strength icon
and you want to use this feature. By default, on connected state, icon show maximum signal quality. Defaults to ``False``.
Acknowledgments:
----------------
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>`_
* `NeoAcheron <https://github.com/NeoAcheron/midea-ac-py>`_
* `Rene Klootwijk <https://github.com/reneklootwijk/node-mideahvac>`_
See Also
--------
- :doc:`/components/climate/index`
- :apiref:`climate/midea_ac.h`
- :ghedit:`Edit`

43
images/midea.svg Normal file
View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Creator: CorelDRAW X6 -->
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="32.277mm" height="12.424mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
viewBox="0 0 3228 1242"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<style type="text/css">
<![CDATA[
.fil3 {fill:#00B0F0;fill-rule:nonzero}
.fil1 {fill:url(#id0)}
.fil2 {fill:url(#id1)}
.fil0 {fill:url(#id2)}
]]>
</style>
<radialGradient id="id0" gradientUnits="userSpaceOnUse" cx="9593.85" cy="-10300.9" r="10500" fx="9593.85" fy="-10300.9">
<stop offset="0" style="stop-color:#FEFEFE"/>
<stop offset="1" style="stop-color:#A9CF48"/>
</radialGradient>
<radialGradient id="id1" gradientUnits="userSpaceOnUse" cx="9593.85" cy="-8479.56" r="10500" fx="9593.85" fy="-8479.56">
<stop offset="0" style="stop-color:#FEFEFE"/>
<stop offset="1" style="stop-color:#A9CF47"/>
</radialGradient>
<radialGradient id="id2" gradientUnits="userSpaceOnUse" cx="9593.85" cy="-9336.04" r="10500" fx="9593.85" fy="-9336.04">
<stop offset="0" style="stop-color:#FEFEFE"/>
<stop offset="1" style="stop-color:#A9D048"/>
</radialGradient>
</defs>
<symbol id="Fm113-113-0" viewBox="1614 -22527 21000 13152">
<path class="fil0" d="M22614 -18376c-4943,-1048 -9932,-2209 -14431,-3078 -2289,-442 -4452,-793 -6569,-1072l0 9624 375 94c4502,654 8761,1621 13889,3007 2217,599 4524,528 6735,39l0 -8613z"/>
</symbol>
<symbol id="Fm119-119-0" viewBox="1614 -23737 21000 13088">
<path class="fil1" d="M22614 -19550c-5098,-1073 -10263,-2282 -14907,-3179 -2118,-409 -4128,-740 -6093,-1008l0 9669c4465,654 8699,1617 13789,2992 2376,642 4856,514 7211,-74l0 -8400z"/>
</symbol>
<symbol id="Fm107-107-0" viewBox="1614 -21838 21000 13251">
<path class="fil2" d="M22614 -17753c-4689,-1003 -9396,-2090 -13662,-2914 -2567,-496 -4976,-877 -7338,-1171l0 9530 1145 287c4502,654 8761,1621 13889,3007 1961,530 3992,535 5965,191l0 -8929z"/>
</symbol>
<g id="Camada_x0020_1">
<metadata id="CorelCorpID_0Corel-Layer"/>
<path class="fil3" d="M1481 609l0 446 105 0 0 -446 -105 0zm-189 -170l-108 0c-12,0 -10,11 -10,11 2,14 5,37 5,85 0,106 -13,258 -129,403l-8 10c0,0 -70,-488 -71,-497 0,0 0,-11 -10,-11l-109 0c-10,0 -10,11 -10,11 -3,56 -34,526 -377,602 73,8 161,-15 238,-62 95,-59 159,-146 180,-246 0,0 42,262 47,322l0 4 -3 2c-96,51 -205,79 -314,79 -270,0 -509,-160 -614,-404 62,287 318,496 617,496 349,0 557,-292 593,-500 0,0 47,303 48,313l143 0c-2,-13 -97,-595 -98,-604 0,0 0,-11 -10,-11zm-1209 255c0,-320 270,-580 601,-580 205,0 396,103 507,270 -81,-228 -307,-384 -560,-384 -327,0 -593,255 -593,568 0,86 21,170 60,247 -9,-39 -15,-80 -15,-120zm2506 -21c-38,-44 -91,-67 -155,-67 -65,0 -120,21 -164,63 -43,41 -65,96 -65,164 0,67 21,121 63,161 42,40 103,60 179,60 148,0 180,-102 192,-135l-38 -12c-34,62 -110,66 -155,63 -32,-2 -61,-13 -84,-29 -23,-17 -39,-41 -46,-78l-2 -14 332 0c-1,-73 -20,-132 -57,-175zm-267 113c-5,0 -5,-5 -5,-7 4,-26 14,-46 32,-64 20,-21 51,-33 84,-33 30,0 54,9 75,26 17,15 29,36 36,65 1,3 3,12 -5,12l-217 0zm601 -182c-126,0 -171,77 -185,113 0,1 -5,13 -5,13l42 14c0,0 27,-78 134,-73 108,4 95,93 95,107 -60,-18 -145,-16 -201,9 -70,32 -81,96 -78,143 3,70 65,119 145,123 72,4 104,-12 134,-41l-1 41 95 0 0 -117 0 -144 0 -25 0 -21c2,-53 -35,-143 -175,-143zm80 346c0,7 -2,12 -8,15 -18,9 -56,21 -103,18 -49,-4 -68,-39 -71,-54 -1,-6 -12,-71 51,-91 41,-13 93,-5 121,3 8,2 10,7 10,17l0 93zm-1424 -511l-87 0c-13,0 -11,13 -11,13 0,14 0,80 0,94l107 0 0 -95c0,0 1,-11 -10,-11zm534 0l-89 0c-9,0 -9,10 -9,10l0 183 -13 -7c-14,-7 -28,-12 -43,-15 -15,-3 -33,-4 -53,-4 -70,0 -127,20 -169,61 -41,40 -63,98 -63,169 0,63 18,116 53,158 35,41 86,62 153,62 96,0 134,-58 134,-58l0 56 108 0 0 -105c0,-118 0,-499 0,-499 0,0 0,-11 -9,-11zm-104 494c-10,9 -23,16 -39,22 -17,7 -37,10 -59,10 -36,0 -65,-12 -86,-36 -21,-24 -31,-59 -31,-106 0,-46 10,-80 29,-101 20,-22 50,-33 90,-33 21,0 41,3 59,10 16,6 28,12 37,20 3,3 6,8 6,15l0 183c0,7 -3,12 -6,15z"/>
<path class="fil3" d="M3163 365c-37,0 -65,28 -65,65 0,36 28,65 65,65 37,0 65,-28 65,-65 0,-36 -28,-65 -65,-65zm0 9c31,0 55,25 55,56 0,31 -23,56 -55,56 -31,0 -55,-25 -55,-56 0,-31 23,-56 55,-56zm-14 60l16 0 21 33 11 0 -22 -33c10,-2 19,-8 19,-21 0,-13 -7,-21 -24,-21l-29 0 0 75 9 0 0 -33zm0 -8l0 -26 17 0c9,0 18,2 18,13 0,13 -11,13 -22,13l-12 0z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -336,6 +336,7 @@ Climate Components
PID Controller, components/climate/pid, function.svg
IR Remote Climate, components/climate/ir_climate, air-conditioner-ir.svg
Tuya Climate, components/climate/tuya, tuya.png
Midea Air Conditioner, components/climate/midea_ac, midea.svg
Misc Components
---------------