Giter Club home page Giter Club logo

docker-tasmota's Introduction

Docker-Tasmota

Quickly set up a build environment for Tasmota using Docker

compile.sh

This bash script makes compiling a lot easier without the need to type lengthy commands each time.

compile.sh is intended to run on a linux machine with docker and git installed. If you're missing any of these the script will pop a warning with instructions how to install.

Running the script for the first time will pull the latest blakadder/docker-tasmota container (you can edit the script to use your own docker container), clone the latest Tasmota development branch (you can change to clone the latest stable release version by setting USE_STABLE=1) inside the script folder and copy platformio_override.ini and user_config_override.h to Tasmota folder.

Running the script with one or more build names (as listed in platformio_tasmota_env.ini) as parameters will compile only those builds regardless of platformio.ini or platformio_override.ini

./compile.sh tasmota-sensors tasmota-PT
compiles both the tasmota-sensors.bin and the portuguese language version of Tasmota

If you have a user_config_override.h or platformio_override.ini file with your custom settings you can put them in the script folder and they will be used on the next script run.

Script will update the repo folder with the latest one every run.

To check compiling logs use cat docker-tasmota.log

Option 1: Setup the prebuilt docker container using the compile.sh script

  1. Clone this repo and cd to the dir where its cloned:

    git clone https://github.com/tasmota/docker-tasmota
    cd docker-tasmota
    
  2. Update the user_config_override.h and/or platformio_override.ini files with your custom build settings

  3. Run compile.sh with the desired build name, ex:

    ./compile.sh tasmota
    

    If necessary the compile.sh script will install the container and Tasmota repo if you type 'yes' when prompted

  4. When compiling finishes you should have the compiled binary and gzipped version in Tasmota/build_output/firmware which can be flashed on your devices

Note: If you want to update the docker image installed previously by the compile.sh script run:

docker pull blakadder/docker-tasmota

Option 2: Setup a docker container from scratch

  1. Clone this repo and cd to the dir where its cloned:

    git clone https://github.com/tasmota/docker-tasmota
    cd docker-tasmota
    
  2. Run this to build the docker container: docker build -t docker-tasmota .

  3. Move to a directory where you want to clone Tasmota repo:

    git clone https://github.com/arendst/Tasmota.git
    

If you have a user_config_override.h or platformio_override.ini file with your custom settings, you will need to put them under Tasmota/tasmota.

  1. From the same directory run to compile the desired build
    docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -u $UID:$GID docker-tasmota -e tasmota-PT

-e <buildname> where can be any of the builds listed in platformio.ini. If you don't define a build then every build will get compiled.

  1. When compiling finishes you should have the compiled binary and gzipped version in Tasmota/build_output/firmware which can be flashed on your devices.

Switch to a branch other than development

cd Tasmota

List branches with git branch -a

Switch to release branch with

git checkout release

Build it and run:

docker run -ti --rm \
-v $(pwd)/Tasmota:/tasmota \
-u $UID:$GID docker-tasmota

docker-tasmota's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-tasmota's Issues

Building Tasmota32 development fails

When I try to build the development branch of Tasmota using Tasmota32 it fails, on 13.4.0 it works fine.

docker run -i --rm -v $(pwd)/Tasmota:/tasmota -u $UID:$GID docker-tasmota -e tasmota32
Compiling Tasmota...
Processing tasmota32 (framework: arduino; platform: https://github.com/tasmota/platform-espressif32/releases/download/2024.04.13/platform-espressif32.zip; board: esp32)
--------------------------------------------------------------------------------
Platform Manager: Installing https://github.com/tasmota/platform-espressif32/releases/download/2024.04.13/platform-espressif32.zip
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Platform Manager: [email protected] has been installed!
Platform Manager: Removing espressif32 @ 2024.4.13
Platform Manager: [email protected] has been removed!
IncompatiblePlatform: Development platform 'espressif32' is not compatible with PlatformIO Core v6.1.11 and depends on PlatformIO Core >=6.1.14.

Wrong directory for build outputs?

When building tasmota32 binary with latest stable build (12.4.0):

$ ./compile.sh tasmota32
From https://github.com/arendst/Tasmota
 * branch                development -> FETCH_HEAD
Fetching origin
Checking Tasmota GitHub for the most recent release version

Running Docker Tasmota on Tasmota version v12.4.0

Compiling builds:
tasmota32


Using your user_config_override.h and overwriting the existing file

โœ” Finished!     Compilation log in docker-tasmota.log

cp: cannot stat '/tmp/docker-tasmota/Tasmota/build_output/tasmota32*': No such file or directory
WARNING:
Something went wrong while compiling tasmota32. Check compilation log

Content of build_output:

$ find Tasmota/build_output/
Tasmota/build_output/
Tasmota/build_output/map
Tasmota/build_output/map/tasmota32.map.gz
Tasmota/build_output/firmware
Tasmota/build_output/firmware/tasmota32.bin
Tasmota/build_output/firmware/tasmota32.factory.bin

fatal error: IRremoteESP8266.h: No such file or directory

Got the following error using the Docker image to build Tasmota:

/tasmota/tasmota/tasmota_xdrv_driver/xdrv_05_irremote.ino:62:29: fatal error: IRremoteESP8266.h: No such file or directory

*************************************************************************
* Looking for IRremoteESP8266.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:IRremoteESP8266.h"
* Web  > https://registry.platformio.org/search?q=header:IRremoteESP8266.h
*
*************************************************************************

 #include <IRremoteESP8266.h>
                             ^
compilation terminated.
Build details
% sudo docker run -it --rm -v $PWD:/tasmota -u $UID:$GID blakadder/docker-tasmota -e tasmota
Unable to find image 'blakadder/docker-tasmota:latest' locally
latest: Pulling from blakadder/docker-tasmota
c7b7d16361e0: Pull complete 
b7a128769df1: Pull complete 
1128949d0793: Pull complete 
667692510b70: Pull complete 
bed4ecf88e6a: Pull complete 
8a8c75f3996a: Pull complete 
59ba7226fec9: Pull complete 
8f449aa0129e: Pull complete 
6e376b1610c0: Pull complete 
c881dc93176e: Pull complete 
702e62e4b262: Pull complete 
c1abbae766a9: Pull complete 
98034b5d313f: Pull complete 
5c77f8c58c8a: Pull complete 
Digest: sha256:2264a2ea02f65aa440e3ba3b624ea2a43b82881f3c4ec14be1b4dc621cdad593
Status: Downloaded newer image for blakadder/docker-tasmota:latest
Compiling Tasmota...
Processing tasmota (platform: https://github.com/tasmota/platform-espressif8266/releases/download/v2.7.4.9/platform-espressif8266-2.7.4.9.zip; framework: arduino; board: esp8266_1M)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Platform Manager: Installing https://github.com/tasmota/platform-espressif8266/releases/download/v2.7.4.9/platform-espressif8266-2.7.4.9.zip
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Platform Manager: [email protected]+9 has been installed!
Tool Manager: Installing platformio/toolchain-xtensa @ ~2.40802.0
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%
Tool Manager: [email protected] has been installed!
Tool Manager: Installing tasmota/framework-arduinoespressif8266 @ ~2.7.4
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%
Tool Manager: [email protected]+9 has been installed!
Tool Manager: Installing https://github.com/tasmota/esptool/releases/download/v3.3.1/esptool-3.3.1.zip
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: [email protected] has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp8266_1M.html
PLATFORM: Espressif 8266 (2.7.4+9) > Espressif Generic ESP8266 Tasmota 1M sketch NO FS
HARDWARE: ESP8266 80MHz, 80KB RAM, 972.00KB Flash
PACKAGES: 
 - framework-arduinoespressif8266 @ 2.7.4+9 
 - tool-esptoolpy @ 1.30301.220515 (3.3.1) 
 - toolchain-xtensa @ 2.40802.200502 (4.8.2)
Converting tasmota.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ strict
Found 29 compatible libraries
Scanning dependencies...
Dependency Graph
|-- headers
|   |-- EEPROM @ 1.0
|   |-- ESP8266WebServer @ 1.0
|   |   |-- ESP8266WiFi @ 1.0
|   |-- ESP8266WiFi @ 1.0
|-- EEPROM 24C128_256_521
|   |-- Wire @ 1.0
|-- UdpListener @ 1.0
|-- Unishox Compressor Decompressor highly customized and optimized for ESP8266 and Tasmota @ 1.0
|-- TLS mini client derived from Arduino @ 1.0
|   |-- ESP8266WiFi @ 1.0
|   |-- BearSSL @ 0.6
|-- DNSServer @ 1.1.1
|   |-- ESP8266WiFi @ 1.0
|-- DnsClient @ 1.0
|   |-- ESP8266WiFi @ 1.0
|-- ESP8266HTTPClient @ 1.2
|   |-- ESP8266WiFi @ 1.0
|-- ESP8266WebServer @ 1.0
|   |-- ESP8266WiFi @ 1.0
|-- ESP8266WiFi @ 1.0
|-- ESP8266httpUpdate @ 1.3
|   |-- ESP8266HTTPClient @ 1.2
|   |   |-- ESP8266WiFi @ 1.0
|   |-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|   |-- ESP8266WiFi @ 1.0
|-- JSMN JSON parser customized and optimized for ESP8266 and Tasmota @ 1.0
|-- TasmotaLList @ 1.0
|-- LinkedList
|-- LittleFS(esp8266) @ 0.1.0
|-- PubSubClient @ 2.8
|-- Ext-printf @ 1.0
|-- SD(esp8266) @ 2.0.0
|   |-- SDFS @ 0.1.0
|   |   |-- SPI @ 1.0
|   |   |-- ESP8266SdFat @ 1.1.0
|   |   |   |-- SPI @ 1.0
|-- SPI @ 1.0
|-- ESP8266SdFat @ 1.1.0
|   |-- SPI @ 1.0
|-- TasmotaSerial @ 3.5.0
|-- Ticker @ 1.0
|-- Wire @ 1.0
|-- base64 @ 1.1.1
|-- BearSSL @ 0.6
Building in release mode
*** use provided user_config_override.h as planned ***
Using manually specified: COM5
Compiling .pio/build/tasmota/src/tasmota.ino.cpp.o
Compiling .pio/build/tasmota/src/tasmota_xsns_sensor/xsns_62_esp32_mi_homekit.c.o
Compiling .pio/build/tasmota/src/tasmota_support/homekit.c.o
Generating LD script .pio/build/tasmota/ld/local.eagle.app.v6.common.ld
Compiling .pio/build/tasmota/lib42e/EEPROM/EEPROM.cpp.o
Compiling .pio/build/tasmota/libbc6/ESP8266WiFi/BearSSLHelpers.cpp.o
In file included from tasmota/my_user_config.h:1142:0,
                 from /tasmota/tasmota/tasmota.ino:27:
tasmota/user_config_override.h:11:0: warning: "MQTT_TLS_ENABLED" redefined [enabled by default]
 #define MQTT_TLS_ENABLED true
 ^
In file included from /tasmota/tasmota/tasmota.ino:27:0:
tasmota/my_user_config.h:180:0: note: this is the location of the previous definition
 #define MQTT_TLS_ENABLED       false             // [SetOption103] Enable TLS mode (requires TLS version)
 ^
Compiling .pio/build/tasmota/libbc6/ESP8266WiFi/CertStoreBearSSL.cpp.o
Compiling .pio/build/tasmota/libbc6/ESP8266WiFi/ESP8266WiFi.cpp.o
Compiling .pio/build/tasmota/libbc6/ESP8266WiFi/ESP8266WiFiAP.cpp.o
Compiling .pio/build/tasmota/libbc6/ESP8266WiFi/ESP8266WiFiGeneric.cpp.o
Compiling .pio/build/tasmota/libbc6/ESP8266WiFi/ESP8266WiFiGratuitous.cpp.o
/tasmota/tasmota/tasmota_xdrv_driver/xdrv_05_irremote.ino:62:29: fatal error: IRremoteESP8266.h: No such file or directory

*************************************************************************
* Looking for IRremoteESP8266.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:IRremoteESP8266.h"
* Web  > https://registry.platformio.org/search?q=header:IRremoteESP8266.h
*
*************************************************************************

 #include <IRremoteESP8266.h>
                             ^
compilation terminated.
Compiling .pio/build/tasmota/libbc6/ESP8266WiFi/ESP8266WiFiMulti.cpp.o
Compiling .pio/build/tasmota/libbc6/ESP8266WiFi/ESP8266WiFiSTA-WPS.cpp.o
Compiling .pio/build/tasmota/libbc6/ESP8266WiFi/ESP8266WiFiSTA.cpp.o
Compiling .pio/build/tasmota/libbc6/ESP8266WiFi/ESP8266WiFiScan.cpp.o
Compiling .pio/build/tasmota/libbc6/ESP8266WiFi/WiFiClient.cpp.o
*** [.pio/build/tasmota/src/tasmota.ino.cpp.o] Error 1
================================================================================ [FAILED] Took 16.82 seconds ================================================================================

Environment    Status    Duration
-------------  --------  ------------
tasmota        FAILED    00:00:16.821
=========================================================================== 1 failed, 0 succeeded in 00:00:16.821 ===========================================================================
All done! Find your builds in Tasmota/build_output/firmware/

This is with Tasmota v12.1.0 (806c5762bc19b322bfa3634e730fa11f89df823a) and the following user_config_override.h:

/*
  user_config_override.h - user configuration overrides my_user_config.h for
  Tasmota
*/

#ifndef _USER_CONFIG_OVERRIDE_H_
#define _USER_CONFIG_OVERRIDE_H_

#ifndef USE_MQTT_TLS
#define USE_MQTT_TLS
#define MQTT_TLS_ENABLED true
#define USE_MQTT_TLS_CA_CERT
#endif

#endif // _USER_CONFIG_OVERRIDE_H_

And with the following change to platformio_tasmota_env.ini:

 [env:tasmota]
+lib_extra_dirs          = lib/lib_ssl

Interestingly, the message All done! Find your builds in Tasmota/build_output/firmware/ is printed despite the immediately preceding message tasmota FAILED 00:00:16.821.

ERROR: Could not find a version that satisfies the requirement platformio (from versions: none)

Could not find a version that satisfies the requirement platformio while compiling with Docker

Hello,

I am facing an Python PIP issue while compiling Tasmota with Docker:

ERROR: Could not find a version that satisfies the requirement platformio (from versions: none)
ERROR: No matching distribution found for platformio
WARNING: There was an error checking the latest version of pip.
The command '/bin/sh -c pip install --upgrade pip &&    pip install --upgrade platformio' returned a non-zero code: 1

Building

My env

Type Value
CPU 12th Gen Intel(R) Core(TM) i5-12400
OS Ubuntu 22.04.1 LTS
Kernel 5.19.0-38-generic
Python 3.10.6
$ cat /proc/cpuinfo | grep "model name"
model name      : 12th Gen Intel(R) Core(TM) i5-12400
model name      : 12th Gen Intel(R) Core(TM) i5-12400
$ cat /etc/issue
Ubuntu 22.04.1 LTS \n \l
$ uname -a
Linux chip-vm 5.19.0-38-generic #39~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 17 21:16:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ python3 -V
Python 3.10.6

How to reproduce

git clone https://github.com/tasmota/docker-tasmota
Cloning into 'docker-tasmota'...
remote: Enumerating objects: 192, done.
remote: Counting objects: 100% (192/192), done.
remote: Compressing objects: 100% (114/114), done.
remote: Total 192 (delta 109), reused 146 (delta 76), pack-reused 0
Receiving objects: 100% (192/192), 50.79 KiB | 2.12 MiB/s, done.
Resolving deltas: 100% (109/109), done.
user@host:~$ cd docker-tasmota/
user@host:~/docker-tasmota$ sudo docker build -t docker-tasmota .
[sudo] password for user:
Sending build context to Docker daemon  144.9kB
Step 1/10 : FROM python:latest
latest: Pulling from library/python
3e440a704568: Pull complete
68a71c865a2c: Pull complete
670730c27c2e: Pull complete
5a7a2c95f0f8: Pull complete
6d627e120214: Pull complete
f8c6dc678081: Pull complete
48bd2de548fc: Pull complete
e69bcee2d314: Pull complete
284a2f237609: Pull complete
Digest: sha256:5329e75033c4446dc92d702cf8ebbeb63e549d9b83076a776f6753e10817fc3c
Status: Downloaded newer image for python:latest
 ---> df3e9d105d6c
Step 2/10 : LABEL description="Docker Container with a complete build environment for Tasmota using PlatformIO"       version="12.3"                                 maintainer="blakadder_"       organization="https://github.com/tasmota"
 ---> Running in bc6a7cd097e6
Removing intermediate container bc6a7cd097e6
 ---> 2530b3252f6c
Step 3/10 : RUN pip install --upgrade pip &&    pip install --upgrade platformio
 ---> Running in 47fe14907c9b
Requirement already satisfied: pip in /usr/local/lib/python3.11/site-packages (22.3.1)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ff58fd04ad0>: Failed to establish a new connection: [Errno -3] Temporary fail                          ure in name resolution')': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ff58f9b3050>: Failed to establish a new connection: [Errno -3] Temporary fail                          ure in name resolution')': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ff58f9b38d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ff58f9d8210>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ff58f9d8b90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: There was an error checking the latest version of pip.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f1ba36370d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/platformio/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f1ba3637bd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/platformio/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f1ba363c510>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/platformio/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f1ba363cd90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/platformio/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f1ba363d710>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/platformio/
ERROR: Could not find a version that satisfies the requirement platformio (from versions: none)
ERROR: No matching distribution found for platformio
WARNING: There was an error checking the latest version of pip.
The command '/bin/sh -c pip install --upgrade pip &&    pip install --upgrade platformio' returned a non-zero code: 1

Could you tell me how to fix this problem and compile?

Regards

Error: Unknown board ID 'esp32_4M'

When I'm building tasmota32 with blakadder/docker-tasmota I get the error Error: Unknown board ID 'esp32_4M'

Processing tasmota32 (framework: arduino; platform: https://github.com/tasmota/platform-espressif32/releases/download/2022.12.2/platform-espressif32.zip; board: esp32_4M)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Platform Manager: Installing https://github.com/tasmota/platform-espressif32/releases/download/2022.12.2/platform-espressif32.zip
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Platform Manager: [email protected] has been installed!
Error: Unknown board ID 'esp32_4M'

How can I solve this?

features arent compiled in builds

hi!

i want to compile (on debian) my own build with multiple feature enabled like shutters or sensors. but my builds do not contain these features. i tested several builds with shutter feature.

platformio_override.ini and user_config_override.h are copied to docker-tasmota/Tasmota.
my command is: ./compile.sh tasmota_latest-full_rules tasmota_latest_sensors-shutter-full_rules tasmota_latest_lite-full_rules tasmota_latest_min-full_rules tasmota_latest_lite-shutter-full_rules

platformio_override.ini:

[env:tasmota_latest-full_rules]
build_unflags           = ${common.build_unflags}
build_flags             = ${env.build_flags} -D FW_FULLRULES

[env:tasmota_latest_sensors-shutter-full_rules]
;extends = env:tasmota-sensors
build_unflags           = ${common.build_unflags}
build_flags             = ${env.build_flags} -D FW_FULLRULES -D SHUTTERS -D SENSORS

[env:tasmota_latest_lite-full_rules]
;extends = env:tasmota-lite
build_unflags           = ${common.build_unflags}
build_flags             = ${env.build_flags} -D FW_FULLRULES -D LITE

[env:tasmota_latest_lite-shutter-full_rules]
;extends = env:tasmota-lite
build_unflags           = ${common.build_unflags}
build_flags             = ${env.build_flags} -D FW_FULLRULES -D SHUTTERS -D LITE

[env:tasmota_latest_min-full_rules]
;extends = env:tasmota-minimal
build_unflags           = ${common.build_unflags}
build_flags             = ${env.build_flags} -D FW_FULLRULES -D MIN

user_config_override.h:

#ifdef SHUTTERS
    #ifndef USE_SHUTTER
    #define USE_SHUTTER             // Add Shutter support for up to 4 shutter with different motortypes (+6k code)
    #define SHUTTER_CLEAR_PWM_ONSTOP    // for shutter pwm on endstop
    #endif
#endif

#ifdef FW_FULLRULES
    // -- CODE_IMAGE_STR is the name shown between brackets on the 
    //    Information page or in INFO MQTT messages
    #undef CODE_IMAGE_STR
    #define CODE_IMAGE_STR "fullrules"
    
    #ifndef USE_EXPRESSION
    #define USE_EXPRESSION         // Add support for expression evaluation in rules (i.e. =,+,-, ...) (+3k2 code, +64 bytes mem)  
    #endif

    #ifndef SUPPORT_IF_STATEMENT
    #define SUPPORT_IF_STATEMENT   // Add support for IF statement in rules (+4k2 code, -332 bytes mem)  
    #endif
#endif

#ifdef SENSORS
    #ifndef FIRMWARE_SENSORS
    #define FIRMWARE_SENSORS
    #endif
#endif

#ifdef LITE
    #ifndef FIRMWARE_LITE
    #define FIRMWARE_LITE
    #endif
#endif

#ifdef MIN
    #ifndef FIRMWARE_MINIMAL
    #define FIRMWARE_MINIMAL 
    #endif
#endif

where is my mistake?

Missing documentation regarding user_config_override.h with docker build

After spending way too long trying to figure out why my custom tasmota build wouldn't compile using the instructions here, I would like to suggest an update for the docs.

The docs say: "If you have a user_config_override.h or platformio_override.ini file with your custom settings you can put them in the script folder and they will be used on the next script run."

However, if one tries to do that and compile using the docker container, the user_config_override.h is completely ignored. I believe this is because the compile.sh script actually copies the .h file to the ./tasmota/ subdirectory, and that is where the build process can actually find it. However the Docker entrypoint does not seem to use the compile.sh script, so the file needs to be copied to the correct subdirectory manually.

Maybe add a line under "How to use docker container", specifying that in this particular case the override files need to be copied to $(pwd)/Tasmota/tasmota ?

Also, a big THANK YOU to whoever had the idea of providing a Docker image for compiling tasmota - it has made my life (as a person who does not always have a working PIO installation) a lot easier... :)

Fedora: Build failure

This is my first attempt to compile Tasmota. I believe I have followed the documentation.
I tried both grabbing the pre-built blakadder docker container and building my own. With the same result.

$ cd /var/tmp
$ git clone https://github.com/tasmota/docker-tasmota
$ cd docker-tasmota
$ docker build -t docker-tasmota .
$ cd ..
$ git clone https://github.com/arendst/Tasmota.git
$ docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -u $UID:$GID docker-tasmota -e tasmota-minimal
Compiling Tasmota...
Usage: pio run [OPTIONS]
Try 'pio run -h' for help.

Error: Invalid value for '-d' / '--project-dir': Path '/tasmota' is not readable.
All done! Find your builds in Tasmota/build_output/firmware/

ARM64 container

Hi,

it would be awesome to add an ARM64 container to docker hub...
Is this possible?

BR,
Alex

How to update docker image to last platformio

I'm getting errors below

Error: Development platform 'espressif32' is not compatible with PlatformIO Core v6.1.5 and depends on PlatformIO Core >=6.1.6.

As far as I can tell the PlatformIO library needs updating inside the image and the compile script seems to imply it will update this.

Not sure how to force it and why it doesn't refresh with a new docker pull

Any pointers appreciated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.