Giter VIP home page Giter VIP logo

tasmotizer's Introduction

GitHub All Releases https://pypi.org/project/tasmotizer/ GitHub release (latest SemVer) https://www.buymeacoffee.com/eYmkLXO

The full-featured ESP8266 flashing tool for Tasmota. With the great ESPtool from Espressif under the hood, and all required settings by default.

Features

  • Automatic backup of current ESP image before flashing: in case you want to return to manufacturer firmware
    Now supporting backup sizes up to 16MB

  • Flash local .bin images, or simply select from release or development images: it will download them automatically

  • Send configuration to flashed device via serial: one-click configure of Wifi (including recovery AP), MQTT, Module and/or Template

  • Single-click get the IP of your device (DISCLAIMER: this functionality depends on the current state of your device, so it might require a few tries to get the proper result)

  • Dark theme: proven to increase flashing speed and reliability

Installation and how to run

  • Option 1: get Windows standalone executable (thanks @Jason2866):
    tasmotizer.exe (64bit)
    tasmotizer-x86.exe (32bit)
    In the odd case of your antivirus going haywire over that application, it's a false positive.

  • Option 2: Install from PyPI using pip:
    Upgrade pip and wheel packages: pip3 install --upgrade pip wheel
    Install tasmotizer: pip3 install tasmotizer
    Then simply run tasmotizer.py or python3 -m tasmotizer.py from the shell/command line

  • Option 3: Build from source
    Clone the repo
    Upgrade pip and wheel packages: pip3 install --upgrade pip wheel
    Install requirements pip3 install -r requirements.txt
    Run python3 tasmotizer.py and flash away!

Screenshots

(c) 2019 Jacek Ziółkowski https://github.com/jziolkowski

tasmotizer's People

Contributors

ascillato avatar freddii avatar jason2866 avatar jtagcat avatar jziolkowski avatar mxr avatar njh avatar revk avatar tisila avatar vladspbru avatar

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  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  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

tasmotizer's Issues

Flashing of Tasmota which is compiled for device with 4MB Flash usage is not working proper [used Tasmotizer 1.1c]

Hello,
I have WEMOS D1 mini R2 which has 4MB of Flash.
I compiled the TASMOTA Firmware with the following settings.

[platformio_override.ini]
[common]
board_build.ldscript = eagle.flash.4m2m.ld

[user_config_override.h]
//Enable USAGE of the 4MB Flash of the Wemos D1 R2
#ifndef USE_SCRIPT_FATFS
#define USE_SCRIPT_FATFS -1
#endif
#ifndef FAT_SCRIPT_SIZE
#define FAT_SCRIPT_SIZE 4096
#endif
#ifndef USE_SCRIPT_FATFS_EXT
#define USE_SCRIPT_FATFS_EXT
#endif
#ifndef SDCARD_DIR
#define SDCARD_DIR
#endif

After flashing the tasmota.bin. The WEMOS D1 mini is starting and anything seems to be work, but it is not possible to configure the device. Which means all the settings you do e.g. Port configuration will get lost after the restart is done which is triggered by the SAVE command.

If I flash the same Tasmot.bin directly out of Visual Studio Code the SW runs and I can save the configs and they will be there after restart.

I asume, that maybe Tasmotizer 1.1c did not flash all the blocks which are needed with configuration of 4MB flash size.

Pass Phrases with Spaces

It seems that the Send Config does not work if the Password for the network SSID has spaces in it. It tells me that it sent 246 characters, but nothing happens.

If I send it another SSID and password pair that does not have spaces in the Password, it works.

I tried single and double quoting the Password, but that did not help. It took the quote marks as part of the Password.

I am running tasmotizer-1.1a.exe on Win10.

I also tried escaping the spaces with . No Joy.

Thanks!

Error 2

Ubuntu 18.04.3

