User Tools

Site Tools


tasmotabuild

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tasmotabuild [2021/12/06 18:40]
topmin created
tasmotabuild [2022/08/09 15:20] (current)
Line 1: Line 1:
 +=== Flash Xiaomi Mi Humi Sensors ===
 +[[XiaomiHumiFlash]]
 +
 +=== Connect to tasmota via usb/serial ===
 +
 +Make sure you have miniterm installed 'sudo apt install miniterm' 
 +
 +Connect the device directly vis usb or a serial to usb converter
 +
 +Enter `dmesg` too see which ttyUSB[X] device it is, where [X] is a number (probably 0)
 +
 +Crank 'miniterm /dev/ttyUSB[X] 115200 -e' into the terminal.
 +
 +Hack 'Status 11' into the terminal and see the wifi params.
 +
 +If you need to reprogramn them prepare the following line in kate (or any other text editor):
 +<code>
 +Backlog SSID1 yourwifi1; Password1 yourpassword1; SSID2 yourwifi2; Password2 yourpassword2; MqttHost 192.168.2.5
 +</code>
 +
 +Then copy and paste it into the miniterm and hit enter.
 +
 +It should restart and connect to your wifi finally...
 +
 +
 +
 === Build Tasmota from Scratch on linux === === Build Tasmota from Scratch on linux ===
-**Cli only+** Cli only / (no vscode needed) **
  
 Look here but install python3-pip instead of python-pip on ubuntu >=20 Look here but install python3-pip instead of python-pip on ubuntu >=20
 https://tasmota.github.io/docs/PlatformIO-CLI/#download-the-tasmota-source-code https://tasmota.github.io/docs/PlatformIO-CLI/#download-the-tasmota-source-code
 +a backup is here [[installplatformio-copy|installplatformio-copy]]
 +
 +Put this at the end of tasmota/user_config_override.h.
 +Fill in passwords and MQTT Server.
 +
 +<code>
 +// !!! Remember that your changes GOES AT THE BOTTOM OF THIS FILE right before the last #endif !!!
 +*/
 +
 +
 +#undef  CFG_HOLDER
 +#define CFG_HOLDER        4723                  // [Reset 1] Change this value to load SECTION1 configuration parameters to flash
 +
 +#define MODULE                 SONOFF_BASIC      // [Module] Select default module from tasmota_template.h
 +
 +#undef MQTT_FULLTOPIC 
 +#define MQTT_FULLTOPIC         "%prefix%/%topic%/" // [FullTopic] Subscribe and Publish full topic name - Legacy topic
 +#undef MQTT_TOPIC
 +#define MQTT_TOPIC             "SONOFF/%06X"   // [Topic] unique MQTT device topic including (part of) device MAC address
 +
 +// -- Setup your own Wifi settings  ---------------
 +#undef  STA_SSID1
 +#define STA_SSID1         "stystowlan2"             // [Ssid1] Wifi SSID
 +
 +#undef  STA_PASS1
 +#define STA_PASS1         ""     // [Password1] Wifi password
 +
 +// -- Setup your own Wifi settings  ---------------
 +#undef  STA_SSID2
 +#define STA_SSID2         "homebasket3"             // [Ssid1] Wifi SSID
 +
 +#undef  STA_PASS2
 +#define STA_PASS2         ""     // [Password1] Wifi password
 +
 +// -- Setup your own MQTT settings  ---------------
 +#undef  MQTT_HOST
 +#define MQTT_HOST         "192.168.0.18" // [MqttHost]
 +
 +
 +
 +</code>
 +
 +
 +For typcial sonoff use this to compile and upload:
 +<code>platformio run -e tasmota --target upload --upload-port /dev/ttyUSB0
 +</code> 
 +
 +For esp32 and bluetooth use this:
 +<code>platformio run -e tasmota32-bluetooth --target upload --upload-port /dev/ttyUSB0</code>
 +Or esptool
 +<code>esptool.py -p /dev/ttyUSB0 --chip esp32 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dout --flash_size detect 0x0 tasmota32.bluetooth.bin
 +</code>
 +
 +If compiler errors about missing dependcies show up delete your .platformio folder, which might contain files from previous platforms
 +
 +
tasmotabuild.1638812421.txt.gz · Last modified: 2022/08/09 15:20 (external edit)