Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codes decoded with ReceiveDemo_Advanced seem to be incomplete and do not work when used for sending #510

Open
aenglert42 opened this issue May 17, 2024 · 3 comments

Comments

@aenglert42
Copy link

aenglert42 commented May 17, 2024

I have a rc switch with auto code learning + remote control that I want to use to control using an "Arduino" (acutally an Elegoo Uno R3 which is a cheap Arduino UNO copy) with the sender of this transmitter module. I'm using it with 5V and the transmitting distance is less than 10cm.
The rc switch is already set up to turn on and off with button A on and A off of the remote and responds to the control's commands accordingly.

Using ReceiveDemo_Simple.ino on the "Arduino" with the receiver module, shows the following output:

// pressed button A on
Received 2661182867 / 32bit Protocol: 2
Received 2661182867 / 32bit Protocol: 2
// pressed button A off
Received 1224304851 / 32bit Protocol: 2
Received 1224304851 / 32bit Protocol: 2

I receive a 32 bit number twice per button press.

Using ReceiveDemo_Advanced.ino on the "Arduino" with the receiver module to decode the remote, shows the following output once per button press. I recorded multiple times and those are the most common results in about 9 out of 10:

Button A on:

Decimal: 2661182867 (32Bit) Binary: 10011110100111100110110110010011 Tri-State: not applicable PulseLength: 694 microseconds Protocol: 2
Raw data: 6960,1420,552,436,1532,436,1540,1412,548,1416,568,1408,548,1424,544,428,1548,1404,552,436,1532,436,1528,1428,540,1428,548,1420,548,1420,548,440,1536,428,1540,1412,552,1416,580,408,1536,1420,548,1424,540,448,1524,1424,548,1416,560,432,1532,436,1544,1404,556,432,1536,436,1544,1404,556,1420,580,

Button A off:

Decimal: 1224304851 (32Bit) Binary: 01001000111110010110100011010011 Tri-State: not applicable PulseLength: 696 microseconds Protocol: 2
Raw data: 6968,436,1532,1416,556,428,1536,440,1524,1428,540,444,1528,440,1528,436,1524,1428,540,1428,544,1420,556,1412,560,1412,552,432,1532,440,1528,1420,552,432,1544,1412,540,1432,540,444,1524,1424,540,448,1544,416,1536,436,1536,1416,548,1420,552,436,1532,1416,556,436,1524,452,1520,1428,540,1424,556,

Because as stated above with ReceiveDemo_Simple I reveived two signals after one button press, I guess the number of transmission repetitions should be 2. When using this together with the other extracted values in a sketch based on SendDemo on a second "Arduino" with a sender module like:

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {

  Serial.begin(9600);

  pinMode(LED_BUILTIN, OUTPUT);
  
  // Transmitter is connected to Arduino Pin #10  
  mySwitch.enableTransmit(10);
  
  // // Optional set protocol (default is 1, will work for most outlets)
  mySwitch.setProtocol(2);

  // // Optional set pulse length.
  mySwitch.setPulseLength(695);
  
  // // Optional set number of transmission repetitions.
  mySwitch.setRepeatTransmit(2);
  
}

void loop() {

  /* Same switch as above, but using decimal code */
  Serial.print("Decimal on.\n");
  digitalWrite(LED_BUILTIN, HIGH);
  mySwitch.send(2661182867, 32);
  delay(5000);
  Serial.print("Decimal off.\n");
  digitalWrite(LED_BUILTIN, LOW);
  mySwitch.send(1224304851, 32);
  delay(5000);
  
   /* Same switch as above, but using binary code */
  Serial.print("Binary on.\n");
  digitalWrite(LED_BUILTIN, HIGH);
  mySwitch.send("10011110100111100110110110010011");
  delay(5000);
  Serial.print("Binary off.\n");
  digitalWrite(LED_BUILTIN, LOW);
  mySwitch.send("01001000111110010110100011010011");
  delay(5000);
}

