Skip to content

Commit 338f4ae

Browse files
committed
Add documentation
1 parent fda6231 commit 338f4ae

File tree

2 files changed

+50
-2
lines changed

2 files changed

+50
-2
lines changed
7.61 KB
Loading

docs/integrate/home_assistant.md

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
# 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+
28
## 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.
49

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.
617

718
![](../img/OpenMQTTGateway-Configuration-Home-Assistant-Discovery-Integration.png)
819

@@ -22,6 +33,43 @@ OMG will use the auto discovery functionality of home assistant to create gatewa
2233

2334
![](../img/OpenMQTTGateway_Home_Assistant_MQTT_discovery.png)
2435

36+
37+
### 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+
![](../img/HA_discovery_new_switch.png)
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+
2573
## Manual integration examples
2674
From @123, @finity, @denniz03, @jrockstad, @anarchking
2775

0 commit comments

Comments
 (0)