Monthly Archives: August 2022

RFLink (RTS) to MQTT via NodeMCU

This page is about configuring an RFLink RTS capable device to be able to connect to a HomeAssistant server through MQTT, using a NodeMCU for the interface.

Hardware requirements:

  • RFLink 433 (Somfy RTS) / Arduino Mega / Dipole / USB cable
  • A NodeMCU
  • Some straps to connect your Arduino Mega and NodeMCU

Software requirements:

  • Homeassistant
  • Arduino IDE

Configure NodeMCU

This part is based on Mr Seb82 and you can check his original work here: https://github.com/seb821/espRFLinkMQTT

For convenience / archive I will put the zip file version of what I used here:

Unzip it on your computer, edit the config.h file and edit the Wifi parameters especially:

The first three lines are the information of your IoT Wifi network, you can set them here if you know them already. Be careful though, if your password is too complex, you will see nothing after you flashed your NodeMCU. So keep is simple, unfortunately… I would also recommend to check the 5ghz capability of your NodeMCU if you want to use this band.

If you know about your SSID config, you can comment the last line. If you don’t the NodeMCU will boot as an access point, connect to it (IP is 192.168.4.1) then go to the system tab. Note this tab won’t show up on a smartphone unless you switch your browser into Desktop Mode.

Once this is configured, open espRFLinkMQTT.ino with Arduino IDE, and load it to your NodeMCU (You might need to install a library for that, depending on your configuration)

After two minutes you should see the NodeMCU either connected to your router (if the last line was commented) or its SSID appearing on your available Wifi network list.

You can now access it via http://itsIP and configure the MQTT part on the system tab.

Here is an example with MQTT properly configured:

RFLink configuration

  • Download the RFLink loader and the RFLink firmware from here: https://www.rflink.nl/download.php
  • Open the loader, connect your Mega to your computer and load the firmware you got

So, you must have the Arduino Mega, a gateway board (the one with the antenna plug) and a small board with the 433Mhz module on it. Assemble everything + connect your NodeMCU like in this image, with one specification:

  • Use the 3.3v connector from the Mega card to connect your NodeMCU because it does not work with 5v

Plug your Mega on a USB interface and both the Mega and NodeMCU might turn on, you should now be able to test the communication, for that reach your NodeMCU IP address with your browser, and on the first page, click the STATUS button:

Mosquitto

This page won’t explain how to configure Mosquitto, but you must have a broker like this to interface between your NodeMCU and Home assistant.

Homeassistant

Enabling MQTT

  • Go to settings, Devices & services
  • Click the button to Add integration, search for MQTT
  • Configure it depending on your Mosquitto (or any broker you have set)

Configuring a test automation

  • Settings, automation and scenes, create automation
  • Trigger:
    • MQTT
    • Topic: rflink/uptime
  • Action
    • Whatever you want 😀 but if you have a Google Home:
    • Call service
    • Text-to-Speech
    • Entity: your google home
    • Message: ESP Online

This will shout ESP online every 5 minutes, when your NodeMCU publish its uptime.

Replace Biticino interphone

For the records, interphones are configured through specific resistors (looks like fuses)

Each appartement has its own number (mine is 7) and then I got a fuse with a 7 written on it.

keep the fuse / fuses from the old device, it must have a number on it and a position on the plate (pick a picture to remember). For me I had one fuse with the number 7 written on it, it was placed on the right of the N pin place.

the right position is for the unit (1 to 9 then) and the left position for the dozen (10and above)

now on your new Biticino you have to find the pin board with the N label and put back your fuses on it, in the same order.

I had to put the fuse number 7 on the right position where the N label was written.