Professional Documents
Culture Documents
by Sarath341
Sonoff is a WiFi controlled switch which is embedded boards and Development boards like NodeMCU. In
with ESP8266 IC and has relays to control the device this tutorial, we will see how to flash the Sonoff
via the Internet. This IC can be flashed and Tasmota Firmware into the NodeMCU development
reprogrammed by Arduino IDE. The makers of Sonoff boards. In the new updated firmware, you can easily
published the libraries and Arduino files on their choose the different ESP8266 Boards easily.
GitHub page. Initially, it has only for Sonoff made
boards only, after that it supports many ESP8266
Make sure you have the ESP8266 Library installed on your Arduino IDE. If you want to know how to install
ESP8266 library properly visit this complete blog of Flashing SONOFF Tasmota Firmware on NodeMCU.
Once the SONOFF Tasmota Firmware is downloaded from GitHub. Open the Sonoff Tasmota folder. Navigate to
‘lib’ folder and copy all the contents, then paste it into Arduino ‘libraries’ folder on your computer.
Now we included the necessary library files into Arduino IDE Library. Let's configure our code.
Inside the downloaded file, Open the sonoff.ino file. It will open all the necessary files in next tabs in Arduino IDE.
Now open the userconfig.h tab to enter our Wi-Fi Credentials.
Now edit the SSID and Password fields with your WiFi network SSID and Password. Also, give a unique project
name by your choice in #define PROJECT “sonoff” line.
Now connect your NodeMCU and choose the correct COM Port and Board Version. Make sure the settings are
like this for NodeMCU 1.0 Board.
Once Flashing is done Open Advanced IP Scanner . Note down the IP Address you found and paste it into
And search for the IP address inside your network IP. your browser URL and click enter. It will show the
In my case, My IP will range from 192.168.255.0-255 Sonoff Tasmota page to configure your module.
(Means the IP will be range from 0-255). Click scan
and you can see the project name you given in the
userconfig.h file as device name here.
By default, it will be in Sonoff Basic. So you need to change it to ‘Generic’ in ‘Configuration’ menu. Click
‘Configuration’ and inside that choose ‘Configure Module’.
Select the board as Generic and Save. The device will restart. This option is for all ESP8266 boards.
Now if you click the configuration, then you can able to see more GPIO options. Using that you can select the
GPIO Functions.
Depending on the GPIO setting the option will appear on the Homepage like DHT, Relay, Switch and Many more.
Thank You :)