I would have assumed that the rc switch should toggle between on and off every 5 seconds. However nothing happens. I also don't receive anything on the serial output of my receiver (neither with ReceiveDemo_Simple nor with ReceiveDemo_Advanced).
Commenting out mySwitch.setRepeatTransmit(2); leads to the receiver receiving via ReceiveDemo_Advanced 4, via ReceiveDemo_Advanced 2 equal signals every 5 seconds, alternating between 2661182867 and 1224304851 after each time span. So that seems kind of good, but the switch does not do anything.
Output of Receive_Demo_Advanced when recording the signal emitted by my "Arduino" with sender module:

Decimal: 2661182867 (32Bit) Binary: 10011110100111100110110110010011 Tri-State: not applicable PulseLength: 702 microseconds Protocol: 2
Raw data: 7044,1380,748,684,1444,688,1432,1384,740,1388,736,1396,728,1396,728,692,1432,1392,732,700,1424,696,1428,1400,720,1396,724,1396,728,1396,728,684,1436,684,1440,1384,728,1392,728,676,1440,1380,736,1388,728,688,1432,1384,728,1388,732,688,1424,692,1420,1388,732,688,1424,688,696,1416,1392,720,1396,

Decimal: 2661182867 (32Bit) Binary: 10011110100111100110110110010011 Tri-State: not applicable PulseLength: 703 microseconds Protocol: 2
Raw data: 7040,1388,740,692,1432,692,1432,1396,728,1400,728,1392,732,1396,724,696,1432,1392,736,688,1432,692,1432,1388,732,1392,728,1392,732,1388,728,696,1428,692,1428,1380,740,1392,724,688,1428,1392,728,1392,720,696,1428,1388,68,48,84,68,16,56,48,80,112,28,288,44,208,24,928,16,244,

Decimal: 1224304851 (32Bit) Binary: 01001000111110010110100011010011 Tri-State: not applicable PulseLength: 703 microseconds Protocol: 2
Raw data: 7044,684,1444,1384,740,684,1444,684,1440,1384,740,688,1436,688,1436,688,1436,1384,732,1392,728,1396,732,1388,728,1396,728,692,1428,696,1424,1396,724,692,1428,1396,720,1396,732,688,1424,1400,720,692,1424,696,1416,700,1428,1392,720,1396,720,692,1424,1392,724,684,1432,688,1424,1392,724,1388,724,

Decimal: 1224304851 (32Bit) Binary: 01001000111110010110100011010011 Tri-State: not applicable PulseLength: 703 microseconds Protocol: 2
Raw data: 7044,688,1436,1392,732,692,1436,696,1432,1388,732,696,1428,700,1424,696,1432,1392,728,1396,728,1392,732,1392,724,1396,736,680,1436,688,1432,1388,736,684,1432,1388,732,1388,728,696,1424,1384,732,692,1432,684,1424,696,1420,1400,716,1396,724,692,1424,96,16,56,60,24,100,612,20,76,72,

Using SimpleRcScanner.ino with the receiver "Arduino" leads to the following when pressing the remote button A alternating between on and off:

Remote 1st run button A on:

