Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Compiling Tasmota on Gitpod
Even though Tasmota offers several pre-compiled firmware variants, sometimes the ready-to-flash binaries aren't enough. Do you want to enable or disable some features, or simply change some parameters? Then you need to compile a binary yourself.
If you are not experienced enough or don't want to install an IDE (Integrated Development Environment) like PlatformIO or Arduino-IDE on your computer, you can compile your own firmware in a breeze on Gitpod.
Gitpod is a web browser based online IDE. All you need to use it is to link your GitHub account (or make a new one here).
After you successfully sign in, you can start your personal project. The fastest way to load Tasmota into Gitpod is with one of the following links:
- Master Release:
- Development Branch:
Gitpod will take care of all the necessary software package dependencies for you.
After loading the project, you will be greeted by the main window, presenting three panels:
Explorer is the first place you need to look to edit your configuration.
The proper method of customizing firmware compilation options is to use the
user_config_override.h file. Most customizations should not require changes to the
my_user_config.h file. To modify the stock configuration:
- Select the
/sonofffolder in the Explorer (1) pane
- Create a new file called
- In the Editor (2) pane, change, add, or remove anything you need in your configuration file to define your own settings. Refer to the
user_config_override_sample.hfile as well as
#defineoptions. You can find a list of Tasmota features supported listed here. Define the features you require in your configuration file.
- Open the
platformio.inifile located in the
/Sonoff-Tasmotaroot directory (scroll to the bottom of the file Explorer pane)
- In the Editor (2) pane, find the
[common]section and uncomment (remove the semicolon
;at the beginning of the line)
When you are done, save all of your edits (user_config_override & platformio.ini). Now you're ready to compile.
COMPILING YOUR BINARY:
This action is done in the Terminal pane (3) with very simple commands. The simplest one is
platformio run -e sonoff
With this command, Gitpod will compile the Tasmota firmware with the features you selected. If you need a different variant, you can specify this option on the command line:
platformio run -e <variant-name>
platformio run -e sonoff-sensors
platformio run -e sonoff-DE
Compilation normally takes only a couple of minutes. The time if takes is directly related to the configurations you selected; the more features selected means more time is needed to compile. When done, you will find you binary (
Watch a livestream video by digiblurDIY of compiling Tasmota using Gitpod.
Gitpod has a browser extension (Chrome and Firefox) useful to directly load a GitHub project into your personal work-space.
More information here.