vav4eg@vav4eg:$ git clone https://github.com/tasmota/tasmotizer.git
Клонирование в «tasmotizer»…
remote: Enumerating objects: 89, done.
remote: Counting objects: 100% (89/89), done.
remote: Compressing objects: 100% (64/64), done.
remote: Total 89 (delta 43), reused 42 (delta 19), pack-reused 0
Распаковка объектов: 100% (89/89), готово.
vav4eg@vav4eg:
$ cd ^C
vav4eg@vav4eg:$ cd tasmotizer
vav4eg@vav4eg:
/tasmotizer$ pip3 install tasmotizer
Collecting tasmotizer
Using cached https://files.pythonhosted.org/packages/2d/eb/def84f3c8667dde54e7c732b82e657cd2b7313e7a6d8009b79338bb278cc/tasmotizer-1.1.1-py3-none-any.whl
Collecting pyserial>=3.0 (from tasmotizer)
Using cached https://files.pythonhosted.org/packages/0d/e4/2a744dd9e3be04a0c0907414e2a01a7c88bb3915cbe3c8cc06e209f59c30/pyserial-3.4-py2.py3-none-any.whl
Collecting PyQt5>=5.10 (from tasmotizer)
Using cached https://files.pythonhosted.org/packages/3a/fb/eb51731f2dc7c22d8e1a63ba88fb702727b324c6352183a32f27f73b8116/PyQt5-5.14.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.6/tokenize.py", line 452, in open
buffer = builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-8any1nz
/PyQt5/setup.py'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8any1nz_/PyQt5/

Feature Request: OTA

It would be nice if Tasmotizer could also be used OTA, by detecting any OTA-enabled device on the LAN and list that in the "Port" section.

Send config options always grayed out?

Using the v1.1 Windows binary, after flashing a device (using the 'Release 8.2.0' radio button), if I go to 'Send config', the options are grayed out. How does one send the configuration?

How to send config

I programmed a device successfully, then tried to use the "Send Config" option. What I got was a grayed out screen with no way to enter any info to it. I suppose I'm doing something wrong, but not sure what.
taz

config

With this screen when I click "save" it attempts to upload the default config to the device.

Windows 1.1a GUI Quits before flashing

I have tried to use the Windows 1.1a EXE and as soon as I click on the "release" or "development" selectors in the middle the app quits. I want to be able to select from the dropdown the release to install but the app just quits.

I have tried both the x86 one, and the other.

Installation failure Raspbian buster.

pi@raspberrypi:~ $ pip3 install tasmotizer
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting tasmotizer
Using cached tasmotizer-1.1.1-py3-none-any.whl (243 kB)
Collecting PyQt5>=5.10
Using cached PyQt5-5.14.1.tar.gz (3.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpgsh433v9
cwd: /tmp/pip-install-z0ot5wcg/PyQt5
Complete output (31 lines):
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 103, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
    main()
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 108, in prepare_metadata_for_build_wheel
    config_settings)
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 136, in _get_wheel_metadata_from_wheel
    whl_basename = backend.build_wheel(metadata_directory, config_settings)
  File "/tmp/pip-build-env-ssz2bvja/overlay/lib/python3.7/site-packages/sipbuild/api.py", line 51, in build_wheel
    project = AbstractProject.bootstrap('pep517')
  File "/tmp/pip-build-env-ssz2bvja/overlay/lib/python3.7/site-packages/sipbuild/abstract_project.py", line 82, in bootstrap
    project.setup(pyproject, tool, tool_description)
  File "/tmp/pip-build-env-ssz2bvja/overlay/lib/python3.7/site-packages/sipbuild/project.py", line 387, in setup
    self.apply_user_defaults(tool)
  File "project.py", line 62, in apply_user_defaults
    super().apply_user_defaults(tool)
  File "/tmp/pip-build-env-ssz2bvja/overlay/lib/python3.7/site-packages/pyqtbuild/project.py", line 86, in apply_user_defaults
    super().apply_user_defaults(tool)
  File "/tmp/pip-build-env-ssz2bvja/overlay/lib/python3.7/site-packages/sipbuild/project.py", line 202, in apply_user_defaults
    self.builder.apply_user_defaults(tool)
  File "/tmp/pip-build-env-ssz2bvja/overlay/lib/python3.7/site-packages/pyqtbuild/builder.py", line 68, in apply_user_defaults
    "specify a working qmake or add it to PATH")
sipbuild.pyproject.PyProjectOptionException
----------------------------------------

ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpgsh433v9 Check the logs for full command output.
pi@raspberrypi:~ $

