Problems with Sonoff RF WiFi Switch

BillBWann

Member
I was planning to use a picaxe to control a Sonoff WiFi switch via its black button. Rather than hack into the switch contacts pins, I thought it might be easier to use a 433 MHz transmitter to simulate the remote control of the RF version of the Sonoff.

However, I’ve been unable to even get to first base and control the Sonoff using the RF remote that came with the Sonoff.

I’ve searched the internet but haven’t been able to find a solution. My exact problem is shown in this YouTube video (https://www.youtube.com/watch?v=Yx2p4sTgTFQ) but I can’t find an answer to it.

Has anyone got this to work?

If it turns out that the remote that has been supplied with my order is incompatible with my Sonoff, does anyone know the format of a suitable remote that does pair with a Sonoff RF so that I can simulate it?
 

hippy

Technical Support
Staff member
I would recommend not directly interfacing with the black button. Because the module uses mains you run all sorts of serious risk doing that. Controlling via RF or WiFi would be the best way.

The remote you have appears to match the one shown on the manufacturer's site so should work -

http://dl.itead.cc/IM151116003_Sonoff_RF/RF_03.jpg

I think the issue is with the pairing process. I am not familiar with the module but I believe the multi-colour LED is used to indicate status and mode. When you "press twice" to enter pairing the LED colour and flash rate does not alter. I would suspect that means it has not entered pairing mode which I would have expected to have changed colour or flash rate.

It could be it needs slower or faster presses. You may have to experiment to see what works. It may also be worth re-reading the user manual to see if that clarifies things or try contacting the manufacturer.

Added: http://ewelink.coolkit.cc/?p=126 - "Fast press the black button on Sonoff RF twice, the red LED blinks once". The LED doesn't blink red so looks to me to be an issue with push timing.

It could be that either the module or remote are faulty. The manufacturer may provide some sort of test and repair or replace service.
 
Last edited:

hippy

Technical Support
Staff member
It does seem that pairing seems to have been a problematic issue for others -

http://support.iteadstudio.com/support/discussions/topics/11000013484

There is a comment that the double push needs to be "very fast" so may be worth persevering.

I am not sure what the quality of this type of module actually is. ITEAD Studios do have a good reputation but the modules do not appear to carry any regulatory or conformance markings beyond "RoHS". That may be because they are considered sub-components and do not require them but does make me a little cautious.

I have a number of PowStro modules which are similar, just WiFi, no RF. These often get falsely sold as Sonoff modules but are incompatible and are reported to have a much poorer electronic design, a non-isolated low voltage side where connecting to the black button other than using an opto would be extremely dangerous. They need a mobile phone app to make them work which requires rather permissive permissions and is reported to send telemetry data to overseas servers. Those are probably best avoided.
 

slimplynth

Senior Member
Agree with Hippy 100%.. i'm not sure how you Ozzy's stand with Sonoff's (you guys have a brilliant resource for this.. what's his youtube channel..) i've gone to the dark side with Arduino because my diy 3D printer required it (which lead me to Sonoff + RPI).. you need to be mindful that you're potentially breaking the law (The last two i bought a couple of months ago only had RoHS... is it a permanent fixture? AFAIK they're ok for hobby use but you could get yourself into bother if you mess it up.. I'm not wanting to put you off but just to be mindful.) anyway.. i re-flashed my sonoffs in the hope they'd work well in utility rooms etc.. picaxe motion >>> webserver >>> sonoff.. still need to sort it.. any help appreciated.. https://www.youtube.com/watch?v=8mz5sCAvDAY (that guy has it sorted)..

Addon: Hippy, by pairing, do you mean MQTT? The modules i bought paired fine with the mobile app that was listed in the instructions.. it's only after re-flasings the firmware that I struggled... shame because they seem like well built modules.. very easy to setup.. hopefully they make it easier for diy mqtt control..
 

hippy

Technical Support
Staff member
Hippy, by pairing, do you mean MQTT?
Pairing the RF remote with the module in this case.

But that did trigger a thought. Do the Sonoff modules need configuring for WiFi / server control before they will accept RF pairing ?
 

BillBWann

Member
But that did trigger a thought. Do the Sonoff modules need configuring for WiFi / server control before they will accept RF pairing ?
Thanks Hippy for all your research into this. Really appreciated - and for your comments slimplynth also.

The unit I tried paired successfully and easily with the WiFi. Some internet sites have suggested doing the double click RF pairing routine quickly following powering up the Sonoff before it pairs with the WiFi but that didn’t seem to help me.

The device I’ve got certainly looks like the models I’ve seen on the internet both inside and out so I assume it’s a genuine Sonoff and its fitted with a switch mode power supply but I’d still use an opto-isolator if I’m forced to go that route. The units I bought though are still very cheap (AUS:$7 for basic model and AUS:$14 for the RF model).

I see from the responses on the internet that this problem has been around for some years and also that ITEAD have been asked for a solution many times but never seem to have responded.

I’m fairly sure that the software on my Sonoff is registering the double click because it’s responding with the brief flash of the red LED (which is difficult to see over the green LED but it’s definitely there) but then there is no response from the RF remote button press. I’ve tested the remote and its transmitting a clear signal as shown below.

I also tried another RF remote I have and it did evoke a response from the Sonoff (by flashing its red LED four times following a quick double press of the black button) but it wouldn’t pair with it. Subsequent button presses of this second remote evokes a response from the Sonoff (by flashing its red LED) but it doesn’t switch the relay.

The two patters for these 2 remotes are shown below. The Sonoff remote is a slower sequence consisting of a start bit (3.8 mS high 1.5mS low) followed by 24 bits each with a period of 2.25 mS. A one bit has a high of 1.7 mS and a zero bit is high for 0.6 mS. The period between sequences is 13.6mS.

Remote.jpg

The second remote sequence consists of 25 bits with a bit period of 1.3 mS. A one bit is high for 1mS while a zero bit is high for 0.5mS. The period between sequences is 9.9mS

I wonder if someone has a remote that does pair with their Sonoff and they could capture the signal and give details of its format here so that I can simulate it for my Sonoff.
 
Top