432,1044,424,316,1164,308,1168,308,1160,1048,432,308,1160,1052,424,312,1164,1044,432,1044,428,312,1168,308,1156,320,1160,312,1164,316,2256,1052,424,312,1160,316,1160,1048,432,308,1164,1044,428,1048,424,316,1160,312,1164,1048,428,1044,424,316,1168,308,1156,320,1152,1056,424,312,1160,1048,428,312,1160,1048,428,1048,424,312,1164,316,1156,316,1156,320,1160,320,2252,1052,428,312,1160,316,1156,1056,424,312,1156,1052,428,1048,424,312,1164,316,1160,1048,428,1044,424,316,1164,316,1152,320,1160,1048,420,320,1156,1052,424,312,1156,1056,428,1044,428,312,1164,308,1164,312,1164,312,1164,316,2256,1052,420,320,1152,320,1156,1056,420,320,1152,1056,428,1044,424,316,1160,312,1160,1056,420,1052,420,320,1156,316,1156,324,1152,1052,424,316,1156,1056,424,316,1156,1052,420,1052,424,316,1164,308,1164,312,1156,320,1164,316,2260,1048,424,316,1160,312,1156,1056,420,320,1156,1052,424,1048,424,316,1164,308,1164,1048,424,1052,424,316,1160,312,1160,316,1156,1052,424,320,1156,1048,432,308,1156,1056,428,1044,428,312,1160,312,1160,316,1160,312,1280,432,6968,1424,548,440,1528,444,1528,1424,548,1424,548,1424,552,1420,544,448,1524,1428,544,444,1528,440,1528,1428,544,1428,544,1424,548,1424,548,440,1532,440,1532,1424,548,1424,548,440,1532,1424,548,1424,544,444,1528,1424,552,1420,552,436,1532,440,1528,1424,552,440,1528,444,1528,1424,548,1428,556,436,6968,1420,548,440,1536,436,1532,1424,548,1424,548,1420,556,1416,548,440,1532,1424,548,436,1544,432,1540,1412,552,1420,552,1424,548,1420,552,436,1532,440,1528,1424,556,1416,556,432,1536,1420,552,1420,556,432,1536,1420,548,1424,556,432,1532,440,1524,1428,552,436,1536,436,1532,1420,552,1420,556,440,6968,1424,548,440,1532,440,1532,1420,556,1416,548,1424,548,1424,556,432,1540,1416,544,440,1536,440,1524,1428,552,1420,552,1416,556,1416,552,436,1536,436,1532,1424,548,1424,556,432,1532,1416,564,1408,564,424,1552,1404,564,1408,564,424,1544,428,1548,1408,568,424,1536,432,1540,1416,560,1412,572,420,6980,1412,556,432,1544,428,1536,1424,552,1416,556,1416,552,1420,552,432,1544,1412,556,432,1540,432,1540,1416,552,1420,552,1420,548,1424,548,436,1532,440,1536,1420,552,1416,560,428,1536,1416,556,1420,552,436,1532,1420,556,1416,556,432,1536,436,1532,1420,556,432,1536,436,1536,1416,556,1416,644,312,2256,1056,424,316,1156,316

Remote 2nd run button A on:

428,1048,428,308,1164,312,1168,308,1160,312,1172,308,2276,1032,440,300,1176,296,1176,1036,432,1044,436,300,1176,300,1164,1044,440,300,1180,1028,444,1028,448,1028,444,1028,452,288,1180,296,1184,1024,448,292,1184,292,1176,1032,444,1028,452,288,1180,296,1180,292,1180,296,1176,304,2268,1040,444,292,1176,300,1176,1032,440,1036,440,296,1164,312,1164,1048,428,308,1168,1044,432,1040,440,1032,448,1028,444,292,1180,296,1172,1040,428,312,1160,312,1160,1052,424,1052,420,316,1156,320,1152,320,1172,304,1168,312,2256,1048,440,300,1176,296,1176,1032,444,1032,444,296,1176,296,1172,1040,428,312,1160,1048,432,1044,432,1040,432,1040,440,300,1180,292,1180,1028,444,296,1180,296,1176,1032,444,1028,448,292,1184,292,1176,296,1184,292,1188,292,2276,1032,448,288,1184,292,1184,1024,448,1024,452,288,1184,288,1184,1028,448,292,1184,1024,448,1024,456,1020,444,1032,436,300,1184,292,1180,1028,456,280,1180,296,1184,1024,448,1024,456,284,1184,288,1188,288,1184,292,1188,292,2280,1024,460,280,1184,288,1192,1020,448,1024,456,280,1192,284,1196,1016,452,288,1188,1020,452,1024,448,1024,452,1024,448,292,1188,284,1188,1020,456,284,1184,288,1196,1016,448,1024,452,288,1192,280,1188,288,1180,296,1296,412,6992,1400,568,1404,572,416,1556,1396,576,412,1556,1400,572,416,1552,420,1548,1404,568,420,1556,416,1544,1412,564,1404,572,1400,572,416,1552,1404,564,1408,568,1400,564,1408,556,1416,560,1412,568,416,1548,1408,560,428,1548,1404,572,1400,568,420,1544,1412,548,440,1536,436,1536,1416,560,1408,576,416,6992,1400,568,1400,572,420,1552,1400,572,416,1556,1396,572,416,1560,416,1552,1400,576,412,1560,412,1552,1400,568,1404,572,1396,576,416,1552,1404,560,1408,568,1404,568,1400,568,1404,576,1396,572,416,1552,1404,564,424,1556,1396,572,1400,572,416,1556,1396,576,412,1560,412,1560,1396,572,1400,576,416,6992,1400,576,1392,584,404,1560,1396,576,408,1572,1384,588,400,1568,404,1568,1388,584,404,1568,400,1568,1388,580,1388,588,1388,584,400,1572,1384,580,1392,576,1396,572,1396,584,1388,576,1396,584,404,1564,1388,580,408,1568,1388,584,1388,572,416,1556,1400,572,416,1560,412,1556,1396,580,1392,588,404,7000,1396,572,1400,564,424,1548,1408,560,428,1544,1408,568,420,1552,420,1548,1408,564,424,1540,432,1540,1412,560,1412,564,1408,556,428,1548,1408,568,1400,572,1400,576,1396,572

