arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.99k stars 4.77k forks source link

RF Receiver not working/recognized #4762

Closed betyar closed 5 years ago

betyar commented 5 years ago

IMPORTANT NOTICE If you do not complete the template below it is likely that your issue will not be addressed. When providing information about your issue please be as extensive as possible so that it can be solved by as little as possible responses.

FAILURE TO COMPLETE THE REQUESTED INFORMATION WILL RESULT IN YOUR ISSUE BEING CLOSED

Make sure these boxes are checked [x] before submitting your issue - Thank you!

I am building a simple Wifi/RF relay switch (similar to a Sonoff Basic RF) using an ESP-01 module. The GPIO connections are as follows (Tasmota settings in brackets):

GPIO0 - button (Button1 - 17) GPIO2 - RF receiver (RFrecv - 106) GPIO3 - relay (Relay1 - 21); the relay was taken from a bricked Sonoff Basic

I have a RX480-E4 4 channel RF Remote Control Receiver Module (1527 Encoding ) like this one: https://www.aliexpress.com/item/Hot-433mhz-Wireless-4-Channel-RF-Receiver-1527-Learning-Code-Decoder-Module-For-Remote-Control/32888969634.html?spm=a2g0s.9042311.0.0.27424c4dHwpjjS.

Everything works except for the RF receiver. I have the latest firmware (6.4.1 sonoff) and have it configured for Generic (18). The relay can be switched on and off via the web interface and the button. Yet no matter what I tried the RF input doesn't seem to be recognized. The console doesn't show anything. I know the module is working because I had no problems pairing with the remote and when I press a button on the remote the LED on the board flashes. I also attached a LED to the VT pin and that also lights up when the the remote is pressed.

I tried different GPIOs but it's the same. I also tried different configurations, for example having it figured as a switch or a button (I read somewhere that the output of this module is like a simple switch so I thought that might work) but no luck. I also tried using the different data pins on the receiver but the result is still the same: nothing

Any suggestions?

Jason2866 commented 5 years ago

You have a wrong receiver this one is not compatible. This one just use fixed! learned codes. As example this one is compatible https://www.aliexpress.com/item/Transmitter-Module-Relay-Receiver-315MHz-Code-Learning-433MHz-Remote-Control-Transmitter-Receiver-Module/32825621368.html?ws_ab_test=searchweb0_0,searchweb201602_4_10320_10065_10068_10547_319_317_10548_10696_453_10084_454_10083_10618_10304_10307_10820_10821_538_537_10302_536_10843_10059_10884_10887_100031_10319_321_322_10103,searchweb201603_51,ppcSwitch_0&algo_expid=ddefd5a9-4bdf-4e59-ac33-5f6b3738eda4-2&algo_pvid=ddefd5a9-4bdf-4e59-ac33-5f6b3738eda4&transAbTest=ae803_3

betyar commented 5 years ago

Thanks, I didn't realize this. I am new to this so there's something I don't understand. The module I have has a small button through which I can pair my remote (that is why I bought it). The module you referred to doesn't have this, so how would I pair it with my remote? On a Sonoff RF this is done through the button on GPIO0. Since I have a button on GPIO0 and it works as it should (it switches the relay on/off) does this mean this same button will also pair my remote in the same way as the Sonoff RF?

Jason2866 commented 5 years ago

It is a receiver only, nothing is done in device. You get the IR Codes (only) via mqtt. The magic has to be done in the Home Automation system or via rules in the device For rules see wiki

betyar commented 5 years ago

I understand that, that is what I was hoping with the module I have, I would use Node-Red to send a command to the relay when something was received from the module. From what I read elsewhere, this module sends simple on//off signals like a button or a switch since the pairing is done by the module itself. In fact, it has thee modes similar to a Sonoff 4CH Pro (momentary. inching, self-locking). So if I understand you correctly then, the module you mentioned would pass to mqtt anything it receives (since there is no pairing) and I would have to use Node-Red or a rule to filter what I get and use that to toggle the relay.

What I still don't understand, is if the module I have supposedly sends an on/off signal, why can't I configure Tasmota to receive this signal as if it was a button or switch and then act on that. For instance, in my setup GPIO2 and GPIO1 are free (GPIO0 is a button and GPIO3 is the relay). GPIO2 can be the RF receiver configured as a Button2 and GPI01 can be configured as a dummy relay (Relay2). I can then link the two relay states together. Of course this is all assuming that what I read elsewhere about the module I have is correct in the first place.

Anyway, these are just thoughts to help me try and fully understand the process. Thanks very much for your help, I have already ordered the module you mentioned. I will keep this issue opened until I receive the module and tried it out to confirm that everything is OK which I am sure it will be. In the meantime if you or anyone else have any insights on how I can use the module I already have with Tasmota it would be great for a future project.

Jason2866 commented 5 years ago

You could use your module as switch(es). In this case no Gpio is defined as rfreceive pin. You have to define different Gpios as switches as you described already.

betyar commented 5 years ago

This is what I tried at first and it didn't work. The console showed nothing.I tried both as a button and a switch. I just came across a post on a esp8266/arduino that perhaps the problem is that I need to connect the data pin using resistors like so: data -> 20K -> gpio2 ->10k -> GND. Somehow I am not sure this is right but I might give it a try. Voltage can't be a problem because the module handles 3.3~5V input.

betyar commented 5 years ago

Finally got it working. I simply added a 10K resistor from the data line to ground and configured the receiver as a switch (Switch1). The module can be programmed so that one button is on and the other is off, but they both use the same data line. You can also configure it so that the same button acts as toggle button.

Thanks for your help @Jason2866. The module I ordered will still come in handy for another project.