REQUEST: Show new ip address

feature request. once wifi config info has been uploaded, read the serial output and show in tasmotizer the IP the device got.

Flashed but wifi does not stay on long enough to connect

Hi,

I just flashed a TYWE3S and it said it was done successful.
I disconnected the wires and put the batteries back in, My phone finds the wifi network, It connects without internet and then when I enter the IP 192.168.4.1 in my chrome browser the wifi disconnects and can't be found up-until I take the batteries out and insert them again. Then same thing happens.

I flashed Tasmota.bin to a tuya wifi door sensor using tasmotizer. OTA did not work.

Please give me some advice

Install in Linux mint PyQt5 Issue-Windows only ?

Can't get running in linux mint. pip3 install PyQt5 pyserial returns >
Could not find a version that satisfies the requirement PyQt5 (from versions: )
No matching distribution found for PyQt5.
Is PyQt5 windows only ? if so what can be used instead.

Don't upgrade

By using:

pip3 install --upgrade tasmotizer

it does not install latest version 1.1c

Tasmotizer not starting

Hi,

Tasmotizer stopped working for me today:

I tried upgrading to version 1.2 and I get this error in Terminal:
tasmotizer.py
Traceback (most recent call last):
File "/usr/local/bin/tasmotizer.py", line 23, in
from utils import MODULES, NoBinFile, NetworkError
ModuleNotFoundError: No module named 'utils'

I use a Mac running the latest version of Catalina.

Any idea?

Many thanks!

N

Tasmotizer 1.1c for esp32

I am trying to flash tasmota32-webcam.bin to esp32 device, but the Tasmotizer does not see the tasmota32 firmware files. I downloaded the tasmota32-webcam.bin file and tried to use Tasmotizer 1.1c to flash the device, but I get an error "Invalid head of packet(0x46)". Is there a Tasmotizer version that would flash the tasmota32 files?

Failed to connect to ESP8266: Timed out waiting for packet header (Sonoff iFan03)

Hi there,

just wanted to say thank you very much for making this code publicly available! May I ask for help flashing on following environment:

Device: Sonoff iFan03 DIY
Kernel: Linux arch200x 5.6.14-arch1-1 #1 SMP PREEMPT Wed, 20 May 2020 20:43:19 +0000 x86_64 GNU/Linux
Serial: Using FTDI

[ 2559.447673] usb 8-2: new full-speed USB device number 20 using uhci_hcd
[ 2560.075762] usb 8-2: New USB device found, idVendor=0403, idProduct=8a8a, bcdDevice= 6.00
[ 2560.075769] usb 8-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2560.075775] usb 8-2: Product: FT232R USB UART OPAS_UNIV
[ 2560.075779] usb 8-2: Manufacturer: FTDI
[ 2560.075783] usb 8-2: SerialNumber: A6PVTAWC

Tasmotizer proposes /dev/ttyS0 as Port which I followed. Before I set the rights to flash over it with sudo chmod a+rw /dev/ttyS0. Jumper Pins of FTDI are on 3.3V.

When bringing the Sonoff in Pairing Mode and trying to flash I get the following error:
Failed to connect to ESP8266: Timed out waiting for packet header

Could you please give me a hint? Thank you very much !

pip install fails on recent ubuntu/debian releases due to PyQt5

When trying to install on recent debian/ubuntu it fails to build PyQt5

$ pip3 install --user tasmotizer
Collecting tasmotizer
Downloading https://files.pythonhosted.org/packages/2d/eb/def84f3c8667dde54e7c732b82e657cd2b7313e7a6d8009b79338bb278cc/tasmotizer-1.1.1-py3-none-any.whl (243kB)
100% |████████████████████████████████| 245kB 2.1MB/s
Collecting PyQt5>=5.10 (from tasmotizer)
Downloading https://files.pythonhosted.org/packages/3a/fb/eb51731f2dc7c22d8e1a63ba88fb702727b324c6352183a32f27f73b8116/PyQt5-5.14.1.tar.gz (3.2MB)
100% |████████████████████████████████| 3.2MB 343kB/s
Installing build dependencies ... done
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.7/tokenize.py", line 447, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-9r2xzzk3/PyQt5/setup.py'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-9r2xzzk3/PyQt5/

