rflink component support devices that use Rflink gateway firmware, for example the Nodo Rflink Gateway. Rflink gateway is firmware for the Arduino MEGA 2560 that allows communication with 433 Mhz devices using cheap hardware (Arduino + 433 Mhz tranceiver).
The 433 Mhz spectrum is used by many manufacturers mostly using their own protocol/standard and includes devices like: light switches, blinds, weather stations, alarms and various other sensors.
A complete list of devices supported by Rflink can be found here
This component is tested with the following hardware/software:
- Nodo Rflink Gateway V1.4/Rflink R44
To enable Rflink in your installation, add the following to your
# Example configuration.yaml entry rflink: port: /dev/serial/by-id/usb-id01234
- port (Required): The path to Rflink usb/serial device or TCP port in TCP mode.
- host (Optional): Switches to TCP mode, connects to host instead of to USB/serial.
- wait_for_ack (Optional): Wait for Rflink to ackowledge commands sent before sending new command (slower but more reliable). Defaults to
- ignore_devices (Optional): List of devices id’s to ignore. Supports wildcards (*) at the end.
- reconnect_interval (Optional): Time in seconds between reconnect attempts.
# Example configuration.yaml entry rflink: port: /dev/serial/by-id/usb-id01234 wait_for_ack: False ignore_devices: - newkaku_000001_01 - digitech_*
TCP mode allows connect to a Rflink device over TCP/IP network. This is for example useful if placing the Rflink device next to the HA server is not optimal or desired (eg: bad reception).
To expose the usb/serial interface over TCP on a different host (Linux) the following command can be used:
$ socat /dev/ttyACM0,b57600 TCP-LISTEN:1234,reuseaddr
Other methods of exposing the serial interface over TCP are possible (eg: ESP8266 or using Arduino Wifi shield). Essentially the serial stream should be directly mapped to the TCP stream.
Tested with Wifi serial bridge esp-link V2.2.3 running on a NodeMCU (ESP8266 Wifi module) with ESP8266 TXD0 (pin D10) and RXD0 (pin D9) connected to Arduino MEGA 2560 RX (Pin 2) and TX (Pin 3) respectively.
Due to different logical levels, a voltage level shifter is required between the 3.3V NodeMCU and 5V Arduino MEGA 2560 pins.
When re-flashing the Arduino MEGA, disconnect the ESP8266 to avoid programming difficulties.
# Example configuration.yaml entry rflink: host: 192.168.0.10 port: 1234
Rflink platform can be configured to completely ignore a device on a platform level. This is useful when you have neighbors which also use 433 Mhz technology.
# Example configuration.yaml entry rflink: port: /dev/serial/by-id/usb-id01234 wait_for_ack: False ignore_devices: - newkaku_000001_01 - digitech_* - kaku_1_*
This configuration will ignore the button
1 of the
newkaku device with ID
000001, all devices of the
digitech protocol and all switches of the
kaku protocol device with codewheel ID
Wildcards only work at the end of the ID, not in the middle of front!
Even though a lot of devices are supported by Rflink, not all have been tested/implemented. If you have a device supported by Rflink but not by this component please consider testing and adding support yourself or create an issue and mention
@aequitas in the description.
If you find a device is recognized differently, with different protocols or the ON OFF is swapped or detected as two ON commands, it can be overcome with the RFlink ‘RF Signal Learning’ mechanism from RFLink Rev 46 (11 March 2017). http://www.nemcon.nl/blog2/faq#RFFind.
rflinkPython module a asyncio transport/protocol is setup that fires an callback for every (valid/supported) packet received by the Rflink gateway.
- This component uses this callback to distribute ‘rflink packet events’ over the HASS bus which can be subscribed to by entities/platform implementations.
- The platform implementions take care of creating new devices (if enabled) for unsees incoming packet id’s.
- Device entities take care of matching to the packet ID, interpreting and performing actions based on the packet contents. Common entitiy logic is maintained in this main component.