Configure Aqara hub M1S Gateway Home Assistant via mi home app and homekit controller

Integrate Aqara Hub M1S to ha(mi home mode + homekit controller)

Aqara M1S-ZHWG15LM(lumi.gateway.acn01)  - Aqara Hub M1S CN 

in mi home app + cn server

Device info
lumi.gateway.acn01by lumi
Firmware version in mi home app: 4.0.3_001

 

完美解答,别问我折腾了多久。。。。

iphone手机上

先用小米或者绿米app添加(会调用HomeKit)

添加完后在小米app里面添加子设备(aqara那个app根本不能成功连接D1系列墙开)。

最后在苹果家庭里面删除网关(小米里面不删)然后直接去ha设置集成HomeKit控制器最后就是输入编码。而如果是长按或点按还原网关,虽然能在ha通知里看到,但是转圈圈再久也连接不上,因为本质上还原后未经过完整设置的M1s不能访问到家里的网络。

 

This can be done through the following steps:

  1. Get the mi home app
  2. sign in mi home app
  3. Add Aqara Hub M1s device in mi home app
  4. connect Aqara Hub M1s device to Wi-Fi Network
  5. Add all sub smart devices  with names and rooms…
  6.  
  7.  
  8. Restart home Assistant - wait till done
  9.  
  10. (So far not recognized by HA, after 45 min in the network)
  11. Unplug Aqara Hub M1s  wait 10 seconds and replug to power

 

HA shows the hub as Homekit controller

 

Add to HA with the provided code (on hub or box)

 

Everything works fine

 

  1. Pair devices to mi home app  -  Connect the gateway to your router
  2. download  Xiaomi Miot Auto Integration 
  3. unzip Xiaomi Miot Auto Integration 
  4. copy custom_components/xiaomi_miot folder to custom_components folder
  5. restart Home Assistant Core
  6. Go to the Home Assistant Core Dashboard
  7. Click the Add an Xiaomi Miot Auto Integration 

 

Connect to Gateway

The first thing you want to do is download the Mi Home App from Android and iOS stores and then connect the gateway to your WiFi router. Note that some mijia hub only WiFi 4 on 2.4Ghz is supported, so it’s important that your router supports the 2.4GHz band, otherwise it won’t connect.

Download the Xiaomi app https://play.google.com/store/apps/details?id=com.xiaomi.smarthome

Create an account

Add the M1S Gateway in the app (long hold button on M1S for 10 seconds to enter discovery mode  - reset  Network setting )

 

bbd0650f4955230e4b0aac24ade82d6c9ee04146_2_231x500.jpeg

The key is that you cannot connect with Mi Home until the voice prompt is says: “Ready to connect. Please open Mi Home app”

Power on and wait for 1 minute and let it finish booting.

Press the button 10 TIMES QUICKLY. The blinking should stop immediately. If doesn’t then repeat the 10 clicks faster.

You will hear a “Device resetting” prompt followed by LED blinking.

Now press the button TWICE QUICKLY. You should hear a beeping sound and the blinking should stop immediately again. The device will restart automatically. If don’t hear the beep, then start the process again from the first point.

If you hear the prompt “Ready to connect. Please open Mi Home app” then you are successfully switched to Mi Home mode. At this point it looks like it is ready connect, but it wasn’t for me.

Press and hold the button for 10 seconds, until you hear the connection prompt again.

Now you are ready to connect with Mi Home

 

 

discovery

 

Aqara-Hub-M1S-3967 mi home app by Homekit Controller

HomeKit Controller

Retrying setup: Timeout while waiting for connection to device 192.168.2.103:33844

 

Homekit Controller  Integration Auto discovered lost

HomeKit Controller
No unpaired devices could be found

step 1.delete homekit_controller-entity-map

path:/home/homeassistant20221103/.homeassistant/.storage/homekit_controller-entity-map

step 2.restart ha

step 3.unplugin and reboot Aqara Hub M1S

you can unplugin and reboot it,then Homekit Controller  Integration Auto discovered  auto discovered again.

 

Pair with a device via HomeKit Accessory Protocol
HomeKit Controller communicates with Aqara-Hub-M1S-3967 (Bridge) over the local area network using a secure encrypted connection without a separate HomeKit controller or iCloud. Enter your HomeKit pairing code (in the format XXX-XX-XXX) to use this accessory. This code is usually found on the device itself or in the packaging.

 

below code added by ha in /home/homeassistant20221103/.homeassistant/.storage

.storage/core.config_entries

 {
        "entry_id": "bb82b5cd14e7a358c7a9b898899d40e7",
        "version": 1,
        "domain": "homekit_controller",
        "title": "Aqara-Hub-M1S-3967",
        "data": {
          "AccessoryPairingID": "3D:B4:57:A5:63:BC",
          "AccessoryLTPK": "5c7fff5b1981f79fecf19688e9d93a00220c5f865136a32b2e4857abea9a31e2",
          "iOSPairingId": "5db2f5db-b482-47e8-ba31-92b90f456ee7",
          "iOSDeviceLTSK": "de4845f344cc47e2dcaf710058111313f61abc766e60c70d2b589582abcf1a4a",
          "iOSDeviceLTPK": "5d3015b10da5857e761a53982f0a0978bd0d33ceffa769c2c06c652695bc190f",
          "AccessoryIP": "192.168.2.103",
          "AccessoryPort": 44526,
          "Connection": "IP"
        },
        "options": {},
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "zeroconf",
        "unique_id": "3d:b4:57:a5:63:bc",
        "disabled_by": null
      }

 

homekit_controller-entity-map

object		{4}
version	:	1
minor_version	:	1
key	:	homekit_controller-entity-map
	data		{1}
	pairings		{2}
	E3:DF:D3:63:82:7B		{4}
	3D:B4:57:A5:63:BC		{4}
config_num	:	5
	accessories		[6]
broadcast_key	:	null
state_num	:	null

Comments


Comments are closed