Skip to content

tasmota/autoconf

Repository files navigation

autoconf

Tasmota autoconf device configurations storage

Why autoconf?

ESP32 based devices get more sophisticated than ESP8266 and require increased post-configuration by users.

Autoconf allows to download autoconf files directly from an online repository to configure a device in 1-click.

If your device is not connected to the Internet, you can still download autoconf files and upload them on the file-system of the device

How does it work?

At boot, the Tasmota engine checks of an autoconf file is present in the file system and applies it.

An autoconf file is a ZIP file which contains scripts and configuration sub-files. To be detected, an autoconf file must end with .autoconf.

Note: only one autoconf file is allowed. If multiple files are present, none is applied and an error is returned.

Step 1. first time configuration - init.bat

The sub-file init.bat contains Tasmota commands that need to be applied only once; like Template commands.

All commands in init.bat are applied in sequence and a restart is triggered.

At this point, an empty hidden file .autoconf is created to stop from applying init.bat multiple times. You can click on the Reapply button to remove this hidden file and reapply the autoconf file.

Step 2. preinit.be

During driver initialization (PRE_INIT), preinit.be file is loaded if present.

This is typically the place to put Berry drivers like AXP192.

Step 3. display.ini

During driver initilization (PRE_INIT), if GPIO OptionA - 3 is enabled and display.ini is present in the autoconf file, the Universal Display Driver is started.

Note: if a file display.ini is also present at the root of the file-system, this step is skipped.

Step 4. autoexec.bat

During initialization phase (INIT), autoexec.bat is applied if present.

Note: if autoexec.bat is also present at the root of the file-system, it is executed AFTER the autoconf.

Step 5. autoexec.be

During initialization phase (INIT), autoexec.be is loaded if present.

Note: if autoexec.be is also present at the root of the file-system, it is executed AFTER the autoconf.

Structure of the ZIP file

The ZIP file must contain only UNCOMPRESSED files and no subdirectory structure (i.e. with options -0 and -j)

  • init.bat: Tasmota commands to be applied once
  • preinit.be: Berry code loaded at PRE_INIT phase to load Berry drivers
  • display.ini: Universal Display Driver configuration if GPIO OptionA - 3 is enabled
  • autoexec.bat: Tasmota commands applied at startup
  • autoexec.be: Berry code loaded at startup

How to add or change autoconf files

ZIP files and manifests are automatically generated by gen.py scripts.

Autoconf definitions should be added as directories in raw with uncompressed files.