Add RTL_433 discovery with Home Assistant convention inspired from rtl_433_mqtt_hass.py (#1379)
This also changes the topic structure when using the macro valueAsATopic=true, it adds as sub-topics the `type, subtype, and channel` when they exist. The id is the last subtopic to facilitate filtering, as it may change when replacing the batteries. Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com>
This commit is contained in:
1 parent
ba70d364b1
commit
16815f51da
9 files changed
+389
-103
No files matched your search
@@ -33,6 +33,42 @@ OMG will use the auto discovery functionality of home assistant to create gatewa
|
||||
|
||||

|
||||
|
||||
::: info
|
||||
The Bluetooth and the RTL_433 gateway will create automatically devices and entities, the RF gateway will create DeviceTrigger.
|
||||
The OpenMQTTGateway will also be available as a device to monitor its parameters and control it. The sensors (DHT for example) and actuators (relays) are attached to the gateway.
|
||||
:::
|
||||
|
||||
## RTL_433 auto discovery specificity
|
||||
|
||||
Even if the RTL_433 gateway will create automatically the devices and entities, you may loose the link to them when you change the batteries. This is proper to the RF devices. In this case new device and entities will be created. You may bypass this by creating entities through manual configuration that filter following the device model and other parameters and don't take into account the id.
|
||||
Example:
|
||||
```yaml
|
||||
mqtt:
|
||||
sensor:
|
||||
- state_topic: "+/+/RTL_433toMQTT/WS2032/+"
|
||||
```
|
||||
instead of
|
||||
```yaml
|
||||
mqtt:
|
||||
sensor:
|
||||
- state_topic: "+/+/RTL_433toMQTT/WS2032/47998"
|
||||
```
|
||||
Note also that the sensor may leverage channels, types or subtypes, they can be used in the filtering
|
||||
Example:
|
||||
In the example below 9 is the `subtype` and 1 is the `channel`
|
||||
```yaml
|
||||
mqtt:
|
||||
sensor:
|
||||
- state_topic: "+/+/RTL_433toMQTT/Prologue-TH/9/1/+"
|
||||
```
|
||||
instead of
|
||||
```yaml
|
||||
mqtt:
|
||||
sensor:
|
||||
- state_topic: "+/+/RTL_433toMQTT/Prologue-TH/9/1/215"
|
||||
```
|
||||
|
||||
Alternatively the rssi signal could be used also.
|
||||
|
||||
## MQTT Device Trigger and RF
|
||||
|
||||
@@ -40,9 +76,6 @@ With OpenMQTTGateway [configured to receive RF signals](./setitup/rf.html) the m
|
||||
|
||||
With autodiscovery enabled, HomeAssistant will discover a [MQTT Device Trigger](https://www.home-assistant.io/integrations/device_trigger.mqtt/) identified by the value field given in the mqtt argument.
|
||||
|
||||
|
||||
|
||||
|
||||
## Manual integration examples
|
||||
From @123, @finity, @denniz03, @jrockstad, @anarchking, @dkluivingh
|
||||
|
||||
|
||||
Reference in new issue
Block a user