Skip to content

Compiling

Flash and memory space on an ESP82XX chip is limited and very valuable. Because of that our precompiled binaries include the most popular features of Tasmota but no build can include all of them.

To include a feature you need (or build completely customized Tasmota) you will have to configure and compile your own version.

First you will need Tasmota's source code (either development or master branch) and a compiling tool.

Compiling Tools~

If you want to modify the code or default settings you can use:

Online Compilers

Can only create a firmware binary. Use one of the tools to flash it to your device.

  • Gitpod - compile your own binary in the cloud using Gitpod.
  • TasmoCompiler - simple web GUI to compile Tasmota with your own settings

Simplest way to compile is with GitPod, requires only a web browser.

Once you have set up the development environment, unzip the source code into a folder.

Customize your build~

The base for your self compiled version has to be Tasmota. Do NOT use a other Tasmota build variant for.

Create a new file in /tasmota folder called user_config_override.h.

Open the file in chosen development environment for editing.

Enter lines required to enable or disable desired feature. All features and their identifier can be found in my_user_config.h.

Best practice to enable a feature is to use

#ifndef %identifier%
#define %identifier%
#endif
Directives Description
#define %identifier% enables the feature
#undef %identifier% disables the feature
#ifdef %identifier% checks if the feature is defined in code
#ifndef %identifier% checks if the feature is not defined
#endif closes #if statement

Example: enable blinds and shutters support

#ifndef USE_SHUTTER
#define USE_SHUTTER             // Add Shutter support for up to 4 shutter with different motortypes (+6k code)
#endif

identifier = USE_SHUTTER

  1. check whether USE_SHUTTER is already defined and proceed if it is not
  2. this line copied from my_user_config.h then uncommented, tells the compiler to include (#define) shutter support
  3. close the IF statement from line 1

Example: disable Domoticz support

#ifdef USE_DOMOTICZ
#undef USE_DOMOTICZ                              
#endif 

identifier = USE_DOMOTICZ

  1. check whether USE_DOMOTICZ is already defined and proceed if it is
  2. tell the compiler to remove (#undef) Domoticz support
  3. close the IF statement from line 1

It is not recommended to change my_user_config.h, use it only for reference

Save file, compile the custom binary and flash it

Note

There are limits to how many features can be included! If you go overboard code might not compile due to features conflicting or might not be able to be flashed if it exceeds ESP8266 limits.