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: docs/integrate/home_assistant.md
+50-2Lines changed: 50 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,19 @@
1
1
# Integrate Home Assistant
2
+
3
+
Home Assistant provide the [MQTT integration](https://www.home-assistant.io/integrations/mqtt/) and through this integration it is possible to exploit and manage the messages published by OpenMqttGateway.
4
+
5
+
Once this integration on home assistant is configured with the same mqtt broker, it is possible to create devices manually or through the autodiscovery function.
6
+
7
+
2
8
## Auto discovery
3
-
Home Assistant discovery is enabled by default on all binaries and platformio configurations except for UNO. With Arduino IDE please read the [advanced configuration section](../upload/advanced-configuration#auto-discovery) of the documentation.
4
9
5
-
First enable discovery on your MQTT integration in HASS.
10
+
From Home Assistant site
11
+
12
+
> The discovery of MQTT devices will enable one to use MQTT devices with only minimal configuration effort on the side of Home Assistant. The configuration is done on the device itself and the topic used by the device.
13
+
14
+
On OpenMqttGateway the Home Assistant discovery is enabled by default on all binaries and platformio configurations except for UNO. With Arduino IDE please read the [advanced configuration section](../upload/advanced-configuration#auto-discovery) of the documentation. Here are a few tips for activating discovery on Home Assistant, but for detailed configuration please refer to the Home Assistant website.
15
+
16
+
Enable discovery on your MQTT integration in HASS.
### Example with "DIGOO DG-HOSA 433MHz PIR Detector"
38
+
39
+
With OpenMqttGateway [configured to receive RF signals](./setitup/rf.html) the messages are transmitted as indicated by [RCSwitch based gateway](./use/rf.html#rcswitch-based-gateway), so it is possible to receive a pulse every time the sensor discover a movement.
40
+
41
+
With autodiscovery enabled, HomeAssistant will discover a new switch identified by the value field given in the mqtt argument.
42
+
43
+
44
+

45
+
46
+
47
+
With this configuration we receive from the broker only the close signal, which produces the change of state of the switch to "on". One way to reset the status is to setup one [automation](https://www.home-assistant.io/docs/automation/basics/) like this
48
+
49
+
```yaml
50
+
alias: Reset Pirs
51
+
description: ''
52
+
trigger:
53
+
- platform: state
54
+
entity_id:
55
+
- switch.2708742
56
+
to: 'on'
57
+
condition: []
58
+
action:
59
+
- delay:
60
+
hours: 0
61
+
minutes: 0
62
+
seconds: 3
63
+
milliseconds: 0
64
+
- service: switch.turn_off
65
+
target:
66
+
entity_id: '{{ trigger.entity_id }}'
67
+
mode: parallel
68
+
max: 100
69
+
70
+
```
71
+
72
+
25
73
## Manual integration examples
26
74
From @123, @finity, @denniz03, @jrockstad, @anarchking
0 commit comments