Project: RFLink to MQTT using ESP8266 and arduino IDE

Hum, i have not this part. What is the difference between level shifter and level regulator ? I can just puta lm1117 ?

hmm. Not sure. I think lm1117 could interupt/change the signals. Maybe a electronics guy could help us.

When looking up the type I bought I found this in additional information part: The level converter is very easy to use. The board needs to be powered from the two voltages sources (high voltage and low voltage) that your system is using. High voltage (5V for example) to the ‘HV’ pin, low voltage (3.3V for example) to ‘LV’, and ground from the system to the ‘GND’ pin.

I think I found out why I didnt get it to work… I only supplied 5v and thought I could use the LV side for other stuff… :smiley:

I’ve made a level shifter for both side, but it doesn’t help.

I have continue my debug, and if I remove the wire from TX Arduino to RX ESP, it works. I can’t read data from RFLink, but activate is OK et non crash. So I suppose the problem is when RFLink say OK to the command I sent.


@phileep @Rune Found It !! I will propose a pull request on gitHub.
The problem is that RFLink send 20;xx;OK; when you send a command. (New in R46 ? if you dont have the problem ? )
The void parseData crash when it tries to get RFData. So if RFName == OK => return; to exit void. And ESP is running fine. I will add the fix for \n too. I hope I will get time this WeekEnd to propose it.

1 Like

Did you end using the level shifter?

It works with and without, so i have removed it

1 Like

Not using a level shifter is a slight risk.

However it is only on the communications in to the ESP8266, and the NODEMCU units seem tolerant, especially to such short bursts.

If you want to be sure, cheapest is a voltage divider on the TX from the MEGA as that is 5v logic. google voltage divider - you only need 2 resistors of different ratings to get the voltage down to the proper 3.3v range for the ESP.

The proof you don’t need on is that all the inward signals have been working fine. ie we can get data from the RFLink mega without the shifter.

Great work @Minims.

Will await your PR - let me know if you want me to add it by hand, although you deserve the credit in the reopo!

Some time ago the CEO of Espressif apparently tweeted that the ESP’s can handle 5V no issues.


1 Like

@phileep PR done, I have list my changes in the commit comment. I hope it will help :-).

No crash since I’ve applied the fix. I now use a generic ESP-12F instead of my node MCU. I use the 3.3v power of the MEGA and it seems working great.

About level shifter, I 've had a voltage divider with 1k/2k resistors just for security and because it’s not the Node MCU version.

1 Like

I thought I give this a try but I’m stuck at the point of trying to login to MQTT for the lack of mqtt username and password within the Esp sketch, need your help.
thank you.

The sketch is not setup currently for a mqtt password.

You need to add it to the sketch.

I think it is as simple as adding the username & password to the mqtt client conect statement at about line 125
change if (client.connect(client_name, willTopic, 0, willRetain, willMessage)) {
to if (client.connect(client_name, username, password, willTopic, 0, willRetain, willMessage)) {

Where you define variables in the sketch or input directly your own username and password in this statement.

For more information on the syntax, see

Hopefully this will get you going

Thanks that done the trick will commence with my testing. :slight_smile:


I did make a pull request a few months ago, to fix stability, negative temperatures and Mqtt authentication. It doesn’t appear to have been merged yet.

Guys, it is not clear to me. I connected my Arduino with Rflink to NodeMCU with ESP-LINK. Esp-Link is supporting:

  1. MQTT
  2. Serial over Wifi

How do I connect with the latter to Home Assistant?

The documentation is missing how to setup Esp-Link, port etc.? While there is an information that it has been tested with Esp-Link:

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.

I picked up some used sensors, and would like to play around with them. I also have a few spare transmitter and reciever devices, so i guess i can use those.

What kind of hardware is best, for a DIY RFLink “on cheap” :-)?

How to build a RFLink 433MHz radio smarthome gateway for €10.50. Test with Domoticz • DIY Projects

1 Like

Yep, i just found it too :slight_smile: Thanks!

I’ve also found this;

So both things are now ordered :smiley:

Hi, I use my rflink with MQTT gateway on ESP since 1 year without any problems:

Very good projet, just work!
I have Two rflink one 433,92 Mhz and an other for Somfy RTS 433,42 Mhz.

Hello Seb821 could you please publish an mqtt switch or cover entry from your configuration.yaml i have the issue that the state is not changed when i send to the rflink.

This is my current entry :

  • platform: mqtt
    name: “Rolluik Woonkamer”
    state_topic: “rflink/BrelMotor-7f320b”
    command_topic: “rflink/cmd”
    payload_open: “10;BrelMotor;7f320b;e1;UP;”
    payload_close: “10;BrelMotor;7f320b;e1;DOWN;”
    state_open: “UP”
    state_closed: “DOWN”
    optimistic: false
    qos: 0
    retain: false

This is how I define my switches with seb821/espRFLinkMQTT