tasmota / mgos32-to-tasmota32

ESP32 Mongoose OS to Tasmota32 OTA updates for Shelly
GNU General Public License v3.0
163 stars 11 forks source link

Shelly Plug US Gen 2 to Tasmota fails halfway #83

Open spockatieee opened 1 month ago

spockatieee commented 1 month ago

Hi. I'm trying to transition a Shelly PlugUS Gen2 (Shelly firmware 1.4.4) to Tasmota32 using the Sep 30 version of the PlugUS zip file.

I followed the README instructions, and got as far as generating the Autoconf for the Shelly Plug US, while booted into Tasmota 12.5.0 Solo1. While I did have a bricked moment, doing OTA on local network with the mgos32-to-tasmota32 revived the Shelly and brought me back into Tasmota 12.5.0 (supposedly with the locked bootloader).

The next step, clicking on the Partition Wizard, just hangs. Looking at the console, these are the Berry errors that are generated (tried setting as high as WebLog 5, but no difference):

BRY: Exception> 'type_error' - unsupported operand type(s) for <=: 'nil' and 'int' stack traceback:

: in function `factory_migrate_eligible` : in function `show_migrate_to_factory` : in function `page_part_mgr` : in function `` Any clues on what may be wrong here? Thanks! More details from the Tasmota Information page:

Shelly Plug US

Tasmota

Program Version | 12.5.0(solo1)single-core -- | -- Build Date & Time | 2023-04-17T08:07:06 Core/SDK Version | 2_0_7/4.4.4.20230218 Uptime | 0T00:06:52 Flash Write Count | 27 Boot Count | 10 Restart Reason | Software reset CPU   |   AP1 SSId (RSSI) | XXXXXXXX (100%, -48 dBm) 11n Hostname | tasmota-XXXXXXX IPv6 Global (wifi) | XXXXXXXXXX IPv6 Local (wifi) | XXXXXXXXXX MAC Address | XXXXXXXXXX IP Address (wifi) | 192.168.X.XX Gateway | 192.168.X.X Subnet Mask | 255.255.255.0 DNS Server1 | 192.168.X.X DNS Server2 | 0.0.0.0   |   HTTP API | Enabled   |   MQTT Host |   MQTT Port | 1883 MQTT TLS | Disabled MQTT User | DVES_USER MQTT Client | DVES_XXXXXX MQTT Topic | tasmota_%06X MQTT Group Topic 1 | cmnd/tasmotas/ MQTT Full Topic | cmnd/tasmota_XXXXX/ MQTT Fallback Topic | cmnd/DVES_XXXXXX_fb/ MQTT No Retain | Disabled   |   Emulation | None   |   ESP Chip Id | 1248352 (ESP32-U4WDH-D rev.3) Flash Chip Id | 0x164020 (DIO) Flash Size | 4096 KB Program Flash Size | 0 KB Program Size | 1518 KB Free Program Space | 1600 KB Free Memory | 158.3 KB (frag. 17%)   |   Partition app_0* | 1600 KB (used 94%) Partition fs | 384 KB Partition app_1 | 1600 KB Partition fs | 384 KB
Jason2866 commented 1 month ago

Only serial flash is the way out. There are 3 boot attempts when a not Shelly signed firmware is installed (with the Shelly bootloader) until it always starts the firmware at address 0x10000. The Autoconfiguration step does replace the Shelly bootloader against a bootloader without firmware sign checks. So if not done the Autoconfiguration step or this fails for whatever reason -> Serial Flash Updating to a newer Tasmota firmware needs starting a firmware from a different address than 0x10000

spockatieee commented 1 month ago

I see. So serial flash to another mgos32-to-tasmota32, just the bootloader, straight to factory Tasmota, or something else?

Jason2866 commented 1 month ago

When serial flashing, directly flash Tasmota. No other step needed.