Remote 3rd run button A on:

552,1420,544,1428,544,1424,548,1428,548,1420,548,444,1528,1420,548,440,1540,1416,548,1420,556,436,1532,1420,552,440,1528,440,1532,1420,548,1424,556,440,6964,1424,552,1420,548,440,1528,1424,552,440,1532,1420,544,444,1532,436,1532,1420,548,440,1536,440,1528,1424,544,1428,544,1428,540,448,1528,1424,544,1428,552,1420,548,1420,548,1424,548,1424,548,440,1532,1424,548,440,1536,1420,544,1424,548,440,1532,1424,552,432,1532,440,1532,1424,548,1424,552,440,6968,1428,544,1424,548,440,1536,1416,552,436,1536,1420,544,444,1528,444,1532,1424,544,444,1528,440,1528,1428,544,1428,540,1428,556,432,1532,1424,548,1420,552,1424,548,1424,544,1424,548,1424,548,440,1528,1424,548,440,1536,1416,556,1420,548,436,1532,1424,548,440,1532,440,1532,1424,544,1428,632,320,2256,1052,424,316,1156,316,1160,1052,424,1048,432,308,1160,316,1156,320,1152,320,1156,1052,424,316,1160,316,1156,1048,428,1048,428,312,1164,1044,424,316,1156,1052,432,308,1160,312,1160,316,1160,316,1152,320,1160,316,1160,316,2252,1056,420,320,1156,316,1160,1052,420,1052,424,316,1156,320,1156,316,1152,324,1148,1060,420,316,1164,312,1156,1052,420,1056,420,316,1164,1048,420,316,1160,1052,420,316,1160,316,1152,324,1152,320,1156,320,1148,324,1160,320,2252,1056,416,320,1156,320,1152,1056,420,1056,432,304,1152,324,1152,324,1152,320,1152,1056,416,324,1152,324,1152,1056,416,1056,420,320,1152,1056,420,320,1152,1056,420,320,1156,316,1156,320,1152,320,1156,320,1156,320,1156,324,2248,1056,412,328,1152,324,1156,1048,424,1052,420,320,1156,320,1152,320,1152,320,1156,1056,416,324,1152,320,1152,1056,416,1060,420,320,1152,1052,424,320,1152,1056,420,316,1160,316,1152,324,1152,320,1156,320,1148,324,1156,324,2252,1056,420,320,1152,320,1156,1052,420,1052,428,312,1156,320,1156,320,1152,324,1148,1052,428,312,1160,316,1152,1056,424,1048,424,316,1160,1048,424,316,1160,1048,432,308,1168,304,1164,312,1164,312,1160,312,1160,316,1160,320,2252,1052,428,312,1152,324,1160,1048,424,1048,424,316,1160,316,1156,316,1160,316,1156,1048,428,316,1152,320,1156,1056,416,1056,420,320,1160,1048,420,320,1152,1056,424,316,1156,316,1164,312,1156,320,1156,316,1156,316,1268,444,6972,1424,548,440,1528,444,1528,1424,548,1424,544,1428,552,1420,540,444,1528,1428,544,444,1524,448,1524,1428,548,1424,544,1428,544,1428,544,444,1524,448

Remote 1st run button A off:

548,440,1528,1432,540,448,1528,1428,544,444,1528,1424,548,1424,548,440,1532,440,1536,440,1528,1428,548,1424,544,444,1524,448,1532,1424,544,1428,544,444,1532,440,1528,444,1532,1424,552,436,1532,440,1524,1432,540,448,1532,444,1532,1420,548,1424,552,440,6972,1428,552,1420,544,444,1528,444,1528,1428,548,440,1532,1424,552,440,1528,1424,548,440,1532,1424,548,1424,548,440,1524,452,1528,444,1528,1424,544,1428,548,444,1528,440,1528,1428,544,1428,548,440,1528,444,1528,448,1532,1424,540,444,1528,444,1536,1420,552,436,1532,440,1536,1424,544,1428,556,436,6968,1428,548,1424,544,444,1528,444,1528,1428,548,440,1528,1428,544,444,1528,1432,540,448,1528,1424,552,1420,552,440,1528,444,1524,448,1524,1432,544,1428,552,436,1528,444,1524,1432,544,1428,544,444,1528,444,1532,436,1528,1432,544,444,1528,444,1528,1424,540,452,1524,448,1528,1428,540,1428,652,316,2252,1052,420,320,1156,320,1160,1052,420,1052,416,328,1152,1056,424,1048,424,320,1152,320,1152,324,1156,1052,424,316,1160,1048,420,1056,424,1052,424,1052,428,312,1152,320,1156,1056,424,316,1152,320,1160,316,1152,320,1160,320,2256,1052,420,320,1160,316,1156,1052,420,1056,424,316,1156,1052,420,1056,416,324,1156,316,1156,320,1156,1052,424,316,1156,1056,420,1052,424,1048,428,1048,424,316,1160,316,1160,1052,420,320,1152,320,1152,324,1152,320,1164,316,2264,1048,428,312,1160,312,1156,1056,420,1056,420,316,1164,1048,428,1048,424,316,1156,316,1156,320,1156,1056,420,316,1156,1056,420,1052,420,1056,420,1056,424,312,1160,316,1156,1056,420,320,1152,324,1152,320,1160,316,1168,312,2252,1056,420,320,1156,316,1160,1048,428,1052,420,316,1160,1052,424,1048,424,316,1156,320,1152,324,1152,1052,428,316,1156,1052,424,1052,416,1056,424,1048,428,312,1160,316,1160,1048,432,304,1168,308,1164,312,1164,312,1168,312,2264,1044,436,300,1164,312,1164,1048,428,1044,432,308,1168,1044,428,1044,432,308,1168,312,1160,312,1160,1052,428,312,1156,1052,428,1044,428,1048,428,1048,428,308,1164,312,1168,1040,432,308,1168,308,1164,312,1160,316,1164,316,2256,1052,428,312,1160,316,1156,1052,428,1044,424,316,1168,1040,436,1040,428,312,1160,316,1164,312,1156,1056,420,320,1156,1052,420,1052,428,1048,424,1052,420,316,1164,312,1160,1048,428,312,1164,312,1160,316,1164,308,1272,444,6968,444,1524,1428,552,436,1532,440,1532,1424,552

Remote 2nd run button A off:

