Start a new topic
Not Taken

Control Sonoff devices without internet could / MQTT

 Is there any official way to configure Sonoff devices to talk with private home automation controllers (like OpenHAB, Home Assitant, tec.) instead of public cloud service that is used by eWeLink?

This page suggests that Sonoff is possible to work with MQTT:

"Sonoff - WiFi Wireless Smart Switch for MQTT COAP Smart Home"

How can I configure my Sonoffs to talk with MQTT broker hosted in my LAN? Later via MQTT it can be intergated with other applications.

I saw some alternative firmware projects, don't know how reliable they are, but is there anything official from ITEAD?

52 people like this idea

very interesting! itead please reply! make free sonoff might help to sell many more!
I would like to be able to do my sonoff interact with the application tasker android!


3 people like this

Hi. I would also like to hear about the MQTT integration.  When will this be available? Thanks!

3 people like this
I agree, the Sonoff would be so much more useful if it could be controlled by MQTT.


3 people like this

Me too, I want to use sonoff with FHEM. 

There are a couple of articles on about reprogramming it to work via MQTT
The board used there has holes for a 4 pin header, the one I have has 5 holes but their code seems to work.

Mine is the WiFi only version but the board is labelled Sonoff TH - hence the availability of GPIO14 on the 5th header pin.


I just wrote a blog post about how I put NodeMCU on my Sonoff, and I also included some LUA code to get it up and running easily. I have had the same code running on other ESP8266 based devices for over a half year, and so far I haven't had any issues.

I have written an article which installs ESP_Basic on the Sonoff...
ESP_Basic on Sonoff
This offers quite a lot of facility but does not include MQTT, although I believe ESP_Basic does have MQTT capability if you wanted to include it yourself (and ESP_Basic is very easy to use).  


Now I use Sonoff-MQTT-OTA and this works fine.

Sonoff-MQTT-OTA looks really great.

Too bad that we have to solder pins to reflash.

If sonoff were delivered with an OTA feature, where we could choose the firmware url to upload from, it would be very nice. No need to solder to flash custom firmware.

4 people like this
Please support MQTT in your next update.


4 people like this

Makes me wonder if any of the iTead people even bother reading anything on this forum. Very disappointing.

Have a look at espurna
It supports many ESP8266 devices and brings the MQTT feature.


2 people like this
Mqtt indeed. Would love not messing with a solder...

At least the RF versions can be controlled locally. I use Homeseer with an RFXtrx device controlling Sonoff 4CH Pro relays, which works well. Homeseer also provides local voice control options, so if you don't want to rely on internet links at all, you have alternatives to Alexa (which also works with HomeSeer).

Waiting to see if the Broadlink RF device will control Sonoff RF too.

Login or Signup to post a comment