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

RF_SUPPORT configuration #594

Closed
spiderjn opened this issue Feb 22, 2018 · 18 comments
Closed

RF_SUPPORT configuration #594

spiderjn opened this issue Feb 22, 2018 · 18 comments
Assignees
Milestone

Comments

@spiderjn
Copy link

spiderjn commented Feb 22, 2018

Hi,
I put last firmware on a Sonoff RF device, it's work perfectly with MQTT/Domotics, now want also configure RF communication with my RFxCom (for use outside my WiFi range).
I've set RF_SUPPORT and now debugger show ;
[010930] [RF] Code ON : 266325
[010931] [RF] Code OFF: 266321
[010933] [RF] Disabled
but after a line with
[RF] Enabled
Best regards

@spiderjn spiderjn reopened this Feb 26, 2018
@spiderjn
Copy link
Author

Hi,
I see [RF] Enabled in log debug but i can't find any information on protocol, i test all switch avalaible on domoticz without success.
So i propose to make evolution on web interface for display RF code and an other for send code when state change (this can help to learn code outside).
Best regards

@xoseperez
Copy link
Owner

RF support is very old and it has not been tested maybe in the last 2 years... so yes... it might not work as expected (or at all). It was added to the first revisions of ESPurna after this project: http://tinkerman.cat/adding-rf-to-a-non-rf-itead-sonoff/

@xoseperez xoseperez added question enhancement New feature or request labels Feb 26, 2018
@spiderjn
Copy link
Author

i understand, i've read your initial project but it's not based on standard itead RF module.
yesterday i found a return in first intruction from Rf loop ...

@xoseperez
Copy link
Owner

LOL. I guess I disabled it the hard way...

@xoseperez
Copy link
Owner

I have upgraded support for the RF module, using the RFBridge web interface to learn new codes. Can you give it a try? It's in the dev branch, just set RF_SUPPORT to 1 and configure the receiver GPIO.

@xoseperez xoseperez added this to the 1.12.4 milestone Feb 28, 2018
@xoseperez xoseperez self-assigned this Feb 28, 2018
@spiderjn
Copy link
Author

spiderjn commented Mar 1, 2018

i took dev branch and i set -DRF_SUPPORT=1 in build flag.
and i compiled with "pio run -e itead-sonoff-rf" ?
it's right ? (cause i already see in RF.ino then return in rfloop().

@xoseperez
Copy link
Owner

Do a git pull to get the latest changes, there is no return in rfLoop now.

@spiderjn
Copy link
Author

spiderjn commented Mar 1, 2018

ok fine, after flash, now i've in debug 👍
[068694] [RF] Code ON : 266325
[068694] [RF] Code OFF: 266321
but where configure GPIO receiver ?

@xoseperez
Copy link
Owner

xoseperez commented Mar 1, 2018

You should not be seeing those messages, are you sure you are in dev branch?

git checkout dev
git pull

@spiderjn
Copy link
Author

spiderjn commented Mar 1, 2018

i'm in dev branch, but it an error during flashing.
1 : i change just this line in
[env:itead-sonoff-rf]
build_flags = ${common.build_flags_1m} -DITEAD_SONOFF_RF -DITEAD_SONOFF_RF -DRF_SUPPORT=1 -DDEBUG_TELNET_SUPPORT
2 : new flash with cable.
3 : now i've correct firmware inside device 👍 check in log and WebUI :
Firmware version 1.12.4a
Firmware build 2018-03-01 12:39:05

Oups, now i've a new pannel on WebIU for manage RF and when i click on "Learn" i can see in debug log [405174] [WEBSOCKET] Requested action: rfblearn.
But nothing more when i use Classical RemoteControl (DI-O).

you ask to set receiver GPIO, but where ?

Thanks.

@xoseperez
Copy link
Owner

Configure the GPIO under the RF section in general.h file.

@spiderjn
Copy link
Author

spiderjn commented Mar 1, 2018

you mean, change value :
#define RF_PIN 14
but what number ?

@xoseperez
Copy link
Owner

The GPIO you have the RF module connected to...

@spiderjn
Copy link
Author

spiderjn commented Mar 1, 2018

Oups yes, but where i can find this information ? on Itead schematic ?
https://www.itead.cc/wiki/images/f/f8/Sonoff-Schmatic.pdf

@xoseperez
Copy link
Owner

The RF module works when you have the RF module connected to your ESP8266 microcontroller. If you are using the Sonoff RF it should work out-of-the-box without any special features. If it doesn't then it means the Sonoff RF does not support your specific remote. To pair them you have to double click the Sonoff button (the red light should lit) and then click the button in your remote.

@spiderjn
Copy link
Author

spiderjn commented Mar 2, 2018

you'r right. when i use sonof button i see led changing color, but nothing in log.
i use an Itead remote received with device, and i can change relay status, but log is confusing and RF Web Panel seem's not working.
How i can help to troubleshooting this enhancement ?

@xoseperez
Copy link
Owner

RF_SUPPORT is meant for devices where the RF module is linked to the ESP8266. On the Sonoff RF there is a secondary microcontroller that manages the RF module, so it's no use. Disable it.

The only way to "learn" new codes with the Sonoff RF is to double click the Sonoff button and press the remote button to link that remote button to the Sonoff relay.

@xoseperez xoseperez modified the milestone: 1.12.4 Mar 2, 2018
@xoseperez
Copy link
Owner

Closing, changes to the RF module are staged for release.

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

No branches or pull requests

2 participants