540,448,1528,444,1528,1428,548,440,1528,444,1528,444,1528,1428,540,1432,540,1432,548,1424,540,1432,544,444,1528,444,1528,1428,544,444,1528,1428,544,1428,544,448,1528,1428,544,444,1528,444,1524,448,1524,1432,544,1428,548,440,1536,1420,544,444,1532,444,1524,1432,540,1432,548,444,6964,448,1532,1420,548,444,1528,444,1524,1432,544,448,1520,448,1524,448,1528,1428,544,1428,548,1424,544,1428,544,1428,544,444,1532,440,1524,1432,548,444,1520,1432,544,1424,548,444,1528,1428,544,444,1532,440,1528,444,1528,1428,548,1424,544,448,1520,1432,548,440,1532,440,1528,1428,548,1420,648,316,2260,1052,424,316,1156,316,1156,1056,416,320,1156,1056,416,324,1152,324,1152,1052,424,316,1156,320,1156,1052,424,316,1156,320,1152,1056,420,1056,412,328,1160,316,1152,320,1160,1052,416,320,1160,316,1152,320,1156,320,1160,316,2256,1056,424,316,1152,320,1160,1052,416,324,1152,1056,416,324,1152,324,1152,1056,420,320,1156,316,1152,1060,420,320,1152,324,1152,1056,420,1056,416,324,1152,320,1156,320,1152,1056,416,328,1148,324,1152,320,1152,324,1164,316,2256,1052,420,320,1152,320,1156,1056,416,324,1148,1060,420,320,1152,324,1148,1060,412,328,1152,320,1152,1060,416,324,1156,316,1160,1052,420,1052,424,316,1152,324,1152,324,1148,1060,420,320,1156,316,1152,324,1152,324,1156,324,2248,1056,420,320,1156,320,1152,1060,412,324,1152,1060,424,316,1152,320,1148,1064,416,320,1156,320,1152,1060,416,320,1156,320,1148,1060,420,1052,424,320,1156,316,1160,316,1156,1056,420,316,1156,320,1156,320,1152,320,1156,324,2252,1056,424,316,1152,324,1160,1048,420,320,1152,1056,420,320,1152,324,1156,1052,420,320,1148,328,1152,1056,416,324,1152,324,1148,1060,420,1056,420,320,1156,316,1152,324,1152,1060,416,320,1152,324,1152,324,1152,324,1156,320,2252,1056,420,320,1152,324,1152,1060,416,320,1152,1060,416,320,1152,324,1148,1064,412,328,1152,320,1148,1064,412,324,1152,320,1156,1052,424,1052,428,308,1164,312,1164,312,1172,1040,424,312,1164,316,1156,316,1156,320,1268,444,6968,1428,544,1424,548,444,1532,440,1532,1424,544,444,1528,1428,544,444,1524,1432,544,444,1528,1428,544,1424,552,436,1528,444,1536,440,1528,1424,544,1428,544,448,1528,444,1524,1428,556,1416,544,444,1528,444,1532,444,1528,1428,540,444,1528,444,1528,1432,540,444,1528,444,1528,1428,548,1424,552,444,6964,1432,544,1428,544,448

Remote 3rd run button A off:

1156,316,1156,320,1164,1044,420,1056,428,1044,424,316,1160,1052,424,316,1156,1052,424,316,1156,320,1156,320,1164,312,1152,320,1160,320,2252,1056,424,316,1160,316,1156,1056,420,1048,432,1044,424,316,1156,1056,416,324,1156,320,1148,328,1152,320,1156,1052,428,1048,420,1056,416,320,1160,1052,424,316,1160,1048,428,312,1156,320,1156,316,1164,312,1156,320,1168,312,2252,1056,420,320,1156,320,1152,1056,420,1056,420,1052,420,320,1156,1052,424,316,1156,320,1156,320,1152,320,1156,1056,420,1056,416,1056,420,320,1156,1052,424,316,1156,1052,424,316,1156,316,1160,320,1152,324,1152,320,1156,324,2248,1060,416,324,1152,320,1160,1052,424,1048,420,1056,416,324,1152,1056,420,320,1160,316,1152,324,1152,320,1156,1056,416,1060,412,1064,412,324,1156,1056,420,316,1156,1056,420,316,1156,320,1156,320,1152,324,1152,320,1156,324,2256,1056,424,312,1152,324,1160,1048,420,1056,424,1048,420,320,1160,1052,420,316,1156,320,1156,320,1156,320,1152,1056,420,1056,424,1052,416,320,1156,1056,420,320,1156,1056,424,312,1156,316,1160,316,1160,316,1156,320,1160,320,2252,1056,420,320,1156,320,1152,1060,416,1056,416,1060,416,324,1156,1052,424,316,1160,316,1156,316,1160,316,1164,1048,420,1056,416,1060,420,316,1152,1060,416,324,1148,1064,420,316,1156,320,1156,316,1156,320,1156,320,1268,444,6972,1424,540,1432,540,448,1524,448,1524,1428,544,448,1532,1420,548,440,1528,1428,544,448,1524,1432,540,1428,548,444,1524,448,1524,444,1528,1428,544,1428,548,440,1528,444,1528,1432,540,1428,544,448,1524,448,1524,444,1528,1428,548,440,1532,440,1532,1424,548,440,1532,444,1528,1428,540,1428,556,440,6972,1424,544,1428,540,448,1528,444,1524,1432,540,448,1528,1428,540,452,1524,1428,540,448,1532,1424,544,1428,544,448,1532,436,1536,440,1528,1428,544,1428,544,444,1528,444,1528,1428,544,1428,548,440,1536,436,1532,444,1524,1432,544,444,1536,440,1524,1428,548,444,1528,440,1532,1424,552,1416,564,432,6976,1424,552,1420,556,432,1536,436,1532,1424,552,436,1536,1420,556,436,1536,1420,548,440,1532,1424,552,1420,548,440,1532,440,1532,440,1536,1420,552,1420,552,436,1536,436,1544,1416,552,1420,548,440,1536,436,1532,440,1532,1424,548,440,1532,440,1532,1424,548,440,1532,440,1532,1424,552,1424,548,444,6976,1420,548,1424,548,444,1528,444,1528,1428,544,448,1524,1432,544,444,1532,1420,548,444,1528

