cpainchaud / RFLink32

RFLink for ESP, with MQTT client
Other
118 stars 44 forks source link
diy domoticz esp32 esp8266 home-assistant home-automation mqtt rf rflink rflink-esp rfm69 sensors sx1276 sx1278

RFLink ESP

This is a Radio Frequency to MQTT/Serial/TCP gateway built for ESP32 and ESP8266 boards (see #MCU for more).

It receives and decodes OOK 433MHz signals from your sensors, alarms and pushes them over MQTT/TCP/Serial. For some devices it can also send commands to control them.

This project is forked from RFLink-ESP (for ESP8266), which itself is forked from the original RFlink project "Release 29" for Arduino.

This fork provides additional features:

1. MCU

We extensively use ESP32 dev kits. This is the default settings in Platformio.ini and RFLink.h files.

You may also use other ESP8266/ESP8255 based boards when there are no pin limitations. NodeMCUv2 is known to work.

2. Receiver / Transmitter / Transceiver

As a starting point, you can use the RXB6 receiver which is a simple and stable 3.3v component - it is easy to find and cheap. Many other receivers are also supported.

Avoid using generic noname receivers!

Receivers

For more advanced behavior and reliability, the following receivers are also supported when used with an ESP32 board:

These advanced receivers require a few pins to be connected to the host. The recommended pin assignments are:

Name ESP32 SX1278/6 RFM69(H)CW CC1101
3v3 VCC 3.3V VCC
GND GND GND GND
18 SCK SCK SCK
19 MISO MISO MISO
23 MOSI MOSI MOSI
pins::RX_RESET NRESET RESET
pins::RX_CS NSS NSS CSN
pins::RX_DATA
pins::TX_DATA
26¹ DIO2 DIO2 GDO0

¹ These must be configured in the web portal, values suggested here are proven to work reliably.

3. OLED display

You can use an OLED display. We used a SSD1306 128x64 I2C screen in our tests.

This is highly experimental and therefore not enabled by default.

OLED

4. IDE

We strongly recommend using the PlatformIO IDE but you can alternatively use the Arduino IDE 1.8.10.

5. Framework

We use Arduino Core for ESP8266.

6. Libraries

In addition to the core libraries, the following are also in use:

7. Compile Options and Flags

Many features are not enabled by default or can be disabled for various reasons like firmware size or compatibility.

OTA (disabled by default)

There are 3 types of OTA to update your firmware:

Arduino/ESP's classic push over UDP (disabled by default)

AutoOTA

The device will download new firmware from a specified URL.

Config Portal Web Upload

A firmware file can be uploaded via the Config Portal's Firmware page.

Firmware Screen

8. Additional Info

Config Portal

Repository

The Config Portal web ui is located in its own repository.

Default Login Details

rflink32 / 433mhz

Pinout

Simple RX pin wiring:

Name D1 mini RXB6
PIN_RF_TX_VCC D5 5 VCC
PIN_RF_TX_NA D6 6 DER
PIN_RF_TX_DATA D7 7 DAT
PIN_RF_TX_GND D8 8 GND

Pinout

Alternative Pinout

Safe alternative wiring:

Name D1 mini RXB6
PIN_RF_TX_VCC 3v3 5 VCC
PIN_RF_TX_NA N/A 6 DER
PIN_RF_TX_DATA D7 7 DAT
PIN_RF_TX_GND GND 8 GND

Thanks

Special thanks to: Axellum, Etimou, Schmurtz, Zoomx