Control of SONOFF devices with arduino

Hi all,

It seems there are tons of very cheap room light switches, mains outlets and other devices even on ebay that can be controlled over wifi with a smart phone app such as this and this under the name SONOFF.

The firmware of these devices can also be flashed with the arduino IDE since it is based on an ESP8266 chip

My question is if its possible to control these devices from an arduino without flashing a new firmware on them, ie send codes over wifi in their own protocol from an arduino.

noiasca:
nice hint - thank you :wink:

What i read so far, these are operated via a cloud service from the manufacturer. I assume that you have to flash the ESP with your own sketch.

Yes i know...i was just hoping i could somehow emulate these commands coming drom the cloud to operate the devices drom an arduino.

noiasca:
"hopefully" they are using some kind of encryption to the device so I hope it is NOT easy to to reverse engineer this process. Why do you want to keep their firmware, is it of any use?

Well, first replacing the firmware is ireversible , then i would have to develop my own firmware and for that would need the schematic which is not available. I.e need to know which pin controls the relay etc.
In addition i have never developed code for the ESP8266 before..

Yes i also have to wait a month.

So i can just program it as if it was an avr chip?

Try this link

mocinoz:
Try this link

Sonoff switch complete hack without firmware upgrade | by Ipsum Domus | Smart Home DIY

Interesting...

You can get ready made software for the ESP8266. Tasmota being one of them. Using the ESP flash tool you can backup the original firmware before flashing Tasmota so if you don't like it you can revert back to the original code.
Another option might be to see if you can use the Arduino to control an Alexa skill as EWelink is controllable from Alexa.

Try this: GitHub - mdopp/simple-sonoff-server: Emulates the original sonoff-cloud-servers within your local network.

I haven't looked deeper into this tho.