From the Arduino with sender module I capture:

728,1392,728,696,1424,696,1424,1396,724,1396,720,696,1424,1396,720,1396,724,692,1428,1392,724,1392,724,688,1428,688,1428,1388,728,692,1424,688,1424,1384,732,1384,724,692,7040,1388,740,684,1440,684,1440,1388,740,1384,740,1388,736,1384,740,692,1432,1392,732,688,1432,688,1436,1388,736,1388,744,1376,740,1380,744,676,1436,684,1436,1384,736,1380,744,680,1436,1376,744,1376,740,680,1436,1384,732,1384,732,680,1436,680,1432,1384,740,672,1444,672,1440,1376,740,1372,740,672,7052,1384,740,680,1448,680,1452,1376,748,1376,748,1376,748,1376,748,680,1444,1376,748,676,1444,680,1444,1372,748,1380,740,1380,744,1376,744,676,1444,676,1448,1372,744,1376,744,672,1448,1372,744,1372,748,672,1440,1372,748,1372,744,672,1440,676,1440,1380,736,676,1436,676,1436,1380,736,1376,736,676,7056,1372,752,680,1448,680,1444,1380,744,1380,748,1376,744,1384,748,672,1452,1372,752,668,1452,672,1448,1376,748,1372,748,1376,744,1372,748,680,1444,676,1440,1380,740,1376,744,676,1440,1380,736,1380,744,672,1444,1372,744,1372,744,672,1444,672,1444,1372,740,676,1440,676,1436,1372,744,1372,740,676,7056,1372,752,672,1456,676,1448,1372,752,1376,748,1376,748,1372,752,680,1444,1380,744,676,1448,676,1444,1380,748,1372,748,1372,748,1372,748,672,1448,672,1448,1372,748,1368,752,672,1444,1372,744,1380,736,680,1440,1376,740,1376,740,676,1440,672,1448,1368,744,672,1444,668,1444,1372,740,1372,744,672,7052,1380,748,672,1460,668,1456,1372,752,1372,752,1376,748,1372,752,676,1448,1372,752,676,1444,676,1448,1376,744,1380,740,1380,744,1376,740,680,1444,676,1448,1372,748,1368,748,672,1448,1368,748,1372,744,676,1440,1372,744,1372,744,676,1440,676,1440,1376,740,672,1440,676,1440,1376,736,1376,736,676,7052,1376,752,676,1452,676,1448,1380,744,1380,744,1380,744,1380,752,672,1452,1372,748,672,1452,672,1452,1368,752,1372,748,1372,748,1372,748,676,1444,676,1444,1380,740,1376,740,676,1444,1376,740,1376,748,668,1448,1372,748,1368,748,664,1448,668,1448,1368,748,672,1440,672,1444,1368,744,1368,744,672,7060,1372,752,672,1456,672,1452,1372,756,1368,756,1368,756,1372,752,672,1448,1376,748,676,1448,672,1452,1372,752,1368,752,1368,752,1372,752,664,1452,676,1444,1372,748,1368,748,676,1444,1368,748,1376,744,672,1444,1376,740,1372,744,672,1444,672,1444,1372,744,668,1448,668,1444,1372,744,1368,740,676

