tbnobody / OpenDTU

Software for ESP32 to talk to Hoymiles/TSUN/Solenso Inverters
GNU General Public License v2.0
1.83k stars 511 forks source link

HTTP error upon OTA upgrade #1501

Open andreas-bulling opened 1 year ago

andreas-bulling commented 1 year ago

What happened?

I am running 23.10.9 and tried to upgrade to the latest version but upon reaching 100% I see the following error

[HTTP ERROR] Bad Request

To Reproduce Bug

upgrade to the latest firmware

Expected Behavior

no error

Install Method

Pre-Compiled binary from GitHub

What git-hash/version of OpenDTU?

v23.10.9

Relevant log/trace output

No response

Anything else?

No response

RayAUT commented 1 year ago

Same issue with latest firmware:

[HTTP ERROR] Bad Request

Archibald-Harry-Tuttle commented 1 year ago

What happened?

I am running 23.10.9 and tried to upgrade to the latest version but upon reaching 100% I see the following error

[HTTP ERROR] Bad Request

To Reproduce Bug

upgrade to the latest firmware

Expected Behavior

no error

Install Method

Pre-Compiled binary from GitHub

What git-hash/version of OpenDTU?

v23.10.9

Relevant log/trace output

No response

Anything else?

No response

same on my side

munter1506 commented 1 year ago

I have the same Error "[HTTP ERROR] Bad Request"

JesseDFBlue commented 1 year ago

Same here

tbnobody commented 1 year ago
Gerri1 commented 1 year ago

Same with me too! Fehler

The file is uploaded, but then the message appears.

System Informationen Firmwareinformationen Hostname OpenDTU-96B38C SDK-Version v4.4.4 Konfigurationsversion 0.1.25 Firmwareversion / git Hash v23.10.9 PIO Umgebung generic Firmware-Aktualisierung Neue Version verfügbar! Zeige Änderungen! Reset Grund CPU 0 Timer Group0 Watch dog reset digital core Reset Grund CPU 1 for APP CPU, reset by PRO CPU Anzahl der Konfigurationsspeicherungen 49 Betriebszeit 0 days 12:19:21 Hardwareinformationen Chip-Modell ESP32-D0WD-V3 Chip-Revision 3 Chip-Kerne 2 CPU-Frequenz 240 MHz Speicherinformationen Typ Verwendung Frei Benutzt Größe Heap
45 % 155 kB 126 kB 281 kB LittleFs
6 % 300 kB 20 kB 320 kB Sketch
98 % 25 kB 1.511 kB 1.536 kB Funkmodulinformationen nRF24 Status konfiguriert nRF24 Chip-Status verbunden nRF24 Chip-Type nRF24L01+ CMT2300A Status nicht konfiguriert CMT2300A Chip-Status

tbnobody commented 1 year ago

@Gerri1 especially for you I can say that you have the wrong partition scheme. Please read the important upgrade notes on the start page https://github.com/tbnobody/OpenDTU#-important-upgrade-notes-

Your Sketch partition shows just 1.536 kB. With the new partition table (as delivered since March 2023) the size should be 1.920 kB.

Gerri1 commented 1 year ago

I had no problems with the updates up to and including v23.10.9! I'll probably have to remove that part.

tbnobody commented 1 year ago

I had no problems with the updates up to and including v23.10.9!

That might be right... Because these firmware images where most propably small enough to fit into the old partitions.

Gerri1 commented 1 year ago

Thanks for the info. When I have a lot of time again, I'll flash it again!

munter1506 commented 1 year ago

@Gerri1 especially for you I can say that you have the wrong partition scheme. Please read the important upgrade notes on the start page https://github.com/tbnobody/OpenDTU#-important-upgrade-notes-

Your Sketch partition shows just 1.536 kB. With the new partition table (as delivered since March 2023) the size should be 1.920 kB.

Thanks! This solved the issue in my case :)

Gerri1 commented 1 year ago

The new FW is now running for me too! 👍😊

awarda-rh commented 1 year ago

I have the same firmware update error with a new AllianceApps OpenDTU Fusion, although it seems to already have a 1,920 kB sketch partition.

This is the first time I try to update the firmware of the device, that I ordered and received just this week.

I am trying to update the firmware through the web interface with this file: https://github.com/tbnobody/OpenDTU/releases/download/v23.11.15/opendtu-generic.bin

