You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_components/xiaomi_aqara.markdown
+45-20Lines changed: 45 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
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."
5
5
date: 2017-07-21 16:34
6
6
sidebar: true
7
7
comments: false
@@ -11,15 +11,18 @@ logo: xiaomi.png
11
11
ha_category: Hub
12
12
ha_release: "0.50"
13
13
ha_iot_class: "Local Push"
14
+
redirect_from: /components/xiaomi/
14
15
---
15
16
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 %}
17
20
18
21
- Temperature and Humidity Sensor (1st and 2nd generation)
19
22
- Motion Sensor (1st and 2nd generation)
20
23
- Door and Window Sensor (1st and 2nd generation)
21
24
- 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)
23
26
- Wall Plug (reports power consumed, power load and state)
24
27
- Aqara Wall Switch (Single)
25
28
- Aqara Wall Switch (Double)
@@ -35,7 +38,7 @@ The `xiaomi aqara` platform allows you to integrate the following [Xiaomi](http:
35
38
- Water Leak Sensor
36
39
- Battery
37
40
38
-
What's not available?
41
+
#### {% linkable_title Unsupported Devices %}
39
42
40
43
- Gateway Radio
41
44
- Gateway Button
@@ -44,9 +47,11 @@ What's not available?
44
47
- Decoupled mode of the Aqara Wall Switches (Single & Double)
45
48
- Additional alarm events of the Gas and Smoke Detector: Analog alarm, battery fault alarm (smoke detector only), sensitivity fault alarm, I2C communication failure
46
49
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).
48
53
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:
50
55
51
56
### {% linkable_title One Gateway %}
52
57
@@ -81,14 +86,28 @@ xiaomi_aqara:
81
86
key: xxxxxxxxxxxxxxxx
82
87
```
83
88
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 %}
92
111
93
112
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:
94
113
@@ -97,7 +116,13 @@ The gateway provides two services: `xiaomi.play_ringtone` and `xiaomi.stop_ringt
97
116
- alarm clock [20-29]
98
117
- custom ringtones (uploaded by the Mi Home app) starting from 10001
99
118
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.*
101
126
102
127
```yaml
103
128
- alias: Let a dog bark on long press
@@ -127,19 +152,19 @@ Automation example
127
152
gw_mac: xxxxxxxxxxxx
128
153
```
129
154
130
-
### {% linkable_title Troubleshooting %}
155
+
## {% linkable_title Troubleshooting %}
131
156
132
-
**Connection problem**
157
+
### {% linkable_title Connection problem %}
133
158
134
159
```bash
135
160
2017-08-20 16:51:19 ERROR (SyncWorker_0) [homeassistant.components.xiaomi] No gateway discovered
136
161
2017-08-20 16:51:20 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi: Component failed to initialize.
137
162
```
138
163
139
164
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).
141
166
- 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.
143
168
- Try to set `discovery_retry: 10`.
144
169
- Try to disable and then enable LAN access.
145
170
- Hard reset the gateway: Press the button of the gateway 30 seconds and start again from scratch.
0 commit comments