jcrona / rf-ctrl

A command-line tool to control 433MHz OOK based devices
GNU General Public License v2.0
41 stars 5 forks source link

rf-ctrl - A command-line tool to control 433MHz OOK based devices

Synopsis

rf-ctrl is a command line tool allowing to control wireless plugs and chimes that use a 433MHz OOK modulation. The OOK modulation (ON/OFF Keying) allows to transmit binary data on a particular frequency by enabling or disabling the transmitter oscillator. I will call these states High and Low.

A big part of the wireless plugs that can be found on the market uses this modulation with a carrier frequency of 433.92MHz, and almost all of them follow the same frame pattern regarding the transmitted data:

This frame is then repeated a specific number of times. Some protocols are based on High to Low transitions, while some others use Low to High transitions.

rf-ctrl uses a frontend/backend logic allowing to generate the proper frame for a particular protocol on one side, and to use a particular 433MHz enabled hardware to send it on the other side. This means that adding a new transmitter driver will allow all the supported protocols to be used out of the box.

Build instruction

As usual:

$ make

Take a look at the Makefile to see the variables that can be used (for instance CROSS_COMPILE).

OpenWrt support

In order to build rf-ctrl as an OpenWrt package and/or add it to an OpenWrt firmware build:

Now, if you run $ make menuconfig from the openwrt root folder, you should see an rf-ctrl entry in the Utilities sub-menu !

Currently supported protocols and transmitters

The supported transmitters are:

The supported protocols are:

Usage

Turning off the DI-O device number 3 paired to the remote ID 424242:

$ sudo ./rf-ctrl -p dio -r 424242 -d 3 -c off

Starting a fast RF scan on every OTAX devices, sending the 'on' command:

$ sudo ./rf-ctrl -p otax -c on -s -n 1

License

rf-ctrl is distributed under the GPLv2 license. See the LICENSE file for more information.

Miscellaneous

Thanks to r10r and his he853-remote project. It saved me a lot of time when I implemented the HE853 USB dongle driver and the Home Easy protocol. So far, rf-ctrl has been successfully tested on a regular Linux PC, a TP-Link TL-WR703N router running OpenWrt, and a Raspberry Pi. Check out my Home-RF project for a simple Web-UI that uses rf-ctrl.

Fell free to visit my blog, and/or send me a mail !

__
Copyright (C) 2018 Jean-Christophe Rona