When visualizing the raw data with https://test.sui.li/oszi/ i get:
Remote on:
grafik
Remote off:
grafik
Arduino with sender module:
grafik
Unlike in the picture of Add_New_Remote_Part_1 the common part of the signals seems to be at the end. If i compare it against the raw data that i got from the Arduino with the sender it does not match. The signal produced by the Arduino is also shorter than the ones produced by the remote.
As an additional observation I also noticed that I receive different data when pressing one button repeatedly without alternating between on or off.

//on
14:16:36.752 -> Received 2661182867 / 32bit Protocol: 2
14:16:36.859 -> Received 2661182867 / 32bit Protocol: 2
//on
14:16:37.756 -> Received 3567123155 / 32bit Protocol: 2
14:16:37.899 -> Received 3567123155 / 32bit Protocol: 2
//on
14:16:39.104 -> Received 2661182867 / 32bit Protocol: 2
14:16:39.218 -> Received 2661182867 / 32bit Protocol: 2
//on
14:16:40.226 -> Received 3567123155 / 32bit Protocol: 2
14:16:40.365 -> Received 3567123155 / 32bit Protocol: 2
//off
14:16:42.486 -> Received 3400636563 / 32bit Protocol: 2
14:16:42.626 -> Received 3400636563 / 32bit Protocol: 2
//off
14:16:43.675 -> Received 1224304851 / 32bit Protocol: 2
14:16:43.826 -> Received 1224304851 / 32bit Protocol: 2
//off
14:16:44.785 -> Received 3400636563 / 32bit Protocol: 2
14:16:44.924 -> Received 3400636563 / 32bit Protocol: 2
//off
14:16:45.928 -> Received 1224304851 / 32bit Protocol: 2
14:16:46.096 -> Received 1224304851 / 32bit Protocol: 2

The visualization of the raw data I got via ReceiveDemo_Advanced is shorter than the one via SimpleRcScanner and seems to be incomplete.
Above SimpleRcScanner, below ReceiveDemo_Advanced:
grafik

@Elitesniper06
Copy link

Elitesniper06 commented May 18, 2024

The example ReceiveDemo_Simple.ino doesn't work for me and I have the same module. What did you do to make it work?

@aenglert42
Copy link
Author

aenglert42 commented May 22, 2024

The example ReceiveDemo_Simple.ino doesn't work for me and I have the same module. What did you do to make it work?

I just uploaded it to my Arduino Uno. Make sure to connect the receiver's data pin (one of the two pins in the middle, I think it does not matter which of em) to pin 2 of the Arduino. Maybe check the wiki.
Maybe use the remote as close as possible to the receiver.

Maybe your remote is not known to the library. Then you can try to add it (see here and there).

@aenglert42
Copy link
Author

aenglert42 commented May 29, 2024

It appears that the decoding of the original rcswitch library did not work propperly in my case.

However ProtocolAnalyzeDemo.ino from Martin-Laclaustra's fork protocollessreceiver branch did the trick for me. It showed me that it was actually 24bit and Protocol 4 instead of 32bit and Protocol 2. The codes themselves were also different.

As an additional observation I also noticed that I receive different data when pressing one button repeatedly without alternating between on or off.

I learned that some remotes cycle through codes. In my case they would repeat after four subsequent button presses. They are organized in pairs (an on code and an off code). It seems to be important to use the corresponding codes from one of the four pairs. While recording I just pressed button A on and then button A off to make sure I have the matching code pair. I can now use them for turning my rc switch on and off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants