HT48RA0-2 RF decoding wireless doorbell

Hello!

I'm trying to intercept the signal of my wireless doorbell. so that I can notify myself that someone is pressing the button (in case that I'm not at home).

I did however manage to capture the timings and I'm able to retransmit them and make the bell ring, cool, but not the intention of my project.

To give you more information, here are my project details:

Arduino nano
The receiver is connected to the D2 pin433Mhz Super heterodyne

Raspberry Pi 3
Arduino is connected with an USB cable to the RPi, so I could match and process the doorbell as a notification.

Doorbell
Device Brand: Byron BY511E
Chip: HT48RA0-2

The timings that makes the bell ring are (from sync to sync):

3040 460 530 960 530 960 530 960 1040 460 530 960 530 960 530 960 1040 460 530 960 530 960 1040 460 530 960 1040 460 1040 460 530 960 530 960 1040 460 530 960 1040 460 1040 460 3040

My question is if anyone could help me figure out how to "match" the signal using my arduino nano so that I can continue to process the notification using my RPi. I hope this is the appropriate way of asking.

EDIT: I found the source, credits to reddit user bal00
P.s., I have no idea where I got the code from, so credits to the maker, the code that I'm using to capture raw timings with my Arduino nano is:

#define MINIMUMDURATION 50 //minimum low or high signal duration for a valid signal in microseconds
#define MAXIMUMDURATION 20000 //maximum low or high signal duration for a valid signal
#define MINIMUMSILENCE 30000 //minimum low period after a complete signal in microseconds
#define MAXEDGES 800 //maximum samples, limited by RAM

int timings[MAXEDGES];
int edges = 0;
long signalstart = 0;
long signalend;
long interval;
boolean validSignal = true;
boolean captureFinished = false;

void setup() {
  Serial.begin(9600);
  pinMode(2, INPUT);
  pinMode(6, OUTPUT);
  digitalWrite(6, LOW);
  while (digitalRead(2) == LOW) {}
}


void loop() {
  if (!captureFinished) {
    if (signalstart == 0) {
      signalstart = micros();
    }
    while (bitRead(PIND, 2) == HIGH) {}
    signalend = micros();
    interval = signalend - signalstart;
    //Serial.println(interval);
    if (interval > MINIMUMDURATION && interval < MAXIMUMDURATION ) {
      timings[edges] = interval;
      edges++;
    }
    else {
      edges = 0;
      validSignal = false;
      captureFinished = true;
    }
    if (validSignal) {
      while (bitRead(PIND, 2) == LOW && (micros() - signalend) < MINIMUMSILENCE ) {}
      signalstart = micros();
      interval = signalstart - signalend;
      if (interval > MINIMUMDURATION && interval < MAXIMUMDURATION ) {
        timings[edges] = interval;
        edges++;
      }
      else if (interval >= MINIMUMSILENCE) {
        captureFinished = true;
      }
      else {
        validSignal = false;
        captureFinished = true;
      }
    }
    if (edges >= MAXEDGES - 2) {
      captureFinished = true;
    }

  }


  else {
    if (validSignal && edges > 10) {
      captureFinished = false;
      Serial.print("Signal captured with ");
      Serial.print(edges+1);
      Serial.println(" edges");
      Serial.println("-");
      for (int i = 0; i <= edges; i++) {
        Serial.print(timings[i]);
        Serial.print(" ");
      }
      Serial.println(" ");
      Serial.println("-");
      Serial.print("int intervals[] = {");
      for (int i = 0; i < edges; i++) {
        Serial.print(timings[i]);
        Serial.print(", ");
      }
      Serial.print(timings[edges]);
      Serial.println("};");


      Serial.println("Sending signal");
      delay(3000);
      boolean high = false;
      for (int i = 0; i <= edges; i++) {
        if (high) {
          digitalWrite(6, LOW);
          high = false;
        }
        else {
          digitalWrite(6, HIGH);
          high = true;
        }
        delayMicroseconds(timings[i]);
      }
      digitalWrite(6, LOW);
      Serial.println("...sent");
    }
    else {
      captureFinished = false;
      validSignal = true;
    }
    edges = 0;
    signalstart = 0;
  }

}

Thank you.