home-assistant.io/source/_components/switch.rpi_rf.markdown
martinfrancois 7f66e700c2 Rflink: added support for lights with toggle type (#2284)
* Update switch.rpi_rf.markdown

updated to reflect the changes for supporting multiple codes being executed in a row

* added toggle type and fire_event fix for typo

removed additional incorrect underscore from fire_event

* removed one more instance of fire_event with additional underscore
2017-03-19 11:49:54 +01:00

2.1 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_release
layout title description date sidebar comments sharing footer logo ha_category ha_release
page Raspberry Pi RF Switch Instructions how to integrate devices controlled via codes sent with low-cost GPIO RF modules on a Raspberry Pi into Home Assistant as a switch. 2016-05-10 09:00 true false true true raspberry-pi.png Switch 0.19

The rpi_rf switch platform allows you to control devices over 433/315MHz LPD/SRD signals with generic low-cost GPIO RF modules on a Raspberry Pi.

Interoperable with codes sniffed via the rpi-rf module or rc-switch. For more info see the PyPi module description: rpi-rf.

To enable, add the following to your configuration.yaml:

# Example configuration.yaml entry
switch:
  platform: rpi_rf
  gpio: 17
  switches:
    bedroom_light:
      code_on: 1234567
      code_off: 1234568
    ambilight:
      pulselength: 200
      code_on: 987654
      code_off: 133742
    living_room_light:
      protocol: 5
      code_on: 654321,565874,233555,149874
      code_off: 654320,565873,233554,149873
      signal_repetitions: 15

Configuration variables:

  • gpio (Required): GPIO to which the data line of the TX module is connected.
  • switches: (Required): The array that contains all switches.
    • [entry] (Required): Name of the switch. Multiple entries are possible.
      • code_on (Required): Decimal code(s) to switch the device on. To run multiple codes in a sequence, separate the individual codes with commas ','.
      • code_off (Required): Decimal code(s) to switch the device off. To run multiple codes in a sequence, separate the individual codes with commas ','.
      • protocol (Optional): RF Protocol (Default is 1).
      • pulselength (Optional): Pulselength (Default is the protocol default).
      • signal_repetitions (Optional): Number of times to repeat transmission (default is 10, can increase to try to improve reliability).