Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raw RF Code over mqtt on Sonoff Basic or other ESPs with separate RF Receiver #2887

Closed
raddi opened this issue Jun 1, 2018 · 16 comments
Closed

Comments

@raddi
Copy link

raddi commented Jun 1, 2018

Heyho,

i'm not good at coding, but in the 5.12 version i was able to implement the RC-Switch library into the Tasmota code (sorry for playing with the code :D ) and added some code snippets to receive RF codes with an RF receiver on GPIO14 (Sonoff Basic) and send the code in an individual MQTT topic.
Now in 5.14 the code has completely changed (MQTT is now a seperate code tab) and i just can't get my solution back to work.

Why do I want this feature?
I have a lot of 433mhz RF transmitters (like RF wall switches or remotes, which send unique rf codes) and i use Node Red to receive the code via mqtt, analyse the code in functions and switch different things with it over mqtt (for example: if mqtt-rfcode message "783847384" --> switch sonoff 1, 2 and 3 on/off over MQTT).

First i used a Wemos D1 Mini to receive the codes from the RF Receiver and send them over mqtt but i was able to implement my code in the Tasmota firmware for my Sonoff basics. I connected the RF receiver to GPIO14 and was able to use Tasmota on the basic AND receive the rf code and send it as a string over mqtt on the same device (no need for the Wemos anymore, yay)

I know there are some RF features in the Tasmota firmware for the Sonoff RF and RF Bridge but it would be really cool to just add a RF receiver to a Sonoff basic or Arilux/Magichome on GPIO14 (or any other unused GPIO) and send the raw code over MQTT.

I could use the 5.12 Tasmota i customized but i really want AriLux with HSB Color so i need the 5.14 Tasmota Firmware. :)

So my dream Tasmota-device would be: AriLux LC01 with HSB Color control and an RF Receive on GPIO14 for raw RF Code.

Please be kind,
thank you!

@Jason2866
Copy link
Collaborator

Jason2866 commented Jun 2, 2018

Hello @raddi
kenmcc implemented RCSwitch library. I use it with a WemosD1 mini. It should work with a Sonoff too...
You can find the Tasmota Fork here:
https://github.com/kenmcc/Sonoff-Tasmota/tree/rcswitch
image
WebLog:
15:15:23 MQT: stat/B3F764/RCSWITCH = 1377620 15:15:24 MQT: stat/B3F764/RCSWITCH = 1377620 15:15:25 MQT: stat/B3F764/RCSWITCH = 1377620 15:15:26 MQT: stat/B3F764/RCSWITCH = 1381727 15:15:27 MQT: stat/B3F764/RCSWITCH = 1381727 15:15:30 MQT: stat/B3F764/RCSWITCH = 10488351 15:15:31 MQT: stat/B3F764/RCSWITCH = 10488343 15:15:33 MQT: stat/B3F764/RCSWITCH = 10488339 15:15:34 MQT: stat/B3F764/RCSWITCH = 10488344

@raddi
Copy link
Author

raddi commented Jun 2, 2018

Wow, thank you! Thats exactly what i need! (sorr for not seeing the fork :D )

@raddi raddi closed this as completed Jun 2, 2018
@hejsiri
Copy link

hejsiri commented Dec 31, 2018

I bought a WiFi module: https://www.aliexpress.com/item/Wifi-Remote-Switch-1CH-AC-DC-7-36V-10A-Smart-Home-Relay-Module-433Mhz-Receiver-Support/32902426871.html
obrazek 6
How should I configure it correctly to publish in the mqtt broker all RF codes that I receive? I would like him to behave exactly like Sonoff RF Bridge. I would like this module, together with two RF contact sensors, to be used for the garage door. My device seems to be similar SV sonoff.

The following settings are not correct.
screenshot at dec 31 16-40-37

@Jason2866
Copy link
Collaborator

Device is not supported. We dont have this device....
You have to figure it out by yourself if possible and how

@hejsiri
Copy link

hejsiri commented Dec 31, 2018

Can you give me a hint, guide me, how to do it to work?

@Jason2866
Copy link
Collaborator

Where is the Rf receiver? You have to follow where the output pin from the receiver goes to.
If it goes to a ESP Gpio pin you can use it as Rf receiver mqtt gateway. If not you are stuck

@GianCann
Copy link

GianCann commented Jan 1, 2019

@Jason2866 can you explain me how to configure Tasmota on D1 Mini to work with RF Receiver?
I connected the receiver on pin D2 and SetOption28 to 1 but RfRaw command from console is 'Unknow'.

Thank you (and Happy New Year!)

@hejsiri
Copy link

hejsiri commented Jan 1, 2019

I removed the rf receiver on time esp flashing because it was difficult to access.

img_0550

He has already returned to his place.

obrazek 7

@Jason2866
Copy link
Collaborator

You have to trace where the signal from the 2 inner pins (the are connected) from the rf receiver
goes. Does it go to the ESP? If yes just check which GPIO and configure it as rf receive.
Thats all. If no cut trace(s) and connect it to a free GPIO pin from ESP
The rf button on board will have no function

@Jason2866
Copy link
Collaborator

Jason2866 commented Jan 1, 2019

@GianCann
Use sonoff.bin from here http://thehackbox.org/tasmota/
You have configured as module generic and gpio as rf-receive?
Rfraw is a command only for the rf bridge. It cant be used with rf-receive!
Rf receive is based on rc switch library and not all fuctions are included
See here too #2702 (comment)

@hejsiri
Copy link

hejsiri commented Jan 1, 2019

Middle pins are not connected to ESP. Solder wire to GPIO14 and set to Tasmota RFrecv. It works.

img_0583

screenshot at jan 01 20-12-47

screenshot at jan 01 20-22-32

@Jason2866
Copy link
Collaborator

Glad you got it working!

@hejsiri
Copy link

hejsiri commented Jan 1, 2019

Can I set RFrecv in the Sonoff Touch T1? On which GPIO is the RF module?

@Jason2866
Copy link
Collaborator

@mientki
Sorry i dont know, i dont have any Touch device...

@lordzid
Copy link

lordzid commented Dec 17, 2020

can i use esp 8266?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants