Egyras / HeishaMon

Panasonic Aquarea air-water H, J, K and L series protocol decrypt
241 stars 121 forks source link

Updating firmware to 3.2.3 -> 3.5, FW update process in general #502

Closed MEKadan closed 3 weeks ago

MEKadan commented 3 months ago

I apologize, if this text goes to somewhat wrong place, but I could not find a better one, not least because of the fact that I'm quite unexperienced Github user and not a sw professional. Last time working with Heishamon installation was some time ago, and I cannot remember what was done then.

My question is about installing new firmware. The Readme does not contain very detailed instructions on updating FW

First of all, I got the following message in Home Assistant:

image

After exploring a while, I ended up in https://github.com/Egyras/HeishaMon/tree/master/binaries

If I am not mistaken, I should pick up a suitable binary file, which I suspect is the HeishaMon.ino.d1-v3.5.bin and install it via Heishamon WebUI.

image

The file (3.5) is in the mode-type-small folder, however, I cannot find the corresponding md5?

image

The Readme in binaries -folder talks about "The LittleFS versions" Is this the same than mode-type-small?

Then, the Readme syas: "The LittleFS versions will, after updating to this version, reset your HeishaMon to factory default due to change to a new filesystem for the configuration."

Is it enough to restore my original configuration just by copying all the parameters from the Settings -page of the WebUI?

geduxas commented 3 months ago

I think it was forgotten to merge.. @IgorYbema ?

Could you try this md5: https://github.com/IgorYbema/HeishaMon/blob/main/binaries/mode-type-small/HeishaMon.ino.d1-v3.5.md5

And for small/large is new type's of heishamon hardware.. in this version it's available in larger PCB with ethernet capabilities and ESP32 chip. So for all old hardware use small version :)

MEKadan commented 3 months ago

OK, thanks, @geduxas

The update seem to reset pcb to factory settings, so is it enough to restore my original configuration just by copying all the parameters from the Settings -page of the WebUI?

IgorYbema commented 3 months ago

It should not reset it to factroy settings but when it does you can easily restore the settings indeed by just placing them again in the settings page.

MEKadan commented 3 months ago

I think it was forgotten to merge.. @IgorYbema ?

Could you try this md5: https://github.com/IgorYbema/HeishaMon/blob/main/binaries/mode-type-small/HeishaMon.ino.d1-v3.5.md5

I tried this, and it informed the update failed because of md5

Edit: Am I the only one trying this, because no other comments/ issues as far as I could find?

usernr1 commented 3 months ago

Had the same issue and skipped v3.5. v3.6 works for me without problems. https://github.com/IgorYbema/HeishaMon/blob/main/binaries/mode-type-small/HeishaMon.ino.d1-v3.6.bin MD5 v3.61a61f27340b6b07f8f92562f6382067a Screenshot 2024-08-16 110529

MEKadan commented 3 months ago

So You guys are fetching these from IgorYbema's repo, not from here?

Edit: It seems that latest in IgorYbema's repo is still 3.2.3. It is also stated there, that: This branch is 2 commits ahead of, 15 commits behind Egyras/HeishaMon:master.

Somewhat confusing to us normal mortals :)

jvuotila commented 3 months ago

I did update and now I cannot connect to Heishamon at all. I have tried to push reset button on the device and can not find even initial hotspot. What can I do now?

IgorYbema commented 3 months ago

I did update and now I cannot connect to Heishamon at all. I have tried to push reset button on the device and can not find even initial hotspot. What can I do now?

Did you use the correct file for your heishamon model (large or small version)?

jvuotila commented 3 months ago

I did update and now I cannot connect to Heishamon at all. I have tried to push reset button on the device and can not find even initial hotspot. What can I do now?

Did you use the correct file for your heishamon model (large or small version)?

I used large version (HeishaMon.ino.esp32-v3.5.bin). But any tips how to solve problem?

IgorYbema commented 3 months ago

You used the large version on the small module I assume? (as the large version was already installed with v3.5 from shipping).

To recover the small version you need a USB-TTL cable and you plug that on the correct pins on the 10-pin header (gnd, rx,tx and 5v). When connected you put the heishamon in firmware update mode by holding the boot button while resetting it. You can release the boot button after the reset. It should be in firmware update mode now. Then use https://espressif.github.io/esptool-js/ to upload the correct file image

jvuotila commented 3 months ago

Thanks, I made an order for the cable. Thank god it's not winter and heating season. πŸ˜†

MEKadan commented 3 months ago

