Update from 02_03_21 to 02_04_00 failing

According to the message log it tries to update ever minute and fails. I do have a firewall in my house and have checked all of the logs. As best as I can tell nothing is blocking this upgrade. Here are the log entries:

7/26/19 10:00:42 Updater: Update from 02_03_21 to 02_04_00
7/26/19 10:00:42 Updater: download 02_04_00
7/26/19 10:00:57 Updater: Download failed HTTPcode
7/26/19 10:00:59 Updater: Update from 02_03_21 to 02_04_00
7/26/19 10:00:59 Updater: download 02_04_00
7/26/19 10:01:12 Updater: Download failed HTTPcode
7/26/19 10:01:14 Updater: Update from 02_03_21 to 02_04_00
7/26/19 10:01:14 Updater: download 02_04_00
7/26/19 10:01:28 Updater: Download failed HTTPcode
7/26/19 10:01:30 Updater: Update from 02_03_21 to 02_04_00
7/26/19 10:01:30 Updater: download 02_04_00
7/26/19 10:01:44 Updater: Download failed HTTPcode
7/26/19 10:01:46 Updater: Update from 02_03_21 to 02_04_00
7/26/19 10:01:46 Updater: download 02_04_00
7/26/19 10:02:01 Updater: Download failed HTTPcode
7/26/19 10:02:03 Updater: Update from 02_03_21 to 02_04_00
7/26/19 10:02:03 Updater: download 02_04_00
7/26/19 10:02:17 Updater: Download failed HTTPcode
7/26/19 10:02:19 Updater: Update from 02_03_21 to 02_04_00
7/26/19 10:02:19 Updater: download 02_04_00
7/26/19 10:02:33 Updater: Download failed HTTPcode
7/26/19 10:02:37 Updater: Invalid response from server. HTTPcode: 521
7/26/19 11:02:54 Updater: Update from 02_03_21 to 02_04_00

Any help would be great. Thanks.

You’re coming from a pretty old release. First thing you should do is set auto-update to NONE to stop the endless cycle.

Not sure why it’s not downloading. Where are you located? The update is cached through cloudflare, and should be quick to download.

You can see if it’s available through your firewall by fetching it with the URL

IoTaWatt.com/firmware/bin/02_04_00.bin

Can you try that please?

Done. USA. Yes I can pull that file no problem through my PC.

Ok, let me research the download issues since your old release.

I regressed a shop unit to 02_03_21 and then set it to ALPHA. It loaded 02_04_00 in about 10 seconds. So I don’t believe there is anything wrong with the server or the download code in 02_03_21. That leaves something with the connection between your IoTaWatt and the cloudflare cache.

Do you have a proxy server? Is there anything else that might get between the IoTaWatt and the WAN? Is the WAN highspeed? i.e. is it DSL or satellite or cellular or anything else that might be slow?

I do not have a proxy server per se. I have a firewall between it and the internet, but even after opening that up so the unit can freely access the internet it still fails. I have dug through the firewall logs and it is not denying anything going to and from the IoTaWatt. My connection is a 1 gig cable connection so there are no issues there. I wonder why my PC can download the file, but the unit can’t? Also I am now getting a “Invalid response from server. HTTPcode: 403” code in the log if that helps.

I have to wonder why that changed. I haven’t changed anything with the server. That is a “forbidden” response. I can’t see any rational for that. There is no authorization required to retrieve it.

The browser request, while indicating that there is a path to the file, is significantly different. The browser will download the file in base64 encoding, and possibly use compression. IoTaWatt downloads raw binary. So anything between might react differently to the browser request.

I at a loss as well. I made a new firewall rule that literally allows everything for the IoTaWatt’s IP address with the same result. I can see it successfully trying to reach http://iotawatt.com/firmware/iotaupdt.php and http://iotawatt.com/firmware/bin/02_04_00.bin. What else can be done? Can a manual update be performed?

Yes, the firmware can be loaded using esptool.py. You would also need to load the associated SD files.

Another option is to send me the device and I’ll install the new release. That would take about a week round trip, but I would also be able to take a closer look at the download problem. If I’m able to download here, that would indicate it has to do with your environment.

It’s fairly inexpensive to ship the base unit first class mail as it weighs very little.

Send me instructions on sending it to you to check out. That way we know for sure where the issue is.

Thanks