[RELEASE] Sonoff (Connect)


What firmware and what driver are you using?


I am using the ericm sonoff dual firmware. It flashes all OK and you can goto the devices webpage, the control buttons do nothing, If I flash the Tasmota driver it all works correctly, obviously not using hubitat as there is no driver (yet :slight_smile: )


Do you mean the page in HE or the device's own webpage?


Devices own page


I have been using the RF bridge with my Tasmota port located here:

The driver needs to be customized currently though. In the parse section you will see this:

if (result.containsKey("RfReceived")) {
        if (result.RfReceived.containsKey("Data"))
            log.debug "Data: $result.RfReceived.Data"
            switch (result.RfReceived.Data) {
                case "321222":
                    events << buttonEvent(1, "pushed", "physical")
                case "321228":
                    events << buttonEvent(2, "pushed", "physical")
                case "321221":
                    events << buttonEvent(3, "pushed", "physical")
                case "321224":
                    events << buttonEvent(4, "pushed", "physical")

You basically need to watch the log while you press the button on the RF device. Then assign the code received to a button event. For example, code 321224 is assigned to button 4 pushed in the code above.

You can then use all of those button events in RM or other automations.


Hi Shaun,
Did you get this to work? I am in NZ and flashed one with Erics Sonoff.ino.generic.bin . My result was that I could control the LED in Hubitat and in the Sonoff web interface, but the relay does not actuate. However, I got 4 of these some time ago and they have been on the shelf since. I think its possible that I got a dud, but want to check with you before I try another.
I used NodeMCU and soldered to the pads on the little daughter board - is there an easier way?


Got a strange problem. I just got a sonoff basic r2 ver2. it Flashed fine. Assigned my network and it’s not getting an IP address. I check and it does get an IP for a few seconds then drops off the net. Switch button controls device correctly.

Should I re Flash and try again?

Oh and I have a 4ch pro that works just fine with my wifi. Do the devices share same wireless chip/software?


You posted this in the SmartThings forum too. This is my response over there:

"Strange, I haven’t seen that before. Maybe try a reflash. Try connecting it to a different access point just to rule that out. You could also reboot the router."


Hi Rod,
Unfortunately, I didn't get it working. Instead, I was able to get a replacement and used the generic firmware (not Eric's) which played well with my existing setup though I can only comment on the actual on/off functionality. I still have the bricked one but don't have the tri-screw screwdriver to open it up. I would avoid using Eric's firmware with these smart plugs as I've tried it on two and had the same result with both plugs.


I have setup the Sonoff RF Bridge into HE and have a RF motion sensor connected. I then monitor the Sonoff RF Bridge console (shown below) for my unique motion sensor id.

2:31:25 RSL: tele/sonoff/RESULT = {"RfReceived":{"Sync":12520,"Low":460,"High":1210,"Data":"EEFDAE","RfKey":"None"}}

I then took the unique id "EEFDAE" and changed the HE driver to include it as a button (as per below).

            case "EEFDAE":
                events << buttonEvent(1, "pushed", "physical")

When I move my hand over the motion sensor I can see it appear the HE logs (shown below). I try and create a rule for this button 1 but for some reason it just won't do anything.. Any idea what I am missing?

dev:5152019-08-14 08:11:30.895 am debugSync: 12530

dev:5152019-08-14 08:11:30.893 am debugRfKey: None

dev:5152019-08-14 08:11:30.887 am debugLow: 460

dev:5152019-08-14 08:11:30.885 am debugHigh: 1210

dev:5152019-08-14 08:11:30.882 am debugData: EEFDAE

dev:5152019-08-14 08:11:30.874 am debug========== Parsing Report ==========

Ideally it would be great to have the RF Bridge know that it's a motion sensor or contact sensor rather than a button. Is that possible?


How to add gpio4 function? I have new sonoff mini... Need to use with external button....


With which firmware?



That option isn't available in that firmware. You should look at Eric's other post using the Tasmota firmware.


Tasmota firmware has a lot of issues...

doesn't work correctly
Doesn't work button on/off in dashboard.. Only off function


You shouldn't have the device as a button controller in the dashboard. it is a switch. That's why the button template won't work correctly. Look at the driver that you have. It doesn't even have the button capability.


I meant switch or outlet...not a button


You have to use Eric's custom firmware based on Tasmota, like I said. That problem doesn't exist.


I do using


No, I asked you what firmware you were using and you showed the one on this thread. I'm talking about this firmware.