Chinese RF433 Wall Switches and RFLink gateway

Hi everyone,

I’m new to home automation and also new to Home Assistant. I must first say how good is HA and how easy it was to install it. I’m running hass.io on a RPi3 and can successfully control some Broadlink Wifi plugs. I want to control my wall switches from HA but my home electrical installation (in Chile) does not have a zero (neutral) wire for the switches. So some easy solutions like Wifi or Zwave switches are then impossible. Some Zigbee switches like the one from Xiaomi only existe existe in EU size and Chile is using the US Size (even if electricity is 230V). My only solution seems to be some RF433 switches that do not need the zero wire.

So I built a RFlink gateway which seems to work pretty well, and bought two cheap chinese RF433 switches based on the EV1527 chip (the FUNRY ST1, one with a single gang and one with two gangs) to make tests. These switches come with a remote control.

When using the first remote control (four buttons), the RFlink detects the following:
20;02;EV1527;ID=0dc21c;SWITCH=04;CMD=ON;
20;03;EV1527;ID=0dc21c;SWITCH=01;CMD=ON;
20;04;EV1527;ID=0dc21c;SWITCH=08;CMD=ON;
20;05;EV1527;ID=0dc21c;SWITCH=02;CMD=ON;

After training the wall switch with this remote, I can control the switch with RFlink using the following commands (no matter if the command is ON or OFF, the switch only take into account the switch number):
10;EV1527;0dc21c;4;ON;
10;EV1527;0dc21c;1;ON;
10;EV1527;0dc21c;8;ON;
10;EV1527;0dc21c;2;ON;

However, the four buttons of the second remote control appear with the following in the Rflink:
20;07;TriState;ID=0a854a;SWITCH=1;CMD=OFF;
20;08;TriState;ID=0a854a;SWITCH=1;CMD=ON;
20;09;Eurodomest;ID=2ab03a;SWITCH=07;CMD=ON;
20;0A;Eurodomest;ID=2ab03a;SWITCH=05;CMD=OFF;

which is very different from the first one. I am wondering if this comes from a detection error from the RFlink (reception quality) or if the remote is really different)? The wall switch does not have any problem to learn these codes and I can control the switch. However, none of the following commands from the Rflink work:
10;TriState;0a854a;1;OFF;
10;TriState;0a854a;1;ON;
10;Eurodomest;2ab03a;7;ON;
10;Eurodomest;2ab03a;5;OFF;

The switch can also learn codes directly from the RFlink like:
10;EV1527;0000100;1;ON;
10;EV1527;0000100;2;OFF;
and this works perfectly.

So, my question is: Is it possible to create a switch in HA using the Rflink platform and use arbitraries RFlink commands (like the previous ones) to control the ON and OFF of the wall switch? Something like the command_on and command_off payloads that exist for other platforms.

I’m also wondering if using a Broadlink RM-Pro gateway and TC2 switches would not be a better or easiest solution (even if it is more expensive)?

Sorry for the length of my post :slight_smile:, but any help will be highly appreciated as I could not find any help in the forum (or I missed it).

Thanks for your help.

this is indeed a problem of RFLink.
Protocols for the EV1527 and the PT2262 (Eurodomest, TriState) are exactly the same, but the meaning of the bits is different. With some statistical analysis you might be able to guess which protocol is used, but there’s absolutely no guarantee at all.
Then there’s a second problem with RFLink, it’s not open source anymore (at least the owners refuse to deliver the recent sources).
As I wanted to use RFLink on an ESP8266 or ESP32, I had to rewrite the whole program, you can find it in GitHub. Today I’ll release a new version that can communicate through MQTT, which makes interfacing with Home Assistant much easier.

cheers, Stef

2 Likes

Thanks for your answer. The wall switches I have are sold to be using the EV1527 protocol. I was also able to make the switch learn some code directly sent from a RFlink console (using minicom). Something like:

10;EV1527;0000100;1;ON; sent when the switch is in learning mode (for the turn on command for example).

perfectly works and I can control the switch using this command from the RFlink. I would like to do to avoid buying as many remote controls as the number of switches. So my problem is how can I manually create a new device in HA (maybe adding it to the known_devices file and then to the switch section?), or how to send a given RFlink command from HA. I saw that there is a rflink.send_command service, but I could not figure out what is the format of the service data field.

I already saw various MQTT / RFlink related projects on Github. Can you share the link to your project on Github to see if I can use it?

Thanks for your help.