HTTP not responding - resolved

Hello. I purchased an installed an IotaWatt a few weeks ago, and it’s been working fine but today it quit responding to HTTP requests in my browser. I tried pinging and found that it took between 5-12 seconds to respond to that. So I rebooted the unit, and after that ping is more reasonable, below 100ms. But it still doesn’t work in a browser. If I try to hit the main page with curl, it loads the response in chunks, and closes the connection after about 20 seconds. The status light is blinking bright green and dim green.

I was able to get the log via curl using http://192.168.20.32/iotawatt/iotamsgs.txt:

** Restart **

SD initialized.
2/06/23 17:11:16z Real Time Clock is running. Unix time 1675703476 
2/06/23 17:11:16z Reset Reason: Power-fail restart.
2/06/23 17:11:16z ESP8266 ID: 14622328, RTC PCF8523 (68)
2/06/23 17:11:16z IoTaWatt 5.0, Firmware version 02_07_05
2/06/23 17:11:16z SPIFFS mounted.
2/06/23 09:11:16 Local time zone: -8:00, using DST/BST when in effect.
2/06/23 09:11:16 device name: IotaWatt
2/06/23 09:11:19 HTTP server started
2/06/23 09:11:19 WiFi connected. SSID=IoT, IP=192.168.20.32, channel=1, RSSI -74db
2/06/23 09:11:19 MDNS responder started for hostname IotaWatt
2/06/23 09:11:19 LLMNR responder started for hostname IotaWatt
2/06/23 09:11:19 timeSync: service started.
* transfer closed with 2247 bytes remaining to read
* Closing connection 0
curl: (18) transfer closed with 2247 bytes remaining to read
2/06/23 09:11:19 statService: started.%   

Here’s the curl output from the main page:

% time curl -v http://192.168.20.32 --connect-timeout 30 --max-time 30
*   Trying 192.168.20.32:80...
* Connected to 192.168.20.32 (192.168.20.32) port 80 (#0)
> GET / HTTP/1.1
> Host: 192.168.20.32
> User-Agent: curl/7.79.1
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: text/html
< Content-Length: 159330
< Connection: close
< 
<!DOCTYPE html>
<!-- version 0.6.1 -->
<html lang="en-US">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=0.86, maximum-scale=5.0, minimum-scale=0.86">
    <title>IoTaWatt Configuration app</title>
    <link rel="stylesheet" type="text/css" href="cnfstyle.css">

</head>

<body onload="setup()">

    <div id="outerContainer" class="color_outer">
        <h3 id="heading">IoTaWatt Power Monitor</h3>

        <div id="mainMenu" class="menu color_menu" display="block">

            <!-- ************************************************************************************************************************
                                                      MAIN MENU BUTTONS
         *********************************************************************************************************************-->

            <table id="bigIdeasTable">
                <tr>
                    <th width="50%"></th>
                    <th width="50%"></th>
                </tr>
                <tr>
                    <td class="dropdown">
                        <button id="setupButton" class="mainMenuButton buttonUp dropbtn" title="Select setup category">Setup</button>
                        <span class="dropContent">
            <button class="mainMenuButton" onclick="mainMenuButton(this,configDevice)"
                title="Specify device name, time-zone, and auto-update class">Device</button>
            <button class="mainMenuButton" onclick="mainMenuButton(this,configInputs)"
                title="Specify the VTs and CTs that are used">Inputs</button>
            <button class="mainMenuButton" onclick="mainMenuButton(this,configOutputs)"
                title="Define output values for status display and local graphs">Outputs</button>
            <button class="mainMenuButton" onclick="mainMenuButton(this,configIntegrators)"
                title="Define Integrators to develop import/export values">Integrators</button>
            <button class="mainMenuButton" onclick="mainMenuButton(this,buildWebServer)"
                title="Specify data uploader(s) to external servers">Data Uploaders</button>
            <button class="mainMenuButton" onclick="mainMenuButton(this,setProxy)" 
                title="Specify optional proxy server for HTTPS">HTTPS Proxy Server</button>
            <button class="mainMenuButton" onclick="mainMenuButton(this,setPasswords)"
                title="Set/Reset optional access passwords">Passwords</button>
            <button class="mainMenuButton" onclick="mainMenuButton(this,configBurden)"
                title="Set new values if stock resistors are modified/removed">Burden Resistors</button>
          </span>
                    </td>
                    <td><button class="mainMenuButton buttonUp" onclick="mainMenuButton(this,statusBegin)" title="Display current measurements, outputs and device status">Status</button></td>
                </tr>
                <tr>
                    <td class="dropdown">
                        <button id="toolsButton" class="mainMenuButton buttonUp dropbtn" title="Select from the following tools">Tools</button>
                        <span class="dropContent">
            <button class="mainMenuButton" onclick="mainMenuButton(this,loadEdit)"
                title="manage and edit files on the SDcard">File Manager and Editor</button>
            <button class="mainMenuButton" onclick="mainMenuButton(this,showMsgs)"
                title="View recent entries in the message log">Message Log</button>
            <button class="mainMenuButton" onclick="mainMenuButton(this,toolsWiFi)">WIFi</button>
            <button class="mainMenuButton" onclick="mainMenuButton(this,toolsRestart)"
                title="Restart the IoTaWatt">Restart</button>
                
       <!-- <button class="mainMenuButton" onclick="mainMenuButton(this,toolsDatalogs)">Datalogs</button>
            <button class="mainMenuButton" onclick="mainMenuButton(this,toolsUpdate)">Software Update</button>
            <button class="mainMenuButton" onclick="mainMenuButton(this,toolsPhase)">Phase Measurement</button> -->
            
          </span>
                    </td>
                    <td>
                        <span class="dropdown">
            <button id="dataButton" class="mainMenuButton buttonUp dropbtn"
              title="Graphically visualize and compare accumulated data">Data</button>
            <span class="dropContent">
              <button class="mainMenuButton" onclick="mainMenuButton(this,loadGraph2)"
                  title="Enhanced graph utility">Graph+</button>
              <button class="mainMenuButton" onclick="mainMenuButton(this,loadGraph)"
                  title="Original graph utility">Original Graph</button>
              
            </span>
                        </span>
                    </td>
                </tr>
            </table>
        </div>

        <!-- ************************************************************************************************************************
                                                      PANIC MESSAGES
         *********************************************************************************************************************-->

        <div id="panicMessageDiv" class="body color_body" style="display:none">
            <div id="panicList">
            </div>
        </div>

        <!-- ************************************************************************************************************************
                                                      MAIN BODY AREA
* transfer closed with 153577 bytes remaining to read
* Closing connection 0
curl: (18) transfer closed with 153577 bytes remaining to read
 curl -v http://192.168.20.32 --connect-timeout 30 --max-time 30  0.00s user 0.01s system 0% cpu 19.867 total

Look like a WiFi issue. Your RSSI is marginal. The message log has some Curl stuff that didn’t come from the IoTaWatt. I don’t understand why that’s there or what it represents. It is between two messages timestamped the same second.

Ahh sorry! This was my fault. I forgot that I had throttled its bandwidth to 2Kbps in my router while trying to reproduce an intermittent connection issue.