As a workaround you can install the system package instead via "sudo apt-get install python3-pyqt5"
Then the pip install completes

New version of Magic Home - Tasmotizer can't connect

The chip inside the new LED controllers from Magic Home is changed from ESP to probably Suzhou SmartChip Semiconductor Co., LTD. This one cannot be programmed by Tasmotizer. The pinout seemed to be the same. However the resitance is different. The Tasmotizer doesn't connect at all to the new chip.

chip
IMG_1956
IMG_1959
IMG_1960
IMG_1961

Error during execution after clone install

pi@raspberrypi:~/Downloads/tasmotizer $ python3 tasmotizer.py
libEGL warning: DRI2: failed to authenticate
qt5ct: using qt5ct plugin
qt5ct: palette support is disabled
qt5ct: custom style sheet is disabled

Send Commands

First of all,
Thank you for this amazing piece of software !

My question is how to send commands to the device (in my case a Sonoff Basic)
like the "setoption19 1"

Is this posible using tasmotizer ?

Thanks in advance
Regards

Error at programming Tasmota

Hi.

I try to programm a nodeMCU with ESP32 with the Tasmota.bin oder Tasmota-sensors.bin
The following message pops up in Tasmotizer:
a fatal error occurred invalid head of packet 0x46
Did anyone has an idea for this ?
Greatings
Rüdiger

Config reliability

No doubt about it, Tasmotizer is the best way to Tasmotize our ESPs, but on several occations I've found the CONFIG section less than reliable. If I use Tasmotizer to flash the chip then flick over to my phone and enter the SSID, pass and ID, the chip hops onto my network every time, but if I choose instead to use the config page on Tasmotizer, it doesn't always work and I sometimes end up having to re-flash the ESP (using Tasmotizer of course). Am I alone?

MacOS 10.12.6: Import error, Symbol not found: _futimens

First try to install on a Macbook Pro, OS X 10.12.6, installs correctly but will not run.
Is this an "Update Your Operating System" and forward compatibility issue?

Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (which was built for Mac OS X 10.13)

All the messages from install to fail:

jm:Tasmota jm$ pip3 install tasmotizer
Collecting tasmotizer
  Downloading https://files.pythonhosted.org/packages/2d/eb/def84f3c8667dde54e7c732b82e657cd2b7313e7a6d8009b79338bb278cc/tasmotizer-1.1.1-py3-none-any.whl (243kB)
     |████████████████████████████████| 245kB 1.3MB/s 
Collecting PyQt5>=5.10
  Downloading https://files.pythonhosted.org/packages/1e/8f/dd8312af6ed44c15419fb14c38b6532eeb765c428f0642e30dc3ef26b6d4/PyQt5-5.14.0-5.14.0-cp35.cp36.cp37.cp38-abi3-macosx_10_6_intel.whl (43.0MB)
     |████████████████████████████████| 43.0MB 2.4MB/s 
Requirement already satisfied: pyserial>=3.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tasmotizer) (3.4)
Collecting PyQt5-sip<13,>=12.7
  Downloading https://files.pythonhosted.org/packages/91/13/306b26bc8870c63e30af47d18a5dee5253adf5b523b2d0afc1fc023affdc/PyQt5_sip-12.7.0-cp36-cp36m-macosx_10_6_intel.whl (124kB)
     |████████████████████████████████| 133kB 387kB/s 
Installing collected packages: PyQt5-sip, PyQt5, tasmotizer
  Found existing installation: PyQt5 5.9
    Uninstalling PyQt5-5.9:
      Successfully uninstalled PyQt5-5.9
Successfully installed PyQt5-5.14.0 PyQt5-sip-12.7.0 tasmotizer-1.1.1
jm:Tasmota jm$ tasmotizer.py
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/bin/tasmotizer.py", line 7, in <module>
    import tasmotizer_esptool as esptool
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tasmotizer_esptool.py", line 36, in <module>
    from PyQt5.QtCore import pyqtSignal, QObject, pyqtSlot
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyQt5/QtCore.abi3.so, 2): Symbol not found: _futimens
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (which was built for Mac OS X 10.13)
  Expected in: /usr/lib/libSystem.B.dylib
 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore

Thanks.

Trigger Backup without flashing

Great tool! Love the built-in backup before flash function.
It would be great if that could be triggered by itself without the need of flashing the device!

OSX issue

image

sudo tasmotizer.py
esptool.py v2.8
Serial port /dev/tty.usbserial-14610
Traceback (most recent call last):
  File "/usr/local/bin/tasmotizer.py", line 86, in execute
    esptool.main(command)
  File "/usr/local/lib/python3.8/site-packages/tasmotizer_esptool.py", line 2930, in main
    esp = chip_class(each_port, initial_baud, args.trace)
  File "/usr/local/lib/python3.8/site-packages/tasmotizer_esptool.py", line 268, in __init__
    self._port = serial.serial_for_url(port)
  File "/usr/local/lib/python3.8/site-packages/serial/__init__.py", line 88, in serial_for_url
    instance.open()
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 272, in open
    self._reconfigure_port(force_update=True)
  File "/usr/local/lib/python3.8/site-packages/serial/serialposix.py", line 435, in _reconfigure_port
    termios.tcsetattr(
termios.error: (22, 'Invalid argument')
Abort trap: 6

When trying to Flash

No module named 'PyQt5.QtSerialPort'

Hi,

I followed install instructions, but cloning the repo and running python3 tasmotizer.py ends in:

Traceback (most recent call last):
  File "tasmotizer.py", line 15, in <module>
    from PyQt5.QtSerialPort import QSerialPortInfo, QSerialPort
ModuleNotFoundError: No module named 'PyQt5.QtSerialPort'

I can import PyQt5 in a python3 console, but running:

from PyQt5.QtSerialPort import QSerialPortInfo, QSerialPort

Results in the same error... PyQt5 does not seem to contain QtSerialPort.

ValueError: PyCapsule_GetPointer called with incorrect name

Thanks for this great tool.
I stumbled over the mentioned error. Something is wrong with the PyQT-module.
There are lots of these errors in different repositories.

I just wanted to mention that for me this helped:

pip3 uninstall PyQt5
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pyqt5==5.10.1

Hope this helps others having the same error on Linux/Ubuntu 18.04

Unable to send config file

Hi,
Flashed a Sonoff T2uk3ch using tasmotizer, that all works fine, powered off, disconnected gpio from gnd, powered on, try to send config of t1 3ch as per other users, reports sent ok, power off and on, not connecting to wifi, no ip address showing up in router, check in with termite, ipadress1 - reports ipUnSet. Wifi light ono Sonoff just flashes.

Request

Finally, a friendly GUI!

The program seems to work well, but i think there may be room for improvement in the config part. It could allow for sending a static IP setting, which would save the need to look for one in the router. Add that and we would have an instant config and known IP.

Thanks for making tinkering easier

Tasmotizer is awesome

I do not have a real "issue" per se... I just wanted to say that Tasmotizer is awesome!

I've used it to flash and configure countless devices. It is super intuitive, works flawlessly, and is well designed. I wish all the software I used was as simple/good as Tasmotizer.

Thanks for your contributions to the community.

crashes after clicking Tasmotize!

Installed with pip3 on a mac (OS X Mojave 10.14.6)

After setting the port and release binary crashes with

Traceback (most recent call last):
  File "/usr/local/bin/tasmotizer.py", line 657, in start_process
    dlg = FlashingDialog(self)
  File "/usr/local/bin/tasmotizer.py", line 303, in __init__
    esptool.sw.read_start.connect(self.read_start)
AttributeError: module 'esptool' has no attribute 'sw'
Abort trap: 6

esptool.py is verified as working (I used it to flash after reproducing the crash several times)

pyserial verified to be v3.4

Bug: Tasmotizer stucks in progress after backup finished

Sonoff products need a restart after the backup was made to be possible to erase and flash. However tasmotizer doesn't do it, and I need to do it, but at that moment and time the application crashes. And it's doesn't feel too well to randomly disconnect a device in the middle of theoretically flashing state.

Windows 1.1a version

Backup size for shelly devices should be 2MB

Hi,

The backup size should be variable. Shelly has a 2MB flash size.

Note: I had to clone the firmware from a new shelly 2.5 using esptool.py and restore it to the other shelly device.

Backup file size

Why is the backup more than 1 MB? How can a less than 1mb memory device restore backup which have more than 1MB?

Also stuck after flashing
image
Keeps like this for several minutes

Needs improvements

It looks that this is easy tool to flash firmware and not need to deal with long command line or addresses where to put which file (ESP8266flasher).

But program needs improvements to avoid crashes (tested windows version)

  • when selected port is already open e.g. in serial monitor, program crash. It should say that serial port cannot be open and allow to select another port or start flash again after port is closed

I tested with Wemos D1 mini

  • own selected bin file was uploaded correctly

  • upload release option ended with error

tasmotizer1

  • after previous error I am not able to flash back neither my own file.

tasmotizer2

  • after sucessfull flash device cannot be flashed again until is physically disconnected. Same error like above

  • when button OK is pressed it crash instead of stay open

Edit: Device had to be disconnected to flash it again but program didn't start. Now it cannot be flashed anymore. If I try flask from Visual Studio code I get this error:

Building .pioenvs\sonoff\firmware.bin
Checking size .pioenvs\sonoff\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
DATA:    [=======   ]  65.8% (used 53920 bytes from 81920 bytes)
PROGRAM: [=====     ]  47.2% (used 494499 bytes from 1048576 bytes)
Configuring upload protocol...
Looking for upload port...
Auto-detected: COM24
Uploading .pioenvs\sonoff\firmware.bin
Uploading 498640 bytes from .pioenvs\sonoff\firmware.bin to flash at 0x00000000
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
error: espcomm_upload_mem failed
*** [upload] Error -1 

Looks that device is dead. Thank you.

fails to start on linux mint 19.3

It seems your requirements are out-of-date or incomplete

sudo apt install python3-serial python3-pyqt5 --reinstall 
...
Setting up python3-serial (3.4-2) ...
Setting up python3-pyqt5 (5.10.1+dfsg-1ubuntu2) ...
... 
git clone https://github.com/tasmota/tasmotizer.git
cd tasmotizer
python3 tasmotizer.py

Traceback (most recent call last):
  File "tasmotizer.py", line 15, in <module>
    from PyQt5.QtSerialPort import QSerialPortInfo, QSerialPort
ModuleNotFoundError: No module named 'PyQt5.QtSerialPort'

I also tried:

python3 -m venv ./tasmotizer-venv
source tasmotizer-venv/bin/activate
pip install --upgrade pip setuptools pyserial --upgrade
pip install tasmotizer
Collecting tasmotizer
  Using cached https://files.pythonhosted.org/packages/2d/eb/def84f3c8667dde54e7c732b82e657cd2b7313e7a6d8009b79338bb278cc/tasmotizer-1.1.1-py3-none-any.whl
Collecting PyQt5>=5.10 (from tasmotizer)
  Using cached https://files.pythonhosted.org/packages/7c/5b/e760ec4f868cb77cee45b4554bf15d3fe6972176e89c4e3faac941213694/PyQt5-5.14.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.6/tokenize.py", line 452, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-z9oy7374/PyQt5/setup.py'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-z9oy7374/PyQt5/

Tasmotizer.py not found Ubuntu 18.04.3 LTS

step 1. sudo apt install python3-pip
step 2. pip3 install tasmotizer
step3. run tasmotizer.py

  • Command not found

Did I miss a step? I found tasmotizer in ~/.local/lib/python3.6/site-packages/

tasmotizer crashes after first operation

This is an issue when working with some devices which cannot self-reset successfully (e.g. Sonoff Touch switches). After each operation (original firmware backup, erase, flash), the device needs to be manually reset by power-cycling and bringing GPI00 to GND on boot. It is generally not possible to do while tasmotizer (underlying esptool) waits for connection, the timeout is not long enough and the app crashes instead of handling that gracefully. Also, if it involves power-cycling the usb dongle, the device gets destroyed/recreated and the app crashes again.

example:

$ tasmotizer.py 
esptool.py v2.8
Serial port /dev/tty.usbserial-1412210
Connecting....
Chip is ESP8285
Features: WiFi, Embedded Flash
Crystal is 26MHz
MAC: 2c:f4:32:aa:7d:57
Uploading stub...
Running stub...
Stub running...
Read 1048576 bytes at 0x0 in 95.7 seconds (87.7 kbit/s)...
Hard resetting via RTS pin...
esptool.py v2.8
Serial port /dev/tty.usbserial-1412210
Connecting........_____
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/serial/serialposix.py", line 493, in read
    buf = os.read(self.fd, size - len(read))
OSError: [Errno 6] Device not configured

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/esptool.py", line 378, in command
    p = self.read()
  File "/usr/local/lib/python3.7/site-packages/esptool.py", line 323, in read
    return next(self._slip_reader)
  File "/usr/local/lib/python3.7/site-packages/esptool.py", line 2072, in slip_reader
    read_bytes = port.read(1 if waiting == 0 else waiting)
  File "/usr/local/lib/python3.7/site-packages/serial/serialposix.py", line 509, in read
    raise SerialException('read failed: {}'.format(e))
serial.serialutil.SerialException: read failed: [Errno 6] Device not configured

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/serial/serialposix.py", line 323, in _reconfigure_port
    orig_attr = termios.tcgetattr(self.fd)
termios.error: (6, 'Device not configured')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/tasmotizer.py", line 86, in execute
    esptool.main(command)
  File "/usr/local/lib/python3.7/site-packages/esptool.py", line 2931, in main
    esp.connect(args.before)
  File "/usr/local/lib/python3.7/site-packages/esptool.py", line 506, in connect
    last_error = self._connect_attempt(mode=mode, esp32r0_delay=False)
  File "/usr/local/lib/python3.7/site-packages/esptool.py", line 486, in _connect_attempt
    self.sync()
  File "/usr/local/lib/python3.7/site-packages/esptool.py", line 427, in sync
    self.command()
  File "/usr/local/lib/python3.7/site-packages/esptool.py", line 389, in command
    self._port.timeout = saved_timeout
  File "/usr/local/lib/python3.7/site-packages/serial/serialutil.py", line 368, in timeout
    self._reconfigure_port()
  File "/usr/local/lib/python3.7/site-packages/serial/serialposix.py", line 326, in _reconfigure_port
    raise SerialException("Could not configure port: {}".format(msg))
serial.serialutil.SerialException: Could not configure port: (6, 'Device not configured')
Abort trap: 6

Also, at least on mac os, all tasmotizer exceptions are critical and bring up big system stack trace report windows, maybe it doesn't have to be so severe? Looks like this:

System stack trace report - https://prnt.sc/q7uzuv

I'm not entirely sure it is possible, but an option to wait between operations (so that any manual connection/resets could be done) could solve this.

Localization - Enabale localization in source code

@jziolkowski

Could be possible to improve the source code to have GUI in different language (ex. English/French/Italian/etc)?

Could be an idea to have a single one file with all strings for all languages or single file for strings for each language.

Thanks.

invalid syntax error running fresh tasmotizer download

Downloaded repo as a zip, minutes ago.

Installed requirements:
~/tasmotizer-release$ pip3 install -r requirements.txt
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pyserial in /usr/local/lib/python3.5/dist-packages (from -r requirements.txt (line 1)) (3.4)
Requirement already satisfied: PyQt5>=5.10 in /usr/local/lib/python3.5/dist-packages (from -r requirements.txt (line 2)) (5.15.1)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in /usr/local/lib/python3.5/dist-packages (from PyQt5>=5.10->-r requirements.txt (line 2)) (12.8.1)

Tried to get started:
~/tasmotizer-release$ python3 tasmotizer.py
File "tasmotizer.py", line 380
backup_size = f'0x{2 ** self.backup_size}00000'
^
SyntaxError: invalid syntax

What is going on here?

No module named 'tasmotizer_esptool'

I installed with sudo pip3 install tasmotizer and then ran:

➜ ~ tasmotizer.py                            
Traceback (most recent call last):
  File "/usr/local/bin/tasmotizer.py", line 7, in <module>
    import tasmotizer_esptool as esptool
ModuleNotFoundError: No module named 'tasmotizer_esptool'

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.