Let Xiaoai also control Midea appliances

Original link: https://hin.cool/posts/homeassistant.html

foreword

Last year, before moving on 618, I bought a Hualing air conditioner on Goudong. Hualing is a sub-brand of Midea. Midea is doing the installation and after-sales. In addition to its high cost performance, I gave up the “Mijia integration” “concept.

However, as we all know, Midea has its own smart home “Meiju”, which cannot be directly connected to Midea’s devices in Mijia, and Hualing does not send remote controls, so I have used applets to control air conditioners for a long time.

This afternoon, I saw the article about Mijia’s control of Midea’s equipment again, so I started to toss about it.

toss way

At first, because of the openwrt soft router, I wanted to try the soft router as a “transit”, because the router is always online. But the 360 ​​T7 I had no choice but to buy has a small built-in storage, and it cannot be connected to an external usb or TF card, and cannot install plug-ins such as homeassistant, so I turned my thinking to my black group.

Maopanhei Synology does not support docker very well, but fortunately there is a Home Assistant package in the third-party community, so I installed it directly. By the way, Homebridge seems to have more tutorials on letting ios devices control Mijia products, so I gave up after tossing for a while.

toss step

The whole tossing process is actually relatively simple, but because I am not familiar with this aspect, I spent a lot of time on insignificant things.

Install and register homeassistant

First add the package source of “I’m not a mine god” in the package center of Synology, and then you can directly search for homeassistant:

Add third-party package source in Synology Package Center

Clicking “Install Kit” will prompt you to install python 3.11 first, so install them one by one according to the requirements.

After the installation is complete, you can open homeassistant, enter the account number and password to register, and I use “automatic detection” during initialization to locate me in Germany, so I set it manually (there is no screenshot here, but the installation interface is very simple to operate).

install hacs

Click “Configuration” on the left column of the homeassistant interface, then click “Devices and Services”, and click “Add Integration” in the lower right corner. Since Midea Mercure cannot be directly added here, we need to add HACS first to save the country:

Add hacs integration

Then you may need to restart homeassistant, click “Configuration”, then click the “magnifying glass” icon in the upper right corner, enter restart, and click again.

Install Midea AC LAN

After restarting, HACS appears on the left column, click on it, and then click “Browse and Download Repository” in the lower right corner, enter Midea in the pop-up interface, click Midea AC LAN, and click the “Download” button in the lower right corner on the details page Install it (probably because I have installed it, so there is no such item in the result. In addition, from the description of several other items, it seems that Midea equipment can also be added):

Install Midea AC LAN

After the installation is complete, restart homeassistant again.

add appliances

After the restart is complete, click “Configuration” on the left column, select “Device and Service”, click the gear icon in the upper right corner of Midea AC LAN, click “Add Item”, the adding method can be auto or by ip , select to list (Since I have already added an air conditioner, the natural gas water heater is shown here), click “Submit”:

Add support for Midea appliances

The following content can be kept as default, or you can modify the name yourself, then click Submit, and then select the area where the appliance is located (kitchen, bedroom, etc.):

Appliance Details

Configure sensors and controls

After the addition is complete, the newly added device will appear in the “Integration Item” on the page. Click “Options” on the right side of the device to add sensors and controls. From my understanding, after selecting the specific item of the sensor, the content obtained by the sensor can be displayed on the homeassistant page, such as temperature; after selecting the specific item of control, you can click to control it in the homeassistant. These two items can be selected as needed, or all of them can be selected.

After the completion, you can click “1 device” to view the information of the current electrical sensor and control the electrical appliance:

Midea air conditioner details

Midea water heater details

install baffa

At this time, we cannot directly control the devices added above through Xiaoai, and need to use a third-party platform to realize it.

Just like installing Midea AC LAN before, add bemfa in HACS, and the specific steps will not be repeated here.

Then register an account on Bajj.com , log in, copy the private key in the upper left corner, click bemfa in homeassistant, click “Add Entry”, and paste the private key.

Then click “Options”, select “Synchronization Entity”, and select the device you want to synchronize. In my test, it seems that you only need to add power , and you don’t need to add all the entries:

Sync entity to Baffa

Click “Next” to customize the device name.

Sync device to Mijia

Open the Mijia app on your mobile phone, click “My”, select “Connect to other platforms”, click “Add”, select “Bafa”, log in your Bafa account password, and then click “Sync Device” ( Note: There is a reminder on the interface that devices under other platforms will not generate control cards on the Mijia device page, and can only be controlled by Xiao Ai’s voice).

Summarize

The above is all the process. In the actual tossing process, I took some detours. For example, I thought that I had to manually upload the midea_ac_lan folder to add this integration, which caused me to obtain the root authority of Synology, and it took a lot of time to use winSCP to access the custom path. In fact, There is already integration in hacs.

With voice control, there is no need to worry about different brands of electrical appliances needing their own smart home app to control, and there is no need to turn on the phone every time to operate. I used to think that if Midea could also be connected to Mijia, then it would be just a matter of adjusting the water temperature when I take a bath, and this beautiful wish has come true today.

This article is transferred from: https://hin.cool/posts/homeassistant.html
This site is only for collection, and the copyright belongs to the original author.