BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Panel Remote Transmitter 3 Buttons

hello friends

I just received my 2 Panels Remote Transmitter w 3 Buttons (4$ each)

11-022401

and I disassembled them to place the long life battery (more than 2 years)

11-022402

the heart of the system is based on an EV127 IC

I decode with a RX433 module and Blynk code
11-022409

void receiver() {
 
  if (mySwitch.available()) {

    int value = mySwitch.getReceivedValue();
    if (value == 0) {
      Serial.print("Unknown encoding");
    } else {
      Serial.print("Received ");
      Serial.print( value );
         
      Blynk.virtualWrite(V20, "Received " + String(value));// blynk value widget
}

As you can see, this is the received codes for ABC buttons

11-022403

but as I am curious :smile: , I tried to press several buttons at the same time and this is the result :

A + B ----------- 1838826
B + C ----------- 1838828
A + C ----------- 1838822
A + B + C ------ 1838830

that is to say, 3 buttons can manage 7 relays !

so I looked more closely :blush:

http://www.sc-tech.cn/en/EV1527.pdf

interesting, no?

to be continued :smile:

7 Likes

This is really cool! Where did you buy the transmitters?

here

Hi Alexis, you could share the complete code for the use the Panels Remote Transmitter

Thank you

@gurues this is the 1st part: transmission

/***************** Library ESP and Blynk *****************/
#define BLYNK_PRINT Serial
#include <BlynkSimpleEsp8266.h>

/***************** Library for real-time clock *****************/
#include <TimeLib.h>
#include <WidgetRTC.h>

BlynkTimer timer;
WidgetRTC rtc;

/*************** Server *********************/
char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
char ssid[] = "xxxxxxxx";
char pass[] = "xxxxxxxxxxxxxxxxxx";
char server[] = "192, 168, 0, 1";
IPAddress arduino_ip ( 192,  168,   0,  56);
IPAddress dns_ip     (  8,   8,   8,   8);
IPAddress gateway_ip ( 192,  168,   0,   254);
IPAddress subnet_mask(255, 255, 255,   0);
bool isFirstConnect = true;

/*************** LEDS *********************/
WidgetLED led1(10); //virtual led button A
WidgetLED led2(11);//virtual led button A
WidgetLED led3(12);//virtual led button B
WidgetLED led4(13);//virtual led button B
WidgetLED led5(14);//virtual led button C
WidgetLED led6(15);//virtual led button C
WidgetLED led7(16);//virtual led button D
WidgetLED led8(17);//virtual led button D
WidgetLED led9(18);//virtual led button E
WidgetLED led10(19);//virtual led button E
WidgetLED blinkled(22); //virtual blink led

/*************** 433Mhz Settings ***************/
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();

#define PACKET_LENGTH 24 //length

#define SWITCH_1_ON   1361 // decimal code
#define SWITCH_1_OFF  1364

#define SWITCH_2_ON   4433
#define SWITCH_2_OFF  4436

#define SWITCH_3_ON   5201
#define SWITCH_3_OFF  5204

#define SWITCH_4_ON   5393
#define SWITCH_4_OFF  5396

#define SWITCH_5_ON   5441
#define SWITCH_5_OFF  5444

/*************** buttons ***************/
int BTNA, BTNB, BTNC, BTND, BTNE;

/*************** Setup *********************/
void setup()
{
  Serial.begin(115200);
  WiFi.config(arduino_ip, gateway_ip, subnet_mask);
  Blynk.begin(auth, ssid, pass, IPAddress(192, 168, 0, 1), 8088);


  /*************** Transmitter is connected to Arduino Pin #10 ***************/
  mySwitch.enableTransmit(15);//that is pin D8 nodemcu
  mySwitch.enableReceive(0);  // Receiver on interrupt 0 => that is pin D3 nodemcu
  //pinMode(0, INPUT_PULLUP);
  //attachInterrupt(digitalPinToInterrupt(0), receiver, CHANGE);

  // Optional set protocol (default is 1, will work for most outlets)
  // mySwitch.setProtocol(2);

  // Optional set pulse length.
  mySwitch.setPulseLength(320);

  // Optional set number of transmission repetitions.
  mySwitch.setRepeatTransmit(15);


  /*************** intialisation ***************/
  timer.setInterval(500, worktime); // flash led
  timer.setInterval(350L, receiver); // receiver to learn code
}

//-----------------------------------------------

/*************** buttons *********************/
BLYNK_WRITE(V0) {
  BTNA = param.asInt();
  if (BTNA == true) {
    Serial.println("BT A on");
    mySwitch.send(SWITCH_1_ON, PACKET_LENGTH);
    led1.on();
    led2.off();
  }
  else {
    Serial.println("BT A off");
    mySwitch.send(SWITCH_1_OFF, PACKET_LENGTH);
    led1.off();
    led2.on();
  }
}

BLYNK_WRITE(V1) {
  BTNB = param.asInt();
  if (BTNB == true) {
    Serial.println("BT B on");
    mySwitch.send(SWITCH_2_ON, PACKET_LENGTH);
    led3.on();
    led4.off();
  }
  else {
    Serial.println("BT B off");
    mySwitch.send(SWITCH_2_OFF, PACKET_LENGTH);
    led3.off();
    led4.on();
  }
}

BLYNK_WRITE(V2) {
  BTNC = param.asInt();
  if (BTNC == true) {
    Serial.println("BT C on");
    mySwitch.send(SWITCH_3_ON, PACKET_LENGTH);
    led5.on();
    led6.off();
  }
  else {
    Serial.println("BT C off");
    mySwitch.send(SWITCH_3_OFF, PACKET_LENGTH);
    led5.off();
    led6.on();
  }
}

BLYNK_WRITE(V3) {
  BTND = param.asInt();
  if (BTND == true) {
    Serial.println("BT D on");
    mySwitch.send(SWITCH_4_ON, PACKET_LENGTH);
    led7.on();
    led8.off();
  }
  else {
    Serial.println("BT D off");
    mySwitch.send(SWITCH_4_OFF, PACKET_LENGTH);
    led7.off();
    led8.on();
  }
}

BLYNK_WRITE(V4) {
  BTNE = param.asInt();
  if (BTNE == true) {
    Serial.println("BT E on");
    mySwitch.send(SWITCH_5_ON, PACKET_LENGTH);
    led9.on();
    led10.off();
  }
  else {
    Serial.println("BT E off");
    mySwitch.send(SWITCH_5_OFF, PACKET_LENGTH);
    led9.off();
    led10.on();
  }
}



void worktime() {
  if (blinkled.getValue()) {
    blinkled.off();
  } else {
    blinkled.on();
  }
}



void loop() {
  Blynk.run();
  timer.run();

}

void receiver() {

  if (mySwitch.available()) {

    int value = mySwitch.getReceivedValue();
    if (value == 0) {
      Serial.print("Unknown encoding");
    } else {
      Serial.print("Received ");
      Serial.print( value );
      Serial.print(" / ");
      Serial.print( mySwitch.getReceivedBitlength() );
      Serial.print("bit ");
      Serial.print("Protocol: ");
      Serial.println( mySwitch.getReceivedProtocol() );
}
2 Likes