Decoding RF 433 with RCSwitch failed

Dear Forum,

I'm trying to decode a remote switch with the RCSwitch Lib. As a receiver I'm using an MX-05V on pin 2 of my Uno, but didn't get any serial response.

To try if the MX-05V is brocken, I wired the data pin to an analog pin A0 and read and printed them the serial. I got a wired response with values from 0 to 765 even without pressing on the remote switch. I use the following code for that.

unsigned int data = 0;   // variable used to store received data

void setup(){
   
   Serial.begin(9600);
 }

void loop(){
   data=analogRead(A0);    //listen for data on Analog pin 0
   
   Serial.println(data);

 }

Does any body have an idea what can be the issue?

Thank you in advance,
René

They are cheap receiver modules and tend to put out random data unless it picks up a signal so it's probably not broken.
What remote switch are you trying to decode as RCSwitch might not work with your remote.

Open the remote switch and try to read the numbers on the chip :wink:

I found the following hint, that help me partially. With that im able to receive one of my 3 remotes. A no-name one. Home easy and intertecho failed.

Change:

unsigned long delayTolerance = delay * RCSwitch::nReceiveTolerance * 0.01;
to
unsigned long delayTolerance = delay*0.8;

in RCSwitch.cpp in folder "libraries\RCSwitch". It appears 3 times.

Home Easy start page : Arduino Playground - HomeEasy
An older basic intertechno device should be compatible with RCswitch.

Thank you Peter.

Unfortunately I didn't get any of the sketches from the HomeEasy playground working. So I starte to low level read the the data from RF433. I found the pattern and was able to isolate them.

Try to use original example sketch from RCSwitch
and connect the receiver to interupt 0 (on nano is this pin D2)

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
Serial.begin(9600);
mySwitch.enableReceive(0); // Receiver on inerrupt 0 => that is pin #2
}

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

int value = mySwitch.getReceivedValue();

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

mySwitch.resetAvailable();
}
}

Hi,
I also get nothing on the monitor,
I am using exactly the code pasted above (basic receive) on an r3 UNO.

the fobs are 433mhz, can even be seen on rtl-sdr

I can serial.print the raw pin data also, which clearly picks up the fob, but the example code does not display anything?

is it not picking up the interrupt?

thanks!