Order your CHACON 433MHZ switch, via ARDUINO UNO (TUTO)

Good morning all,

First tutorial which I hope can be used by other people!

It is an adaptation of How to make a $4 RFLink for 433MHz home automation! – CWESystems and domo-attitude.fr.
This will allow RFLINK (433MHZ) to be used via Home Assistant on a Arduino Uno (and not Arduino Mega) to control CHACON (DIO) sockets.

Arduino Uno (and not a mega!)
3 CHACON sockets (model n ° 54798)
1 black remote control for CHACON socket
1 Raspberry PI4, 4GB (and an SD card of course).
1 FS1000A 433mhz transmitter (with a soldered electric wire for the antenna)
1 XY-MK-5V 433mhz receiver (with a soldered electric wire for the antenna)
Cables of course.

For the remote control, very useful information hidden behind the black plastic: two additional functions: ALL ON and ALL OFF. You just need to peel off and shift the black plastic a little to make these functions work and retrieve the codes generated (see continuation of the tutorial).

1. ARDUINO and Emitter / Receiver mounting

We will start with the wiring, taking as a basis the tutorial from How to make a $4 RFLink for 433MHz home automation! – CWESystems (with my thanks in passing).
I used another transmitter and another receiver than those offered (1 FS1000A 433mhz transmitter and 1 XY-MK-5V 433mhz receiver).
I noticed that the TX and RX PINs used do not work very well. The wiring must therefore be modified as follows:

  • Receiver Pin 5 (DATA) on ARDUINO PIN 10 (and not ARDUINO PIN RX 0)
  • PIN 2 transmitter (DATA) on ARDUINO PIN 11 (and not ARDUINO PIN TX 1)

2. load the RFLINK programs into the ARDUINO-Transmitter / Receiver assembly

Connect your ARDUINO-Emitter / Receiver assembly to your PC.
Download RFLINK loader via RFLink Gateway - HomeAutomation.
Be sure to use the explanations given by How to make a $4 RFLink for 433MHz home automation! – CWESystems for loading the RFLINK program.
Attention, as we have changed the wiring initially proposed, we must also change part of the code in “RFLink.ino” as follows:

#define PIN_RF_TX_VCC 2
#define PIN_RF_TX_DATA 11
#define PIN_RF_RX_VCC 3
#define PIN_RF_RX_DATA 10

Disable as many plugins as possible in the “Config_01.c” file because it is by limiting them that you can put the RFLINK program in an Arduino Uno. For this tutorial, let’s only keep the plugins for CHACON (Kaku and Newkaku).

3. Test RFLINK and the ARDUINO-Emitter/Receiver assembly

We will follow the “wake up your RFLINK” part of domo-attitude.fr.
Once your RFLINK is started, click on the buttons on the CHACON remote control and you will see codes appear such as:

20; 01; NewKaku; ID = 00b4a6c6; SWITCH = 1; CMD = ON;
20; 02; NewKaku; ID = 00b4a6c6; SWITCH = 1; CMD = OFF;

These are the reception codes.

We will now test the transmitter. The subtlety is that the code issued will be slightly different from the code received. You have to remove the two “00” in front of “ID =” for it to work in transmission. Enter step by step the following codes in RFLINK LOADER part “Command to send”.

10; NewKaku; b4a6c6; 01; ON;
10; NewKaku; b4a6c6; 01; OFF;

And if all goes well, your CHACON sockets should work ON and OFF!

3. install our ARDUINO-Transmitter/receiver assembly at HOME ASSISTANT.

I pass you the installation of HOME ASSISTANT on your RASPBERRY…
Connect your ARDUINO-Transmitter / receiver to your RASPBERRY.
You have to modify two files of your HOME ASSISTANT.

“Configuration.yaml” (add the codes below and adapt with your codes found in RFLINK LOADER as well as your port address if necessary):

  port: /dev/ttyACM0
  wait_for_ack: true
  reconnect_interval: 20

  - platform: rflink
      newkaku_b4a6c6_1: {}
      newkaku_b4a6c6_2: {}
      newkaku_b4a6c6_3: {}

“groups.yaml” → If you want to see your switch in loverlace (to be adapted for your parts)

    name: salon lumières
     - switch.newkaku_b4a6c6_1
     - switch.newkaku_b4a6c6_2
     - switch.newkaku_b4a6c6_3

Relaunch your HOME ASSISTANT … and everything should work!

I hope these improvements will allow you to improve your home automation and your understanding of 433MHZ.

This tutorial can evolve if necessary!

Thanks to the forum team !

1 Like