RFM-Gateway: A radio-to-WiFi bridge

The RFM-WiFi interfaces a Hope-RF radio module to an ESP8266 microcontroller in order to send or receive data over radio and forward it to a WiFi network. The PCB can be assembled with one of the following radiomodules:

  • RFM69C(W) 315 / 433 / 868 / 915 MHz FSK/OOK radio module
  • RFM69HC(W) 315 / 433 / 868 / 915 MHz FSK/OOK radio module
  • RFM95(W) 868 MHz LoRa module
  • RFM96(W) 433 MHz LoRa module
  • RFM97(W) LoRa module
  • RFM98(W) 433 MHz LoRa module

Features

  • Modern USB-C connector for power supply, flashing and UART interface to the ESP8266
  • Integrated USB programmer, no need for an additional programmer in order to upload firmware to the ESP8266
  • SMA connector for mounting an SMA antenna for the RFM radio module
  • Connector for optional 0.96″ I²C OLED display
  • Completely SMD assembled (except radio module and SMA and extension-connectors)
  • Extension pinheader for I²C
  • Extension pinheader for 1-wire bus
  • fits in a compact plastic enclosure TEKO 100007, 80 x 56 x 24 mm

Applications

  • Bring wireless weathersensors (LaCrosse, …) into your WiFi
  • Control RC sockets
  • Single channel LoRa-Gateway
  • Gateway for open-energy-monitor nodes (emonTH)
  • Gateway for mysensors nodes
  • Gateway for JeeNodes
  • Gateway for nodes based on Moteino

Includes

  • PCB with all SMD parts assembled
  • SMA connector
  • Pin headers for I²C & 1wire
  • Plastic enclosure (without cuts für SMA & USB connectors)

Firmware

The RFM-gateway is meant as a open-source-hardware-platform to be used for own projects. When shipped it is preflashed with the inhouse-firmware. Push the button > 3 s in order to bring it into the configuration mode. It will open an access point with ssid RFM-gateway. This password is 12345678. Connect to it and browse to the address http://4.3.2.1. Connect it to your WiFi-network and configure the MQTT settings.

The inhouse firmware has the following capabilities:

433 MHz RC pulse gateway

When the RFM-gateway is assembled with a 433 MHr radiochip it can send & receive the signals of many sockets, remote controls, sensors and more. A (not complete) list of compatible devices can be found here. Received radiodata is translated to MQTT-messages and vice versa. Decoded and unknown received messages are displayed under the „log“ tab in the webinterface:

The log additionally shows the MQTT topic and payload, and the HTTP call in order to generate and send the received message from radio.

Receiving

Received and known protocols are sent using MQTT messages. The addressing parameters are encoded in the MQTT topic. E. g. an intertechno tristate device has the parameters house, group and channel, the topic is home/rfm-gateway/ittristate/A/1/1. The command („on“ or „off“) is available in the payload of the MQTT message. The received data is also sent to the topic home/rfm-gateway/received as a JSON object, for example:

{
  "protocol": "ittristate",
  "house": 1,
  "channel": 1,
  "group": 1,
  "command": "on"
}
{
  "protocol": "intertechno",
  "id": 12345,
  "channel": 1,
  "command": "on"
}
{
  "protocol": "pilota",
  "id": 12345,
  "type": 1,
  "channel": 1,
  "command": "on"
}
{
  "protocol": "emylo",
  "id": 12345,
  "key": "A"
}

Sending

Commands over radio can be transmitted using 4 different ways:

HTTP GET

The parameters and commands are encoded in the URL. Example for an ittristate device:

http://192.168.178.78/send/ittristate/A/1/1/on switches on the device with housecode A, group 1 and channel 1.

HTTP POST

The parameters and commands are encoded as an JSON object in the HTTP post data sent to the endpoint http://192.178.178.78/send. The JSON data has the same structure as described in the chapter „Receiving“.

MQTT

The parameters need to be encoded in the MQTT topic as described in the chapter „Receiving“, and the part /set has to be appended to the topic. Example topic for a intertechno tristate device: home/rfm-gateway/ittristate/A/1/1/set. The payload can be „on“, „off“ or others, depending on the used protocol.

MQTT JSON

The JSON objects described under chapter „Receiving“ can also be sent to the topic home/rfm-gateway/send in order to control a RF device.

868 MHz sensor gateway

When the RFM-gateway is assembled with the RFM69 868 MHz radiochip it can receive the following sensors and send the received data to a MQTT broker:

  • Lacrosse temperature/humidity sensors TX-22, TX-29, TX-35, …
  • Voltcraft Energy Count 3000
  • Bresser 7-in-1 weatherstation
  • EMT7170 energy counter

The data can be fed into homeassistant or other homeautomation software.

868 MHz FS20 gateway

This application sends and receives radio messages from FS20 devices and translates these to MQTT messages and vice versa. Here are some example MQTT messages for controlling FS20 devices sent to the MQTT topic home/rfm-gateway/fs20:

{
  "house": 1,
  "address": 1,
  "comand": 1
}
  • house: 16-bit (1-65525)
  • address: 8-bit address (1-255), nibble = 15 addresses all
  • command: 8-bit or 16-bit, 0=off, 16=on