用于自定义 Tasmota 编译的 Web GUI
TasmoCompiler is a simple web GUI which allows you to compile fantastic Tasmota firmware with your own settings:
development bleading edge version, or latest stable release if this is the one you like#defines if you want to build even more suitable firmaware for your needsWell, there are two reasons. First is that I want to build my first application written in NodeJS/React. The second one is based on the observation that everytime I prepare a new device I have to start atom with platformio installed, configure all #defines (well, I have template which I copy) and prepare platformio.ini, create a branch from version I like to use, etc..
That's why I decided to prepare a solution which is easier to use (just a few clicks) and does not require knowledge how to install dev environment to build custom firmware.
The easiest way is to look at the screenshots (the whole process is five steps only). After compilation you will be able to download four (or three for ESP32 boards) files:
firmware.bin file, which can be uploaded to your device via Tasmota WebGUI, espotool, ESPEasy flasher or any other tool you used to use to flash your devicefirmware.bin.gz (not available for ESP32 boards)platformio_override.ini file, to check what options for platformio were used to compile the custom firmware fileuser_config_override.h file to check what features are included/excluded from resulting firmwareThe links to download these files will show up under Compiling progress field (look at the bottom of the last screenshot). These links will show up only when compilation is successful.
You have to upload only firmware.bin or firmware.bin.gz file to your device. How to do that is perfeclty described on Tasmota docs.
Start TasmoCompiler in docker:
docker pull benzino77/tasmocompiler
docker run --rm --name tasmocompiler -p 3000:3000 benzino77/tasmocompiler
Then point your browser to http://localhost:3000
If you want to see debug messages on docker console you can run a container with env variable:
docker run --rm --name tasmocompiler -p 3000:3000 -e DEBUG=server,git,compile benzino77/tasmocompiler
server to see http server messagesgit to see git operation messagescompile to see messages during compilationYou can also specify different port on which TasmoCompiler will be available on the host:
docker run --rm --name tasmocompiler -p 8080:3000 benzino77/tasmocompiler
Then point your browser to http://localhost:8080
NodeJS and Python 3.6.x or lateryarnplatformioyarn installyarn buildnode server/app.jsThe configuration options are limited on purpose. I don't want to overload the GUI with too many options. But there is Custom prameters step which allows you to define other Tasmota parameters. Let's say you want to define your MQTT broker and credentials for it. You have to put these lines in Custom parameters field:
#ifdef MQTT_HOST
#undef MQTT_HOST
#endif
#define MQTT_HOST "mqtt.yourhost.iot"
#ifdef MQTT_PORT
#undef MQTT_PORT
#endif
#define MQTT_PORT 1883
#ifdef MQTT_USER
#undef MQTT_USER
#endif
#define MQTT_USER "mqttuser"
#ifdef MQTT_PASS
#undef MQTT_PASS
#endif
#define MQTT_PASS "mqttpassword"To define Friendly name for your device you have to put these lines in Custom parametrs field:
#ifdef FRIENDLY_NAME
#undef FRIENDLY_NAME
#endif
#define FRIENDLY_NAME "Watering controller"
Let's assume that you want to compile in information about your ntp server, your time zone and location (this is used by timers for events like sunrise/sunset). You can do this by putting these lines in Custom parameters field:
#ifdef NTP_SERVER1
#undef NTP_SERVER1
#endif
#define NTP_SERVER1 "ntp.yourserver.iot"
#ifdef LATITUDE
#undef LATITUDE
#endif
#define LATITUDE 34.4348
#ifdef LONGITUDE
#undef LONGITUDE
#endif
#define LONGITUDE 10.0508
#ifdef APP_TIMEZONE
#undef APP_TIMEZONE
#endif
#define APP_TIMEZONE 99You can find additional information what can be set by Custom parameters field in my_user_config.h in Tasmota source code.
If you have problems with the compiler or you are interested in more advance usage, please refer to the ADVANCED tips for more information.
There is a TasmoCompiler branch which tries to follow as much as possible changes made to development branch of Tasmota. It is bleeding edge version so you can expect unexpected. To use development pull and run appropriate docker image:
docker run --rm --name tasmocompiler -p 3000:3000 benzino77/tasmocompiler:development
Everything you do, you do on your own responsibility. I do not take any responsibility for damages or problems, that may arise as a result of using this solution or its products.
Thanks to Theo Arends and the entire Tasmota Dev Team for fantastic work!
TasmoCompiler is licensed under the MIT license.
暂无开放 Issues,或尚未同步最近议题。