mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-04-17 20:36:21 +02:00
Midea support v2 (#1356)
This commit is contained in:
parent
1d253f135e
commit
603ab7b531
299
components/climate/midea.rst
Normal file
299
components/climate/midea.rst
Normal file
@ -0,0 +1,299 @@
|
||||
Midea Air Conditioner
|
||||
=====================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up a Midea climate device
|
||||
:image: air-conditioner.png
|
||||
|
||||
The ``midea`` component creates a Midea air conditioner climate device.
|
||||
|
||||
.. 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
|
||||
|
||||
Control is possible with a custom dongle. Example of hardware implementation is `IoT Uni Dongle <https://github.com/dudanov/iot-uni-dongle>`_.
|
||||
|
||||
.. 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 # hardware dependant
|
||||
rx_pin: 3 # hardware dependant
|
||||
baud_rate: 9600
|
||||
|
||||
# Main settings
|
||||
climate:
|
||||
- platform: midea
|
||||
name: Midea Climate # Use a unique name.
|
||||
transmitter_id: # Optional. Add this option to use IR transmitter.
|
||||
period: 1s # Optional
|
||||
timeout: 2s # Optional
|
||||
num_attempts: 3 # Optional
|
||||
autoconf: true # Autoconfigure most options.
|
||||
beeper: true # Beep on commands.
|
||||
visual: # Optional. Example of visual settings override.
|
||||
min_temperature: 17 °C # min: 17
|
||||
max_temperature: 30 °C # max: 30
|
||||
temperature_step: 0.5 °C # min: 0.5
|
||||
supported_modes: # All capabilities in this section detected by autoconf.
|
||||
- FAN_ONLY # This capability is always used.
|
||||
- HEAT_COOL
|
||||
- COOL
|
||||
- HEAT
|
||||
- DRY
|
||||
custom_fan_modes:
|
||||
- SILENT
|
||||
- TURBO
|
||||
supported_presets: # All capabilities in this section detected by autoconf.
|
||||
- ECO
|
||||
- BOOST
|
||||
- SLEEP # This capability is always used.
|
||||
custom_presets: # All capabilities in this section detected by autoconf.
|
||||
- FREEZE_PROTECTION
|
||||
supported_swing_modes:
|
||||
- VERTICAL # This capability is always used.
|
||||
- HORIZONTAL
|
||||
- BOTH
|
||||
outdoor_temperature: # Optional. Outdoor temperature sensor (may display incorrect values after long inactivity).
|
||||
name: Temp
|
||||
power_usage: # Optional. Power usage sensor (only for devices that support this feature).
|
||||
name: Power
|
||||
humidity_setpoint: # Optional. Indoor humidity sensor (only for devices that support this feature).
|
||||
name: Humidity
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **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.
|
||||
- **name** (**Required**, string): The name of the climate device.
|
||||
- **transmitter_id** (*Optional*, :ref:`config-id`): Set if you use :doc:`../remote_transmitter` component for IR commands transmit.
|
||||
- **period** (*Optional*, :ref:`time <config-time>`): Minimal period between requests to the appliance. Defaults to ``1s``.
|
||||
- **timeout** (*Optional*, :ref:`time <config-time>`): Request response timeout until next request attempt. Defaults to ``2s``.
|
||||
- **num_attempts** (*Optional*, integer 1-5): Number of request attempts. Defaults to ``3``.
|
||||
- **autoconf** (*Optional*, boolean): Get capabilities automatically. Allows you not to manually define most of the capabilities of the appliance.
|
||||
Defaults to ``True``.
|
||||
- **beeper** (*Optional*, boolean): Beeper feedback on command. Defaults to ``False``.
|
||||
- **supported_modes** (*Optional*, list): List of supported modes. Possible values are: ``HEAT_COOL``, ``COOL``, ``HEAT``, ``DRY``, ``FAN_ONLY``.
|
||||
- **custom_fan_modes** (*Optional*, list): List of supported custom fan modes. Possible values are: ``SILENT``, ``TURBO``.
|
||||
- **supported_presets** (*Optional*, list): List of supported presets. Possible values are: ``ECO``, ``BOOST``, ``SLEEP``.
|
||||
- **custom_presets** (*Optional*, list): List of supported custom presets. Possible values are: ``FREEZE_PROTECTION``.
|
||||
- **supported_swing_modes** (*Optional*, list): List of supported swing modes. Possible values are: ``VERTICAL``, ``HORIZONTAL``, ``BOTH``.
|
||||
- **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>`.
|
||||
- All other options from :ref:`Climate <config-climate>`.
|
||||
|
||||
Automations
|
||||
-----------
|
||||
|
||||
.. _midea_ac-power_on_action:
|
||||
|
||||
``midea_ac.power_on`` Action
|
||||
******************************
|
||||
|
||||
This action turn on power. The mode and preset will be restored to the last state before turned off.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
then:
|
||||
- midea_ac.power_on:
|
||||
|
||||
.. _midea_ac-power_off_action:
|
||||
|
||||
``midea_ac.power_off`` Action
|
||||
******************************
|
||||
|
||||
This action turn off power.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
then:
|
||||
- midea_ac.power_off:
|
||||
|
||||
|
||||
.. _midea_ac-follow_me_action:
|
||||
|
||||
``midea_ac.follow_me`` Action
|
||||
*****************************
|
||||
|
||||
This action transmit IR FollowMe command telling the air conditioner a more accurate
|
||||
room temperature value to be used instead of the internal indoor unit sensor.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
then:
|
||||
- midea_ac.follow_me:
|
||||
temperature: !lambda "return x;"
|
||||
beeper: false
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **temperature** (**Required**, float, :ref:`templatable <config-templatable>`): Set the
|
||||
value of a internal temperature sensor.
|
||||
- **beeper** (*Optional*, bool, :ref:`templatable <config-templatable>`): set beep on update.
|
||||
Defaults to ``False``
|
||||
|
||||
|
||||
.. _midea_ac-display_toggle_action:
|
||||
|
||||
``midea_ac.display_toggle`` Action
|
||||
**********************************
|
||||
|
||||
This action toggle ac screen. Works via UART if supported or :doc:`../remote_transmitter`.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
then:
|
||||
- midea_ac.display_toggle:
|
||||
|
||||
|
||||
.. _midea_ac-swing_step_action:
|
||||
|
||||
``midea_ac.swing_step`` Action
|
||||
******************************
|
||||
|
||||
This action adjust the louver by one step. :doc:`../remote_transmitter` required.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
then:
|
||||
- midea_ac.swing_step:
|
||||
|
||||
|
||||
.. _midea_ac-beeper_on_action:
|
||||
|
||||
``midea_ac.beeper_on`` Action
|
||||
******************************
|
||||
|
||||
This action turn on beeper feedback.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
then:
|
||||
- midea_ac.beeper_on:
|
||||
|
||||
.. _midea_ac-beeper_off_action:
|
||||
|
||||
``midea_ac.beeper_off`` Action
|
||||
******************************
|
||||
|
||||
This action turn off beeper feedback.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
then:
|
||||
- midea_ac.beeper_off:
|
||||
|
||||
|
||||
Additional control options using IR commands
|
||||
--------------------------------------------
|
||||
|
||||
It is possible to use the FollowMe function and some other features available only through IR commands.
|
||||
Below is an example of how to send FollowMe commands with the values of your sensor using the :doc:`../remote_transmitter`
|
||||
component, as well as control the light of the LED display.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
|
||||
remote_transmitter:
|
||||
pin: GPIO13 # For iot-uni-stick.
|
||||
carrier_duty_percent: 100% # 50% for IR LED, 100% for direct connect to TSOP IR receiver output.
|
||||
|
||||
sensor:
|
||||
- platform: homeassistant
|
||||
entity_id: sensor.room_sensor # Sensor from HASS
|
||||
internal: true
|
||||
filters:
|
||||
- throttle: 10s
|
||||
- heartbeat: 2min # Maximum interval between updates.
|
||||
- debounce: 1s
|
||||
on_value:
|
||||
midea_ac.follow_me:
|
||||
temperature: !lambda "return x;"
|
||||
beeper: false # Optional. Beep on update.
|
||||
|
||||
# template momentary switches for sending display control command and swing step actions
|
||||
switch:
|
||||
- platform: template
|
||||
name: Display Toggle
|
||||
icon: mdi:theme-light-dark
|
||||
turn_on_action:
|
||||
midea_ac.display_toggle:
|
||||
- platform: template
|
||||
name: Swing Step
|
||||
icon: mdi:tailwind
|
||||
turn_on_action:
|
||||
midea_ac.swing_step:
|
||||
|
||||
|
||||
Example of Beeper Control Using a Switch
|
||||
----------------------------------------
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
name: Beeper
|
||||
icon: mdi:volume-source
|
||||
optimistic: true
|
||||
turn_on_action:
|
||||
midea_ac.beeper_on:
|
||||
turn_off_action:
|
||||
midea_ac.beeper_off:
|
||||
|
||||
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/midea-uart>`_
|
||||
|
||||
Special thanks to the project `IRremoteESP8266 <https://github.com/crankyoldgit/IRremoteESP8266>`_ for describing the IR protocol.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/climate/index`
|
||||
- :apiref:`climate/midea_ac.h`
|
||||
- :ghedit:`Edit`
|
@ -1,128 +0,0 @@
|
||||
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
|
||||
custom_fan_modes:
|
||||
- SILENT
|
||||
- TURBO
|
||||
preset_eco: true
|
||||
preset_sleep: true
|
||||
preset_boost: true
|
||||
custom_presets:
|
||||
- FREEZE_PROTECTION
|
||||
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``.
|
||||
- **custom_fan_modes** (*Optional*, list): List of supported custom fan modes. Possible values are: SILENT, TURBO.
|
||||
- **preset_eco** (*Optional*, boolean): ECO preset support. Defaults to ``false``.
|
||||
- **preset_sleep** (*Optional*, boolean): SLEEP preset support. Defaults to ``false``.
|
||||
- **preset_boost** (*Optional*, boolean): BOOST preset support. Defaults to ``false``.
|
||||
- **custom_presets** (*Optional*, list): List of supported custom presets. Possible values are: FREEZE_PROTECTION.
|
||||
- **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`
|
@ -31,6 +31,7 @@ Configuration variables:
|
||||
Set to ``all`` to dump all available codecs:
|
||||
|
||||
- **lg**: Decode and dump LG infrared codes.
|
||||
- **midea**: Decode and dump Midea infrared codes.
|
||||
- **nec**: Decode and dump NEC infrared codes.
|
||||
- **panasonic**: Decode and dump Panasonic infrared codes.
|
||||
- **pioneer**: Decode and dump Pioneer infrared codes.
|
||||
@ -64,6 +65,9 @@ Automations:
|
||||
- **on_lg** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
|
||||
LG remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::LGData`
|
||||
is passed to the automation for use in lambdas.
|
||||
- **on_midea** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
|
||||
Midea remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::MideaData`
|
||||
is passed to the automation for use in lambdas.
|
||||
- **on_nec** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
|
||||
NEC remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::NECData`
|
||||
is passed to the automation for use in lambdas.
|
||||
@ -141,6 +145,11 @@ Remote code selection (exactly one of these has to be included):
|
||||
- **data** (**Required**, int): The LG code to trigger on, see dumper output for more info.
|
||||
- **nbits** (*Optional*, int): The number of bits of the remote code. Defaults to ``28``.
|
||||
|
||||
- **midea**: Trigger on a Midea remote code with the given code.
|
||||
|
||||
- **code** (**Required**, 5-bytes list): The code to listen for, see :ref:`remote_transmitter-transmit_midea`
|
||||
for more info. Usually you only need to copy first 5 bytes directly from the dumper output.
|
||||
|
||||
- **nec**: Trigger on a decoded NEC remote code with the given data.
|
||||
|
||||
- **address** (**Required**, int): The address to trigger on, see dumper output for more info.
|
||||
|
@ -139,6 +139,24 @@ Configuration variables:
|
||||
- **nbits** (*Optional*, int): The number of bits to send. Defaults to ``28``.
|
||||
- All other options from :ref:`remote_transmitter-transmit_action`.
|
||||
|
||||
.. _remote_transmitter-transmit_midea:
|
||||
|
||||
``remote_transmitter.transmit_midea`` Action
|
||||
********************************************
|
||||
|
||||
This :ref:`action <config-action>` sends a 40-bit Midea code to a remote transmitter. 8-bits of checksum added automatically.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
- remote_transmitter.transmit_midea:
|
||||
code: [0xA2, 0x08, 0xFF, 0xFF, 0xFF]
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **code** (**Required**, list): The 40-bit Midea code to send as a list of hex or integers.
|
||||
- All other options from :ref:`remote_transmitter-transmit_action`.
|
||||
|
||||
``remote_transmitter.transmit_nec`` Action
|
||||
******************************************
|
||||
|
||||
|
@ -515,7 +515,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
|
||||
Midea, components/climate/midea, midea.svg
|
||||
Anova Cooker, components/climate/anova, anova.png
|
||||
|
||||
Number Components
|
||||
|
Loading…
Reference in New Issue
Block a user