Skip to content

Commit

Permalink
Update README.md and add Aqara Gateway M2 old EU/Global
Browse files Browse the repository at this point in the history
  • Loading branch information
niceboy committed Sep 14, 2023
1 parent f9dc8c2 commit 699da8c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<a href="https://www.buymeacoffee.com/niceboygithub" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>

# Aqara Gateway/Hub (G2H, M1S CN, P3 CN, M2 CN, H1 CN, E1 CN, G3 CN, G2H Pro, M2 2022) integration for Home Assistant
# Aqara Gateway/Hub (G2H, M1S CN, P3 CN, M2 CN, H1 CN, E1 CN, G3 CN, G2H Pro, M2 2022, M2 old EU/Global) integration for Home Assistant

Control Zigbee devices from Home Assistant with **Aqara Gateway (KTBL12LM, ZHWG15LM, ZHWG12LM, ZNSXJ12LM, ZNSXJ12LM, ZNSXJ13LM, ZNSXJ15LM, ZHWG19LM)**.
Gateway support **Zigbee 3**.
Expand All @@ -27,14 +27,14 @@ Or Download and copy `custom_components/aqara_gateway` folder to `custom_compone

1. [⚙️ Configuration](https://my.home-assistant.io/redirect/config) > [🧩 Integrations](https://my.home-assistant.io/redirect/integrations) > [➕ Add Integration](https://my.home-assistant.io/redirect/config_flow_start?domain=aqara_gateway) > 🔍 Search `Aqara Gateway`

Or click (HA v2021.3.0+): [![add](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start?domain=aqara_gateway)
1. If the integration didn't show up in the list please REFRESH the page
2. If the integration is still not in the list, you need to clear the browser cache.
2. Enter Gateway IP address.
3. If you applied a password of telnet in gateway, please enter the password. Otherwise, ignore this field.
4. Enter the xiaomi token of gateway if it is the first time to add integration. Otherwise, ignore this field.
5. Click Send button, then wait this integration is configured completely.
6. Done
Or click (HA v2021.3.0+): [![add](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start?domain=aqara_gateway)
1. If the integration didn't show up in the list please REFRESH the page
2. If the integration is still not in the list, you need to clear the browser cache.
3. Enter Gateway IP address.
4. If you applied a password of telnet in gateway, please enter the password. Otherwise, ignore this field.
5. Enter the xiaomi token of gateway if it is the first time to add integration. Otherwise, ignore this field.
6. Click Send button, then wait this integration is configured completely.
7. Done


[More detail instructions](https://gist.github.com/InsaneWookie/1221cd6267745ea3c16f6a2a83ba3a44) from [@InsaneWookie](https://gist.github.com/InsaneWookie)
Expand All @@ -48,7 +48,7 @@ You can use [custom open telnet command](https://gist.github.com/zvldz/1bd6b2153

After telnet to gateway via putty, there are two methods (Flash or Not) to enable telnet and public mqtt.

## Not Flash modified firmware method (NOT for G2H, E1 hub, G3)
## Not Flash modified firmware method (NOT for G2H, E1 hub, G3, G2H Pro)

```shell
mkdir /data/bin
Expand All @@ -73,7 +73,7 @@ wget -O /tmp/curl "http://master.dl.sourceforge.net/project/aqarahub/binutils/cu

```

## Not Flash modified firmware method (for G2H)
## Not Flash modified firmware method (for G2H Pro)

```shell
mkdir /data/bin
Expand All @@ -83,7 +83,7 @@ wget -O /tmp/curl "http://master.dl.sourceforge.net/project/aqarahub/binutils/cu

```

## Not Flash modified firmware method (for E1 hub, G3, G2H Pro, M2 2022)
## Not Flash modified firmware method (for E1 hub, G3, M2 2022)

```shell
mkdir /data/bin
Expand Down Expand Up @@ -136,9 +136,12 @@ If there is no any error generated, then restart gateway by reboot command.
## For G2H
There is a way to [enable telnetd](https://github.com/niceboygithub/AqaraCameraHubfw/blob/main/binutils/README.md#aqara-camera-hub-g2g2h-znsxj12lm-related-binutils).

## For G3
## For G3, G2H Pro
There is a way to [enable telnetd](https://github.com/Wh1terat/aQRootG3) from #Wh1terat. After enabled telnet, you need use putty to telnet <ip of your G3>. Then enter the following commands.

## For M2 old EU/Global
Use [this tool](https://github.com/niceboygithub/AqaraM1SM2fw/tree/main/tools#gateway-global-tool) to clean telnet login password. The firmware before the version 4.0.4 was enabled telnetd as default. After clear the login password, you can this integration now.

```
chmod a+w /data/scripts/post_init.sh
echo -e "#!/bin/sh\n\nasetprop sys.camera_ptz_moving true\nfw_manager.sh -r\nfw_manager.sh -t -k" > /data/scripts/post_init.sh
Expand Down
2 changes: 1 addition & 1 deletion custom_components/aqara_gateway/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# 'lumi.acpartner.acn04': ["Aqara", "AirCondition P3", "KTBL12LM"],
'lumi.gateway.aeu01': ["Aqara", "Gateway M1S", "HM1S-G01"],
# 'lumi.gateway.iragl01': ["Aqara", "Gateway M2", "ZHWG12LM"],
# 'lumi.gateway.iragl7': ["Aqara", "Gateway M2", "HM2-G01"],
'lumi.gateway.iragl7': ["Aqara", "Gateway M2", "HM2-G01"], # old Global/EU version
'lumi.gateway.iragl5': ["Aqara", "Gateway M2", "ZHWG12LM"], # tested
'lumi.gateway.agl001': ["Aqara", "Gateway M2", "HM2-G01"], # new Global version
'lumi.gateway.sacn01': ["Aqara", "Smart Hub H1", "QBCZWG11LM"],
Expand Down

0 comments on commit 699da8c

Please sign in to comment.