Sonoff Wemo Emulator

There are a bunch of sketches out there to have a sonoff emulate a wemo (I didn’t want to use mqtt), but I didn’t find one that would support home assistant autodiscovery. I’ve cobbled some of my own code on top of existing to get the functionality I needed. You only need to input your Wifi info and make up a friendly name for the sonoff.

It might be required to change the uuid and serial if you have multiple, but I’ve yet to test using more than one at a time.


I’ll try it. Thanks for sharing.

I have tried the program. And it works well. Thanks a lot.

Great. Thanks for sharing. It’s work!!!

Does this also work with the WeMo mobile app?

Are there plans to extend this to the other son off devices such as the pow?


Unfortunately this code won’t enable the wemo app to discover the switch. I may work on adding that feature if it is desired. I do not plan on adding support for sonoff pow.

Sonoff pow would likely require mqtt to publish it’s data, and at that point mqtt might as well be used to control as well. (I currently have one configured for this)

This is great.

Can you use this code on any ESP8266 ?


Maybe, probably? :slight_smile:

wow, with this can use Ha without to flash the fw?

Thanks for putting this together man!
Any updates on making it work with the official Wemo app?

1 Like

+1 for wemo app support

1 Like

Thanks for this. This is exactly what I have been looking for
I have managed to upload the software and I can control the sonoff with the toggle switch but cannot discover it with Alexa. Is there anything I need to do to get it in pairing mode? Also the device turns itself off by itself after a few minutes, has anyone else had this?

Hi everyone, couple of questions…
I googled ftdi… Not sure what do I need to buy (Wikipedia said it’s a Scottish company that build semi conductor)
I bought the sonoff switch… WiFi support… It’ll be awesome if I can use HA and cut the man in the middle option (switch calling sonoff cloud to toggle on or off)
In any event, would you point me in the right direction… I need to buy an ftdi… any in particular?
Once bought…then, wire it along the sonoff as shown on the diagram and upload the file from git to?

the FTDI is a Serial Converter Adapter use as a bridge to conect your sonoff to a pc you can get one from here or amazon, and yes wire as shown on diagram and flash it you can watch a video tutorial made by BRUH Automation here i hope that helps

Hi !

I have flashed this but for the life of me it wont connect to my wifi, ive tried two SSIDs that I have, and different FTDI chips to flash it, I dont get anything in the serial monitor either, any ideas ?

Sonoff was working previous to this on the stock firmware so i THINK its ok ?