Skip to content

Commit

Permalink
sync with master
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwentao committed May 17, 2024
1 parent ed21124 commit ee56ad1
Show file tree
Hide file tree
Showing 29 changed files with 79 additions and 235 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MIT License
MIT License

Copyright (c) 2021 George Zhao

Expand Down
76 changes: 20 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Midea AC LAN

[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg)](https://github.com/hacs/integration)
[![Donate](https://img.shields.io/badge/donate-BuyMeCoffee-yellow.svg)](https://www.buymeacoffee.com/georgezhao2010)
[![Stable](https://img.shields.io/github/v/release/wuwentao/midea_ac_lan)](https://github.com/wuwentao/midea_ac_lan/releases/latest)
[![Super-Linter](https://github.com/wuwentao/midea_ac_lan/actions/workflows/linter.yml/badge.svg)](https://github.com/marketplace/actions/super-linter)

> :warning: **This is a fork of midea_ac_lan done by Georgezhao**
> :warning: **This is a fork of Midea_ac_lan done by Georgezhao **: As the project is in a vegetative state we have done a fork and merged some pending fixes.
I'm trying to get in touch with the maintainer at the moment to find a solution, and at the same time we're looking for people available to maintain the project, which is actively used by the community. please contact me if you can help !

English | [简体中文](README_hans.md)

Expand All @@ -23,18 +22,13 @@ Thanks also to [@NeoAcheron](https://github.com/NeoAcheron/midea-ac-py).

***❗Note: Home Assistant 2023.1 or higher required for this integration***

## Supported brands
# Supported brands

![ariston](brands/ariston.png) ![beverly](brands/beverly.png) ![bugu](brands/bugu.png) \
![carrier](brands/carrier.png) ![colmo](brands/colmo.png) ![comfee](brands/comfee.png) \
![electrolux](brands/electrolux.png) ![invertor](brands/invertor.png) ![littleswan](brands/littleswan.png) \
![midea](brands/midea.png) ![netsu](brands/netsu.png) ![ProBreeze](brands/probreeze.png) \
![rotenso](brands/rotenso.png) ![toshiba](brands/toshiba.png) ![vandelo](brands/vandelo.png) \
![wahin](brands/wahin.png)
![ariston](brands/ariston.png) ![beverly](brands/beverly.png) ![bugu](brands/bugu.png) ![carrier](brands/carrier.png) ![colmo](brands/colmo.png) ![comfee](brands/comfee.png) ![electrolux](brands/electrolux.png) ![invertor](brands/invertor.png) ![littleswan](brands/littleswan.png) ![midea](brands/midea.png) ![netsu](brands/netsu.png) ![ProBreeze](brands/probreeze.png) ![rotenso](brands/rotenso.png) ![toshiba](brands/toshiba.png) ![vandelo](brands/vandelo.png) ![wahin](brands/wahin.png)

And more.

## Supported appliances
# Supported appliances

| Type | Name | Documents |
|------|----------------------------|--------------------|
Expand Down Expand Up @@ -73,28 +67,12 @@ And more.
| FC | Air Purifier | [FC.md](doc/FC.md) |
| FD | Humidifier | [FD.md](doc/FD.md) |

## Installation

**Search `Midea AC LAN` in HACS not available now, it will be ready later**

Please use manual install as below:

Option 1:

1. make sure you have installed HACS to Home Assistant [HACS install guide](https://hacs.xyz/docs/setup/download)
2. open HACS, click [Custom repositories], Repository input: `https://github.com/wuwentao/midea_ac_lan`, Category select [Integration]
3. **Restart Home Assistant**.
# Installation
Search 'Midea AC LAN' in HACS and install, or copy all files in `custom_components/midea_ac_lan` from [Latest Release](https://github.com/georgezhao2010/midea_ac_lan/releases/latest) to your `/custom_components/midea_ac_lan` in Home Assistant manually.

Option 2:

1. Download `midea_ac_lan.zip` from [Latest Release](https://github.com/wuwentao/midea_ac_lan/releases/latest)
2. copy `midea_ac_lan.zip` to `/custom_components/midea_ac_lan` in Home Assistant.
3. **Restart Home Assistant**.

Once it done, open `[Settings]`, `[Device & services]`, `[Integrations]`, `[Midea AC Lan]`, do init config and add all your devices.

## Add device
Restart Home Assistant.

# Add device
***❗Note: First, set a static IP address for your appliance in the router, in case the IP address of the appliance changes after set-up.***

After installation, search and add component Midea AC LAN in Home Assistant integrations page.
Expand All @@ -105,18 +83,15 @@ Or click [![Configuration](https://my.home-assistant.io/badges/config_flow_start

After the account is configured, Click 'ADD DEVICE' once more to add new device. You could repeat the above action to add multiple devices.

### Discover automatically

## Discover automatically
Using this option, the component could auto-discover and list Midea M-Smart appliances in network or specified IP address, select one and add it in.

You can also use an IP address to search within a specified network, such as `192.168.1.255`.

***❗Note: Discovery automatically requires your appliances and your Home Assistant must be in the same sub-network. Otherwise, devices may not be auto-discovered. Check this by yourself.***

### Configure manually

## Configure manually
If you already know following information, you could add the appliance manually.

- Appliance code
- Appliance type (one of [Supported appliances](README.md#supported-appliances))
- IP address
Expand All @@ -125,63 +100,52 @@ If you already know following information, you could add the appliance manually.
- Token
- Key

### List all appliances only

## List all appliances only
Using this option, you can list all discoverable Midea M-Smart devices on the network, along with their IDs, types, SNs, and other information.

***❗Note: For certain reasons, not all supported devices may be listed here.***

## Configure
# Configure

Configure can be found in `Settings -> Devices & Services -> Midea AC LAN -> Devices -> CONFIGURE`.
You can re-set the IP address when device IP changed.
You can also add extra sensor and switch entities or customize your own device.

### IP address

## IP address
Set the IP address of device. You can reset this when your device IP is changed.

### Refresh interval

## Refresh interval
Set the interval for actively refreshing the status of a single device (the unit is second) (30 by default and 0 means not refresh actively)
Mostly the status update of Midea devices relies on the active information notification of the device, \
in which condition the status update in HA still works normally even if the refresh interval is set to be "0". \
This component will also actively query the device status at regular intervals, and the default time is 30 seconds. \
Some devices do not have active information notifications when their status changed, so synchronization with the status in HA will be slower. \
If you are very concerned about the synchronization speed of the status, you can try to set a shorter status refresh interval.
Mostly the status update of Midea devices relies on the active information notification of the device, in which condition the status update in HA still works normally even if the refresh interval is set to be “0”. This component will also actively query the device status at regular intervals, and the default time is 30 seconds. Some devices do not have active information notifications when their status changed, so synchronization with the status in HA will be slower. If you are very concerned about the synchronization speed of the status, you can try to set a shorter status refresh interval.

***❗Note: shorter refresh interval may mean more power consumption***

### Extra sensor and switch entities

## Extra sensor and switch entities
After configuration, one of few main entity (e.g. climate entity) may be generated . If you want to make the attributes to extra sensor and switch entities, click CONFIGURE in Midea AC LAN integration card to choose (if your devices supported).

### Customize

## Customize
Some types of device have their own configuration items, if your device does not work properly, you may need to customize it. Refer to the device documentation for specific information.

The format of customizations must be JSON.

If multiple customization items need to be configured, the settings must comply with the JSON format.

Example

```json
{"refresh_interval": 15, "fan_speed": 100}
```

## Debug
# Debug

Turn on the debug log out,config in configuration.yaml

```yaml
logger:
default: warn
logs:
custom_components.midea_ac_lan: debug
```
## Support my works
# Support my works
If you like this integration, why do not you support my works by buying me a coffee?
Expand Down
68 changes: 17 additions & 51 deletions README_hans.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Midea AC LAN

[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg)](https://github.com/hacs/integration)
[![Donate](https://img.shields.io/badge/donate-BuyMeCoffee-yellow.svg)](https://www.buymeacoffee.com/georgezhao2010)
[![Stable](https://img.shields.io/github/v/release/wuwentao/midea_ac_lan)](https://github.com/wuwentao/midea_ac_lan/releases/latest)
[![Super-Linter](https://github.com/wuwentao/midea_ac_lan/actions/workflows/linter.yml/badge.svg)](https://github.com/marketplace/actions/super-linter)

[English](README.md) | 简体中文

Expand All @@ -21,17 +19,13 @@

***❗注意: 本集成需要Home Assistant 2023.1或更高版本***

## 已支持的品牌
# 已支持的品牌

![beverly](brands/beverly.png) ![bugu](brands/bugu.png) ![carrier](brands/carrier.png) \
![colmo](brands/colmo.png) ![comfee](brands/comfee.png) ![electrolux](brands/electrolux.png) \
![invertor](brands/invertor.png) ![littleswan](brands/littleswan.png) ![midea](brands/midea.png) \
![netsu](brands/netsu.png) ![ProBreeze](brands/probreeze.png) ![rotenso](brands/rotenso.png) \
![toshiba](brands/toshiba.png) ![vandelo](brands/vandelo.png) ![wahin](brands/wahin.png)
![beverly](brands/beverly.png) ![bugu](brands/bugu.png) ![carrier](brands/carrier.png) ![colmo](brands/colmo.png) ![comfee](brands/comfee.png) ![electrolux](brands/electrolux.png) ![invertor](brands/invertor.png) ![littleswan](brands/littleswan.png) ![midea](brands/midea.png) ![netsu](brands/netsu.png) ![ProBreeze](brands/probreeze.png) ![rotenso](brands/rotenso.png) ![toshiba](brands/toshiba.png) ![vandelo](brands/vandelo.png) ![wahin](brands/wahin.png)

以及更多。

## 已支持的设备
# 已支持的设备

| 类型 | 名称 | 文档 |
|----|-------------------|------------------------------|
Expand Down Expand Up @@ -70,28 +64,12 @@
| FC | 空气净化器 | [FC_hans.md](doc/FC_hans.md) |
| FD | 加湿器 | [FD_hans.md](doc/FD_hans.md) |

## 安装

**在HACS中搜索`Midea AC LAN`并安装的方式当前还不可用**,请耐心等待HACS审核和处理流程。

请先使用以下二种方式手工安装:

方式1:

1. 确保`Home Assistant`中已安装HACS [HACS install docs](https://hacs.xyz/docs/setup/download)
2. 打开`HACS`, 点击`[Custom repositories]`, `Repository` 输入: `https://github.com/wuwentao/midea_ac_lan`, `Category` 选择 `[Integration]`
3. **重启Home Assistant**.
# 安装
在HACS中搜索'Midea AC LAN'并安装, 或者从[Latest release](https://github.com/georgezhao2010/midea_ac_lan/releases/latest)下载最新的Release版本, 将其中的`custom_components/midea_ac_lan`放到你的Home Assistant的`custom_components/midea_ac_lan`中。

方式2:

1.[Latest Release](https://github.com/wuwentao/midea_ac_lan/releases/latest) 下载 `midea_ac_lan.zip`
2. 复制 `midea_ac_lan.zip``/custom_components/midea_ac_lan`.
3. **重启 Home Assistant**.

重启完成后, 打开 `[Settings]`, `[Device & services]`, `[Integrations]`, `[Midea AC Lan]`, 进行初始化设置并添加所有设备.

## 添加设备
重启Home Assistant

# 添加设备
***❗注意: 首先, 在路由器上为你的设备设置一个静态IP地址, 以防设置后设备的IP地址发生改变。***

安装之后, 在Home Assistant的集成界面搜索添加集成Midea AC LAN, 如果需要添加多台设备, 多次添加本集成并执行自动配置即可。
Expand All @@ -102,18 +80,15 @@

完成美的账户配置之后, 点击'添加设备'进行设备添加。你可以多次重复操作以添加多台设备。

### Discover automatically / 自动搜索

## Discover automatically / 自动搜索
使用此选项, 组件会列出网络上或者指定IP地址上的设备, 选择一个并进行添加。

你也可以使用IP地址在指定网络中搜索, 比如`192.168.1.255`

***❗注意: 自动配置要求设备必须与HA在同一网段, 否则可能搜索不到设备, 请自行确认这点***

### Configure manually / 手动配置

## Configure manually / 手动配置
如果之前你已经通过其它集成手工配置过设备, 并知道以下信息, 也可以进行手动配置

- 设备ID
- 设备类型 ([已支持的设备](README_hans.md#%E5%B7%B2%E6%94%AF%E6%8C%81%E7%9A%84%E8%AE%BE%E5%A4%87)之一)
- IP地址
Expand All @@ -122,60 +97,51 @@
- Token
- Key

### List all appliances only / 仅列出所有设备
## List all appliances only / 仅列出所有设备

使用此选择, 可以列出网络中所有可以被搜索到的美的M-Smart设备, 以及他们的ID, 类型, SN等信息

***❗注意: 出于某些原因, 可能不是所有受支持的设备都能于此列出***

## 配置

# 配置
集成配置位于`配置 -> 设备与服务 -> Midea AC LAN -> 设备 -> 选项`
在配置中, 你可以在设备IP改变后重新指定IP地址, 也可以增加扩展的传感器或开关等实体或者自定义你的设备

### IP地址

## IP地址
指定设备的IP地址。当你的设备IP地址变动后, 可以重新设定它

### 刷新间隔

## 刷新间隔
指定单台设备的主动状态刷新间隔 (单位为秒) (默认值为30, 设0代表不进行主动刷新)

大部分的美的设备在自身状态改变时会主动发送通知, 在这种情况下, 即使将改值设为0, 也不会影响HA中的设备状态更新。组件默认每间隔30秒会进行主动刷新。部分设备没有状态改变时主动通知的机制, 状态同步就会表现得很慢, 这种情况下可以尝试更短的主动状态更新间隔。

***❗注意: 更小的更新间隔意味着更多的能源消耗***

## 额外的传感器及开关实体

配置完成后, 可能会默认生成一个或几个主要实体(比如climate实体)。如果需要其它属性生成为扩展的传感器及开关实体, 在Midea AC LAN集成卡片上点击'选项', 并选择要生成的传感器及开关(如果你的设备支持该属性)。

### 自定义

## 自定义
某些类型的设备有它们自己的自定义项, 可以通过自定义项定制设备的特点。如果你的设备无法正常工作, 也许你需要自定义它。请参阅设备文档以获取具体信息。

自定义的格式必须是JSON。

如果要设置多个自定义项, 请注意遵循JSON的格式要求

示例

```json
{"refresh_interval": 15, "fan_speed": 100}
```

## 调试

# 调试
要打开调试日志输出, 在configuration.yaml中做如下配置

```yaml
logger:
default: warn
logs:
custom_components.midea_ac_lan: debug
```
## 支持我的工作
# 支持我的工作
如果喜欢这个集成, 可以使用支付宝或者微信支付赞助我来支持我的工作。
![alipay](doc/images/alipay.png) ![wechatpay](doc/images/wechatpay.png)
![alipay](doc/images/alipay.png) ![wechatpay](doc/images/wechatpay.png)
8 changes: 1 addition & 7 deletions doc/AC.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Air Conditioner

## Features

- Supports target temperature
- Supports run mode
- Supports fan mode
Expand All @@ -10,7 +8,6 @@
- Supports build-in fresh air system

### Supported Run-Modes

- Comfort Mode
- ECO Mode
- Boost Mode
Expand All @@ -34,9 +31,7 @@
```

## Entities

### Default entity

| EntityID | Class | Description |
|----------------------------|---------|----------------|
| climate.{DEVICEID}_climate | climate | Climate entity |
Expand Down Expand Up @@ -94,7 +89,6 @@ Set the attribute of appliance. Service data:
| value | Range 1 to 100 or "auto" |

Example

```yaml
service: midea_ac_lan.set_attribute
data:
Expand All @@ -109,4 +103,4 @@ data:
device_id: XXXXXXXXXXXX
attribute: fan_speed
value: auto
```
```
Loading

0 comments on commit ee56ad1

Please sign in to comment.