Screenshots attached below.

System Info Firmware Information Hostname OpenDTU-1B0DC0 SDK Version v4.4.4 Config Version 0.1.25 Firmware Version / Git Hash da0b663 PIO Environment opendtufusionv2 Firmware Update New version available! Show changes! Reset Reason CPU 0 Software reset CPU Reset Reason CPU 1 Software reset CPU Config save count 3 Uptime 0 days 00:05:13 Hardware Information Chip Model ESP32-S3 Chip Revision 0 Chip Cores 2 CPU Frequency 240 MHz Memory Information Type Usage Free Used Size Heap
38% 197 kB 122 kB 318 kB LittleFs
13% 168 kB 24 kB 192 kB Sketch
73% 509 kB 1,411 kB 1,920 kB Radio Information nRF24 Status configured nRF24 Chip Status connected nRF24 Chip Type nRF24L01+ CMT2300A Status configured CMT2300A Chip Status connected

Screenshot from 2023-11-16 17-34-11 Screenshot from 2023-11-16 17-33-31 Screenshot from 2023-11-16 17-32-57

tbnobody commented 1 year ago

@awarda-rh you cannot just use the opendtu-generic.bin because this bin is compiled with the generic environment while you need a firmware compiled with opendtufusionv2 environment. I don't know (other then compile it yourself) how to get this specific version.

awarda-rh commented 1 year ago

Thanks, @tbnobody , you see I am still a newby in the OpenDTU world.

I did some more digging on github and found this in the OpenDTUFusionDocs:

ATTENTION for pre-flashed boards If you bought an OpenDTUFusion Board that had a pre-flashed firmware, you might lose radio module connection after using the generic OTA image when you OTA for the first time, as the baked-in pin assignments get overridden.

My device currently is using the "OpenDTU Fusion v2 with CMT2300A and NRF24" device profile, see attached screenshot. Screenshot from 2023-11-16 18-19-53

I think, I have to perform these three steps to update the pre-flashed AllianceApps OpenDTU Fusion:

1.) Use this file to OTA update the firmware: https://github.com/tbnobody/OpenDTU/releases/download/v23.11.15/opendtu-generic_esp32s3_usb.bin

2.) After the update restore the configuration from this file: https://raw.githubusercontent.com/tbnobody/OpenDTU/master/docs/DeviceProfiles/opendtu_fusion.json

3.) Then I have to select "OpenDTU Fusion v2 with CMT2300A and NRF24" in Settings > Device Manager.

I haven't executed this plan yet. Does this sound like a reasonable plan, or am I still missing something?

tbnobody commented 1 year ago

Bei mir ging heute in Sachen Verbindung nichts🤷🏻‍♂️

  1. Hat dieser Fehler nichts mit dem Error on OTA Upgrade zu tun. Öffne bitte in diesen Fällen einen neuen Issue
  2. Wurde dieser Fehler mit dem heutigen Update behoben.
Marc9485 commented 1 year ago

image Scheint behoben zu sein mit dem heutigen update. Danke dir

3DJupp commented 11 months ago

I also experienced this, some times I still have to do the update via VS Code, thats a fix for then. (Partition table was already the new 1920 kB one)

ThiloGa commented 9 months ago

Hi,

I think, I have to perform these three steps to update the pre-flashed AllianceApps OpenDTU Fusion:

1.) Use this file to OTA update the firmware: https://github.com/tbnobody/OpenDTU/releases/download/v23.11.15/opendtu-generic_esp32s3_usb.bin

2.) After the update restore the configuration from this file: https://raw.githubusercontent.com/tbnobody/OpenDTU/master/docs/DeviceProfiles/opendtu_fusion.json

3.) Then I have to select "OpenDTU Fusion v2 with CMT2300A and NRF24" in Settings > Device Manager.

I haven't executed this plan yet. Does this sound like a reasonable plan, or am I still missing something?

were you successfull?

greetingd

xtermi2 commented 5 months ago

I have a similar issue upgrading the Firmaware OTA. I also get OTA Error HTTP ERROR] Bad Request

I downloaded the latest release v24.6.29 an tried opendtu-generic_esp32.bin.

My Sketch partition is already 1920 kB.

In the console I could not see any log message regarding this error while upgrade:

Fetch inverter: 114190515818

Here my system info: image