Skip to content

Commit b3f3f2f

Browse files
authored
Add Xiaomi redirect and other misc improvements (home-assistant#3425)
1 parent 94a862f commit b3f3f2f

File tree

1 file changed

+45
-20
lines changed

1 file changed

+45
-20
lines changed

source/_components/xiaomi_aqara.markdown

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: page
3-
title: "Xiaomi Gateway"
4-
description: "Instructions how to integrate your Xiaomi Gateway within Home Assistant."
3+
title: "Xiaomi Gateway (Aqara)"
4+
description: "Instructions for how to integrate the Xiaomi Gateway (Aqara) within Home Assistant."
55
date: 2017-07-21 16:34
66
sidebar: true
77
comments: false
@@ -11,15 +11,18 @@ logo: xiaomi.png
1111
ha_category: Hub
1212
ha_release: "0.50"
1313
ha_iot_class: "Local Push"
14+
redirect_from: /components/xiaomi/
1415
---
1516

16-
The `xiaomi aqara` platform allows you to integrate the following [Xiaomi](http://www.mi.com/en/) devices into Home Assistant.
17+
The `xiaomi_aqara` component allows you to integrate [Xiaomi](http://www.mi.com/en/) Aqara-compatible devices into Home Assistant.
18+
19+
#### {% linkable_title Supported Devices %}
1720

1821
- Temperature and Humidity Sensor (1st and 2nd generation)
1922
- Motion Sensor (1st and 2nd generation)
2023
- Door and Window Sensor (1st and 2nd generation)
2124
- Button (1st and 2nd generation)
22-
- Plug aka Socket (ZigBee version, reports power consumed, power load, state and if device in use)
25+
- Plug aka Socket (Zigbee version, reports power consumed, power load, state and if device in use)
2326
- Wall Plug (reports power consumed, power load and state)
2427
- Aqara Wall Switch (Single)
2528
- Aqara Wall Switch (Double)
@@ -35,7 +38,7 @@ The `xiaomi aqara` platform allows you to integrate the following [Xiaomi](http:
3538
- Water Leak Sensor
3639
- Battery
3740

38-
What's not available?
41+
#### {% linkable_title Unsupported Devices %}
3942

4043
- Gateway Radio
4144
- Gateway Button
@@ -44,9 +47,11 @@ What's not available?
4447
- Decoupled mode of the Aqara Wall Switches (Single & Double)
4548
- Additional alarm events of the Gas and Smoke Detector: Analog alarm, battery fault alarm (smoke detector only), sensitivity fault alarm, I2C communication failure
4649

47-
Follow the setup process using your phone and Mi-Home app. From here you will be able to retrieve the key from within the app following [this tutorial](https://community.home-assistant.io/t/beta-xiaomi-gateway-integration/8213/1832)
50+
## Setup
51+
52+
Follow the setup process using your phone and Mi-Home app. From here you will be able to retrieve the key from within the app following [this tutorial](https://community.home-assistant.io/t/beta-xiaomi-gateway-integration/8213/1832).
4853

49-
To enable Xiaomi gateway in your installation, add the following to your `configuration.yaml` file:
54+
To enable {{ page.title }} in your installation, add the following to your `configuration.yaml` file:
5055

5156
### {% linkable_title One Gateway %}
5257

@@ -81,14 +86,28 @@ xiaomi_aqara:
8186
key: xxxxxxxxxxxxxxxx
8287
```
8388
84-
Configuration variables:
85-
86-
- **mac** (*Optional*): The MAC of your gateway. Required if you have more than one.
87-
- **key** (*Optional*): The key of your gateway. Required if you also want to control lights and switches. Sensors and binary sensors will still work.
88-
- **discovery_retry** (*Optional*): Amount of times Home Assitant should try to reconnect to the Xiaomi Gateway. Default is 3.
89-
- **interface** (*Optional*): Which network interface to use. Defaults to any.
90-
91-
## {% linkable_title Services %}
89+
{% configuration %}
90+
mac:
91+
description: The MAC of your gateway. *Optional if only using one gateway.*
92+
required: true
93+
type: string
94+
key:
95+
description: The key of your gateway. *Optional if only using sensors and/or binary sensors.*
96+
required: true
97+
type: string
98+
discovery_retry:
99+
description: Number of times that Home Assistant should try to reconnect to the gateway.
100+
required: false
101+
type: int
102+
default: 3
103+
interface:
104+
description: Which network interface to use.
105+
required: false
106+
type: string
107+
default: any
108+
{% endconfiguration %}
109+
110+
### {% linkable_title Services %}
92111
93112
The gateway provides two services: `xiaomi.play_ringtone` and `xiaomi.stop_ringtone`. To play ringtones by Home Assistant, the version of the gateway firmware must be `1.4.1_145` at least. A `ringtone_id` and `gw_mac` must be supplied. The parameter `ringtone_vol` (percent) is optional. Allowed values of the `ringtone_id` are:
94113

@@ -97,7 +116,13 @@ The gateway provides two services: `xiaomi.play_ringtone` and `xiaomi.stop_ringt
97116
- alarm clock [20-29]
98117
- custom ringtones (uploaded by the Mi Home app) starting from 10001
99118

100-
Automation example
119+
## {% linkable_title Examples %}
120+
121+
### Long Press on Smart Button
122+
123+
This example plays the sound of a dog barking when the button is held down,
124+
and stops the sound when the button is pressed once.
125+
*Note: The sound will stop playing automatically when it has ended.*
101126

102127
```yaml
103128
- alias: Let a dog bark on long press
@@ -127,19 +152,19 @@ Automation example
127152
gw_mac: xxxxxxxxxxxx
128153
```
129154

130-
### {% linkable_title Troubleshooting %}
155+
## {% linkable_title Troubleshooting %}
131156

132-
**Connection problem**
157+
### {% linkable_title Connection problem %}
133158

134159
```bash
135160
2017-08-20 16:51:19 ERROR (SyncWorker_0) [homeassistant.components.xiaomi] No gateway discovered
136161
2017-08-20 16:51:20 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi: Component failed to initialize.
137162
```
138163

139164
That means that Home Assistant is not getting any response from your Xiaomi gateway. Might be a local network problem or your firewall.
140-
- Make sure you have enabled LAN access: https://community.home-assistant.io/t/beta-xiaomi-gateway-integration/8213/1832
165+
- Make sure you have [enabled LAN access](https://community.home-assistant.io/t/beta-xiaomi-gateway-integration/8213/1832).
141166
- Turn off the firewall on the system where Home Assistant is running.
142-
- Try to leave the MAC address `mac:` blank.
167+
- Try to leave the MAC address `mac:` blank.
143168
- Try to set `discovery_retry: 10`.
144169
- Try to disable and then enable LAN access.
145170
- Hard reset the gateway: Press the button of the gateway 30 seconds and start again from scratch.

0 commit comments

Comments
 (0)