Hmmm... based on how Your cable looks, there are 3,3V regulators onboard? Probably would go even without, ESP's seem to tolerate TTL level well, e.g. I have been running 2 separate ESP's contacted directly to TTL level serial lines for 2 years day and night without problems.

I once flashed Heishamon via cable with 3,3V converter chip in between, just because I happen to have one. Goes OK as well

IgorYbema commented 3 months ago

Just for firmware flashing the 5v ttl is ok

TherealGunnar commented 3 months ago

I did update and now I cannot connect to Heishamon at all. I have tried to push reset button on the device and can not find even initial hotspot. What can I do now?

Did you use the correct file for your heishamon model (large or small version)?

I used large version (HeishaMon.ino.esp32-v3.5.bin). But any tips how to solve problem?

I was stupid enough to do the same. Also bought the cable. I agree that a good explanation on how to update is missing.

IgorYbema commented 3 months ago

I updated the readme. Is this clear enough now? https://github.com/IgorYbema/HeishaMon/tree/main/binaries

MEKadan commented 3 months ago

On the main page https://github.com/IgorYbema/HeishaMon/tree/main still reads:

Current release is version 3.5.

On the right, in the releases section we can see:

image

No release information later releases

Then, currently Home Assistant shows an available update, leading through link "Read release announcement" currently to here: https://github.com/Egyras/HeishaMon/releases/tag/v3.5

image

I'm still wondering, what actually is the role of each of these 2 repos (Egyras/ IgorYbema)?

Where should we primarily be downloading updates from?

IgorYbema commented 3 months ago

If you want to follow stable release the Egyras repo is the way to go. When you follow my repo you will get more recent updates (no releases). But eventually I am the only maintainer. Has been like this for years now.

MEKadan commented 3 months ago

Ahh... OK. Thanks. Nice work!

Pusch3n commented 3 months ago

You used the large version on the small module I assume? (as the large version was already installed with v3.5 from shipping).

To recover the small version you need a USB-TTL cable and you plug that on the correct pins on the 10-pin header (gnd, rx,tx and 5v). When connected you put the heishamon in firmware update mode by holding the boot button while resetting it. You can release the boot button after the reset. It should be in firmware update mode now. Then use https://espressif.github.io/esptool-js/ to upload the correct file !

Hey,

i made the same stupid mistake πŸ™ˆ I tried to fix it with the USB-TTL cable. The programming also finished without an error. The Problem is I dont find the Wlan AP of heishamon after the flashing. I tried 3.2.3 and 3.5. Do you have a idea what went wrong?

Thanks

IgorYbema commented 3 months ago

i made the same stupid mistake πŸ™ˆ I tried to fix it with the USB-TTL cable. The programming also finished without an error. The Problem is I dont find the Wlan AP of heishamon after the flashing. I tried 3.2.3 and 3.5. Do you have a idea what went wrong?

Are you sure you flashed the correct binary this time? What activity is visible on the blue led?

Pusch3n commented 3 months ago

This one: HeishaMon.ino.d1-v3.2.3.bin

also the 3.5 bin from the same folder.

The blue led is off, except when I press the reset button. How should it behave?

IgorYbema commented 3 months ago

Should work. Are you flashing to address 0x0 ? Not sure what the website flash tool selects as default address. Blue led should start blinking. Did you try factory reset already?

Pusch3n commented 3 months ago

On the website the default is 0x1000. I will try 0x0.

Thanks alot

edit: that was the mistake. Now it works fine again :)

IgorYbema commented 3 months ago

Aren't you getting this? image

jvuotila commented 3 months ago

Sorry, deleted my comment... My own mistake. Rx and tx pins were incorrect position.

jvuotila commented 3 months ago

Everything is working again. Thanks to everyone on this feed! πŸ™ŒπŸ»

jllussa commented 3 months ago

Very useful thread @IgorYbema, consider it some cut and paste to the main README on https://github.com/Egyras/HeishaMon and adding section... "How to unbrick Heishamon"
Program used -> https://espressif.github.io/esptool-js/
Starting at -> HEX 0x0

Must be in! :)

TherealGunnar commented 3 months ago

I get the error Error: CryptoJS is not defined while trying to flash this one: HeishaMon.ino.d1-v3.2.3.bin

Solved it, just using another laptop solved the problem.

Stueckgold commented 1 month ago

I try to flash from 3.2.3 to 3.8 or any other binary: I always get errors "Update failed! Please try again...ERROR[7]: MD5 Failed" or without md5 itΒ΄s "Update failed! Please try again...ERROR[10]: Magic byte is wrong, not 0xE9"

small version

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.