Python module for sending and receiving 433/315MHz LPD/SRD signals with generic low-cost GPIO RF modules on a Raspberry Pi.
Protocol and base logic ported ported from rc-switch. The libgiod-python library is required to access the GPIO pins. Therefore, the GPIO character device is used instead of the old GPIO sysfs interface.
Most generic 433/315MHz capable modules (cost: ~2€) connected via GPIO to a Raspberry Pi.
Generic RF outlets and most 433/315MHz switches (cost: ~15€/3pcs).
Chipsets:
- SC5262 / SC5272
- HX2262 / HX2272
- PT2262 / PT2272
- EV1527 / RT1527 / FP1527 / HS1527
For a full list of compatible devices and chipsets see the rc-switch Wiki
libgiod-python (available through most package managers as python3-libgpiod)
On your Raspberry Pi, install the rpi_rf-gpiod module via pip.
Debian/Ubuntu:
# apt-get install python3-pip python3-libgpiod
Fedora/CentOS:
# dnf install python3-pip python3-libgpiod
With pip installed:
# pip3 install rpi-rf-gpiod
Raspberry Pi 1/2(B+):
RPI GPIO HEADER
____________
| ____|__
| | | |
| 01| . x |02
| | . x__|________ RX
| | . x__|______ | ________
| | . . | | | | |
TX | ____|__x . | | |__|VCC |
_______ | | __|__x . | | | |
| | | | | | x____|______|____|DATA |
| GND|____|__| | | . . | | | |
| | | | | . . | | |DATA |
| VCC|____| | | . . | | | |
| | | | . . | |____|GND |
| DATA|_________| | . . | |________|
|_______| | . . |
| . . |
| . . |
| . . |
| . . |
| . . |
| . . |
39| . . |40
|_______|
TX:
GND > PIN 09 (GND)
VCC > PIN 02 (5V)
DATA > PIN 11 (GPIO17)
RX:
VCC > PIN 04 (5V)
DATA > PIN 13 (GPIO27)
GND > PIN 06 (GND)
See scripts (rpi-rf_send, rpi-rf_receive) which are also shipped as cmdline tools. They are automatically installed when installing the package with pip3.
- Send:
rpi-rf_send [-h] [-g GPIO] [-p PULSELENGTH] [-t PROTOCOL] [-l LENGTH] [-r REPEAT] CODESends a decimal code via a 433/315MHz GPIO device
- positional arguments:
- CODE Decimal code to send
- optional arguments:
-h, --help show this help message and exit -g GPIO GPIO pin (Default: 17) -p PULSELENGTH Pulselength (Default: 350) -t PROTOCOL Protocol (Default: 1) -l LENGTH Codelength (Default: 24) -r REPEAT Repeat cycles (Default: 10)
- Receive:
rpi-rf_receive [-h] [-g GPIO]Receives a decimal code via a 433/315MHz GPIO device
- optional arguments:
-h, --help show this help message and exit -g GPIO GPIO pin (Default: 27)
- The code is licensed under the BSD Licence
- The project is forked from the GPIO sysfs interface implementation of milaq
- The project source code is hosted on GitHub
- Please use GitHub issues to submit bugs and report issues

