sui77 / rc-switch

Arduino lib to operate 433/315Mhz devices like power outlet sockets.
1.89k stars 651 forks source link

SimpleRCScanner returning random numbers with no RF signal (no button pressed) #501

Open helzayat opened 4 months ago

helzayat commented 4 months ago

I am running SimpleRCScanner on a NodeMCU. After adding:

#if defined(ESP8266) || defined(ESP32)
    // interrupt handler and related code must be in RAM on ESP8266,
    #define RECEIVE_ATTR ICACHE_RAM_ATTR
#else
    #define RECEIVE_ATTR
#endif

and RECEIVE_ATTR void handleInterrupt() it runs and I get a string of 0s when nothing is connected to the NodeMCU. If I connect my 433MHz receiver (This item: https://makerselectronics.com/product/wireless-rf-kit-433mhz-transmitterreceiver) and reset the NodeMCU, I get a random string of digits before I press any buttons on my fob. They are different each time the sketch runs, and the visualization on https://test.sui.li/oszi/ makes no sense. Pressing any button on the fob during the countdown doesn't yield reproducible sequences, just another random series. I don't have an oscilloscope, but a voltmeter connected to the output of the receiver shows that something happens when I press a button. I was hoping to duplicate my fob using the RF transmitter controlled by an ESP8266 and WiFi through my phone. Any ideas?

nogi47 commented 3 months ago

If you are using rc-switch as transmitter driver check whether the transmitter has a permanent high signal on the data pin.

I had a transmitter for a door bell and on the ATTiny85 data had a permanent high signal which means there is a permanent carrier signal that interferes with other 433MHz signals.

The receiver tries to find valid signals in this carrier and tries to interpret the noise and generates random numbers.