Skip to content

Commit

Permalink
[DOCS] RF Gateway receiver mode change, HA integration example to vie…
Browse files Browse the repository at this point in the history
…w/change the RF mode (#2072)

* Update rf.md

* Update home_assistant.md
  • Loading branch information
peshovec authored Oct 4, 2024
1 parent 898b5e6 commit c98ac73
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
39 changes: 39 additions & 0 deletions docs/integrate/home_assistant.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,45 @@ mqtt:
qos: "0"
retain: true
```
### RF gateway mode - Pilight, RF, kaku
insert an include statement in HA configuration.yaml
```bash
grep homed ./configuration.yaml
mqtt: !include homed-mqtt.yaml
```
In the example, the included file is homed-mqtt.yaml. It provides an mqtt select entity with the ability to show and also change via dropdown - the desired mode of the RF receiver gateway. In the homed-mqtt.yaml snippet, the device section (as it is optional) is ommited,
```yaml
select:
- name: 'RF: Mode receive'
unique_id: espdevcho-rf-mode
#platform: mqtt
availability_topic: home/espdevcho/LWT # espdevcho is a particular name of the gateway, instead of the default OpenMQTTGateway
payload_available: online
payload_not_available: offline
options:
- "Pilight"
- "RF classic"
- "RF2 kaku"
state_topic: home/espdevcho/RFtoMQTT # espdevcho is a particular name of the gateway, instead of the default OpenMQTTGateway
value_template: >
{% if value_json.active == 1 %} Pilight
{% elif value_json.active == 2 %} RF classic
{% elif value_json.active == 4 %} RF2 kaku
{% endif %}
#unit_of_measurement: s
command_topic: home/espdevcho/commands/MQTTtoRF/config # espdevcho is a particular name of the gateway, instead of the default OpenMQTTGateway
command_template: >
{% set value_map = {
"Pilight": 1,
"RF classic": 2,
"RF2 kaku": 4,
}
%}
{"active":{{ value_map[value] }}}
device:
configuration_url: http://192.168.1.11/ # device section is optional. It is almost ommited in this example. Values here will update the corresponding device, if it already exist
```

### Mijia Thermometer BLE

Expand Down
12 changes: 8 additions & 4 deletions docs/use/rf.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,23 @@ Note that with CC1101 this frequency will be used as the default sending frequen

Switching of the active transceiver (RTL_433 receiver only) module is available between the RF, RF2, and (RTL_433 or Pilight) gateway modules, allowing for changing of signal decoders without redeploying the OpenMQTTGateway package. Sending a JSON message to the command topic will change the active transceiver module.

To enable the RF gateway module send a json message to the RF gateway module command subject with the key being 'active', and any value. The value at this time is ignored.
To change the RF gateway module, which will receive, send a json message to the RF gateway module command subject (home/OpenMQTTGateway/commands/MQTTtoRF/config) with the corresponding value of the key "active"

1 - PiLight
2 - RF
3 - RTL_433
1 - PiLight<br>
2 - RF<br>
3 - RTL_433<br>
4 - RF2

Example to receive from the RF gateway:
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoRF/config" -m '{"active":2}'`

Example to receive from the Pilight gateway:
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoRF/config" -m '{"active":1}'`

The active receiver can also be changed with the WebUI.

The OpenMQTTGateway RFtoMQTT status message contains a key `active` which is the current active receiver module.
There is example configuration entry for Homea Assistant in the intergrations doc.

## RTL_433 device decoders

Expand Down

0 comments on commit c98ac73

Please sign in to comment.