Help decoding an 433Mhz signal from a blind remote

Hi!

Before anything, I have to say I’ve spent a good 14h researching this before turning to the forum. I hope someone here can give me some ideas.

I have a preinstalled remote control/blind motor for my blinds at home, and now I want to control that using an external device (ideally from an RPi, but I can do the Arduino->Rpi conversion by myself). Here’s all the information I have:

So far I have used an Arduino UNO R3 and a simple 433Mhz RF Kit (Transmitter and receiver) to try and sniff the code to actuate the blinds with no luck.

Here’s my sketch to sniff from digital input:

#define GND 2
#define VCC 5
#define DATA 3

void setup() {
  pinMode(GND, OUTPUT);
  pinMode(VCC, OUTPUT);
  pinMode(DATA, INPUT);
  digitalWrite(GND, LOW);
  digitalWrite(VCC, HIGH);

  Serial.begin(9600);
}

const int dataSize = 500;
void loop() {
  for(int i=0; i<dataSize; i=i+1){
    Serial.print(digitalRead(DATA));
  }
}

And here’s my sketch for sniffing through analog input:

/* 
  RF Remote Capture sketch 
     Written by ScottC 24 Jun 2014
     Arduino IDE version 1.0.5
     Website: http://arduinobasics.blogspot.com.au/2014/06/433-mhz-rf-module-with-arduino-tutorial_27.html
     Receiver: XY-MK-5V
     Description: Use Arduino to Receive RF Remote signal          
 ------------------------------------------------------------- */

 const int dataSize = 500;  //Arduino memory is limited (max=1700)
 byte storedData[dataSize];  //Create an array to store the data
 #define ledPin 13           //Onboard LED = digital pin 13
 #define rfReceivePin A0     //RF Receiver data pin = Analog pin 0
 const unsigned int upperThreshold = 100;  //upper threshold value
 const unsigned int lowerThreshold = 80;  //lower threshold value
 int maxSignalLength = 200;   //Set the maximum length of the signal
 int dataCounter = 0;    //Variable to measure the length of the signal
 unsigned long startTime=0;  //Variable to record the start time 
 unsigned long endTime=0;    //Variable to record the end time 
 unsigned long signalDuration=0; //Variable to record signal reading time
 

 void setup(){
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT);    
  
  /* The following code will only run ONCE --------------
  ---Press the reset button on the Arduino to run again-- */
  
  while(analogRead(rfReceivePin)<1){
      //Wait here until a LOW signal is received
      startTime=micros();  //Update start time with every cycle.  
  }
  digitalWrite(ledPin, HIGH);  //Turn LED ON
  
  
  //Read and store the rest of the signal into the storedData array
  for(int i=0; i<dataSize; i=i+2){
    
    //Identify the length of the LOW signal---------------LOW
    dataCounter=0; //reset the counter
    while(analogRead(rfReceivePin)>upperThreshold && dataCounter<maxSignalLength){
      dataCounter++;
    }
    storedData[i]=dataCounter;
    
    //Identify the length of the HIGH signal---------------HIGH
    dataCounter=0;//reset the counter
    while(analogRead(rfReceivePin)<lowerThreshold && dataCounter<maxSignalLength){
      dataCounter++;
    }
    storedData[i+1]=dataCounter;
    
    //Any readings between the two threshold values will be ignored.
    //The LOW or HIGH signal length must be less than the variable "maxSignalLength"
    //otherwise it will be truncated. All of the HIGH signals and LOW signals combined
    //must not exceed the variable "dataSize", otherwise it will be truncated.
    //The maximum number of signals is 1700 - if you try to extend this variable to a higher
    //number than 1700 - then the Arduino will freeze up and sketch will not work.
    //-------------------------------------------------------------
  }
  
  endTime=micros();  //Record the end time of the read period.
  signalDuration = endTime-startTime;
  
  digitalWrite(ledPin, LOW);//Turn LED OFF
  
  //Send report to the Serial Monitor
  Serial.println("=====================");
  Serial.print("Read duration: ");
  Serial.print(signalDuration);
  Serial.println(" microseconds");
  Serial.println("=====================");
  Serial.println("LOW,HIGH");
  delay(20);
  for(int i=0; i<dataSize; i=i+2){
    Serial.print(storedData[i]);
    Serial.print(",");
    Serial.println(storedData[i+1]);
    delay(20);
  }
 }

 void loop(){
   //Do nothing here
 }

So far none of my results yield any actions in the blinds, apart from creating what seems to be a lot of interference with the remote. I’ve followed multiple tutorials, the last one was this: https://arduinobasics.blogspot.com/2014/06/433-mhz-rf-module-with-arduino-tutorial_27.html which was kind of useful but didn’t get anywhere in the end.

Anyone can give me a hand on this? The remote seems to be a black box, there’s no info on the internet or anything I could pull up for reference.

For unknown remotes, most people use a laptop and Audacity to sniff RF codes, as described in this tutorial.

I've taken your advice, going for the RF "sound" analysis. Still no luck. I've ended up with weird codes that again, the most they do is interfere with the remote.

Example. The stop signal, which is the same for all channels gave me the following code:

10110110  01001011  01100100  10010010  01011011  01101101  10010110  11001011  001001011

I've checked and the codes seem to be fixed, not rolling (I have a novoferm 522 that I will try to break later hehe)

Is there something I'm missing here? Some people do this based on the milliseconds the signals take to switch, other go full decimal numeric codes, I seem to be missing something important

Is there something I'm missing here?

Undoubtedly. Tell us what you did; explain how you arrived at the proposed "codes" and perhaps we can help.

See the "How to use this forum" post for hints.

First I’ve scanned the codes via audio, which gave me pattern that I attach to this post. That pattern is repeated 8 times each time the button is pressed on the remote.

As a fact, I know the CAME Wagner remote sends a binary code, 24 bits of length (you’ll notice that the pattern is 25)

I’ve decoded the pattern as a pulse train, rather than ones and zeroes, with the following results for the attached pulse.

Code (split in bytes): 01100110 00001111 10101100 0
Pulse short stop: 320 uS (microseconds)
Pulse long stop: 640 uS
Pulse break duration: 115200 uS

So what is the problem? If your home built transmitter reproduces exactly that pulse train, the blinds should respond appropriately.

DOES your transmitter reproduce that pulse train?

If you want help, you need to provide the essential background and important details.