PlatformIO CLI - RTurala/Sonoff-Tasmota GitHub Wiki
How to flash the Tasmota firmware onto a device using the platformio
command line interface on Linux. This manual was tested on Ubuntu 17.10.
Prerequisites
Install Python and PIP
sudo apt-get install python-pip
Install PlatformIO CLI
sudo pip install -U platformio
Download the Sonoff-Tasmota source code
Either download the latest Tasmota release Source code from https://github.com/arendst/Sonoff-Tasmota/releases and extract it or clone the Git repository:
git clone https://github.com/arendst/Sonoff-Tasmota.git
Select the environment
Edit the file platformio.ini
and uncomment one of the env_default
lines by removing the ;
, eg.:
; *** Uncomment one of the lines below to build/upload only one environment
env_default = sonoff
;env_default = sonoff-CN
;env_default = sonoff-DE
;env_default = sonoff-ES
;env_default = sonoff-FR
;env_default = sonoff-IT
;env_default = sonoff-NL
;env_default = sonoff-PL
;env_default = sonoff-minimal
;env_default = sonoff-ds18x20
Compile and upload
Once all the prerequisites are in place compiling and uploading is one simple command. Execute this from within the Sonoff-Tasmota
source code directory:
platformio run --target upload --upload-port /dev/ttyXYZ
Just make sure to replace /dev/ttyXYZ
with the actual serial port your device is connected to.
Depending on your configuration your user account may need to be in the dialout
group.