USB Voltage tolerance?

I’ve been trying to look at the schematics on GitHub and I don’t see the USB input listed that I can spot, so I’m hoping someone here may know.

What’s the actual circuitry and tolerance on the 5V input? Is it used as a regulated 5V rail or regulated down to 3.3V immediately? Would say 4.0V be sufficient?

The end goal, I’d like to put a simple battery backup in line. Most power-banks seem to be silly expensive now up around $30-50, and at that point I could just get a whole mains UPS. I don’t need it to run for hours or days, just trying to avoid so many hard resets when there’s a storm and the power starts blinking a bit.

Or I have some spare NiMH cells, a couple diodes and resistors, I could make a pack that trickle charges with a resistor off the USB and then has block-diodes so it can’t backfeed, but it would only be providing 4.0-4.5V due to the drop from the diodes.

1 Like

It’s on the schematic for the ESP8266 nodeMCU. I don’t have a link offhand but it’s out there on the internet.

I don’t recommend any sort of UPS. The unit restarts quickly upon power restoration.

Right, but sometimes the power “dips” without going out. Then I have to go manually unplug and replug it to get the IoTaWatt functional again. A battery backup would prevent this from happening, which I presume is a result of it sagging below an acceptable voltage but not low enough for a processor reset.

image
When this happens the LED is green with an occasional blink/flicker green. Everything “looks” fine but it doesn’t work until I do a proper power cycle. It seems to happen most often when we have a storm or something and the power flickers but doesn’t go out.

Unless there’s another way to avoid getting stuck in this state without a UPS?

1 Like

Your browser is trying to access iotawatt.apt. What is that and why are you not using iotawatt.local?

Because “iotawatt” is the hostname and “apt” is the DHCP DNS suffix on the VLAN the IoTaWatt is connected thru. For whatever reason, “.local” does not work on my home network, but the user specified DNS suffix works fine.

After a manual unplug-replug, it comes right back to life…but that’s not really convenient to have to do on a regular basis. Since its in the garage I was hoping for something a bit less bulky and intrusive than a full-blown mains UPS to keep a USB device powered.

1 Like

How did you determine this problem is caused by a power dip? Im thinking this has something to do with mDNS and your VLAN. What happens if you use the IoTaWatt IP address instead of IoTaWatt.apt?

That’s the only thing I can figure because it happens most often after a storm or windy day, and flickering lights is very common as are very brief <1 second “blinks”. That seems the most likely thing to happen.

And yes, if I resolve the IP it and go by IP address makes no difference when it gets stuck.

Why would mDNS have anything to do with the web UI loading?

1 Like

Good point but don’t see where a voltage dip should cause it either. How long have you had the unit and how long have you had this problem?

Can you post the message log?

I got it last July, and I’ve had this problem almost every time we’ve had a storm blow thru. I know the power does “weird stuff” because I can see lights flicker and a couple times we’ve had a flicker that causes the heat pumps to go into compressor rotor-lock around the same time as the IoTaWat stops working. That’s one of the things I was hoping to work out the current draw associated with such an event and make my home automation command the thermostat off to reset it when that happens.

Message log only looks like it goes back a few days, I’ve only had to manually pull its plug once this week to fix it:

** Restart **

SD initialized.
3/31/22 12:04:33z Real Time Clock is running. Unix time 1648728273 
3/31/22 12:04:33z Reset Reason: Power-fail restart.
3/31/22 12:04:33z ESP8266 ID: 16295047, RTC PCF8523 (68)
3/31/22 12:04:33z IoTaWatt 5.0, Firmware version 02_07_05
3/31/22 12:04:33z SPIFFS mounted.
3/31/22 12:04:34z Local time zone: +0:00
3/31/22 12:04:34z device name: IotaWatt
3/31/22 12:04:37z HTTP server started
3/31/22 12:04:37z WiFi connected. SSID=Furry_Party, IP=192.168.1.114, channel=11, RSSI -56db
3/31/22 12:04:37z MDNS responder started for hostname IotaWatt
3/31/22 12:04:37z LLMNR responder started for hostname IotaWatt
3/31/22 12:04:37z timeSync: service started.
3/31/22 12:04:37z statService: started.
3/31/22 12:04:37z Updater: service started. Auto-update class is MINOR
3/31/22 12:04:37z dataLog: service started.
3/31/22 12:04:38z dataLog: Last log entry 03/31/22 12:04:00
3/31/22 12:04:42z historyLog: service started.
3/31/22 12:04:42z historyLog: Last log entry 03/31/22 12:04:00
3/31/22 12:04:44z Updater: Invalid response from server. HTTPcode: -4
3/31/22 13:04:44z Updater: Auto-update is current for class MINOR.

** Restart **

SD initialized.
3/31/22 22:00:14z Real Time Clock is running. Unix time 1648764014 
3/31/22 22:00:14z Reset Reason: Power-fail restart.
3/31/22 22:00:14z ESP8266 ID: 16295047, RTC PCF8523 (68)
3/31/22 22:00:14z IoTaWatt 5.0, Firmware version 02_07_05
3/31/22 22:00:14z SPIFFS mounted.
3/31/22 22:00:15z Local time zone: +0:00
3/31/22 22:00:15z device name: IotaWatt
3/31/22 22:00:18z HTTP server started
3/31/22 22:00:18z WiFi connected. SSID=Furry_Party, IP=192.168.1.114, channel=11, RSSI -57db
3/31/22 22:00:18z MDNS responder started for hostname IotaWatt
3/31/22 22:00:18z LLMNR responder started for hostname IotaWatt
3/31/22 22:00:18z timeSync: service started.
3/31/22 22:00:24z statService: started.
3/31/22 22:00:24z Updater: service started. Auto-update class is MINOR
3/31/22 22:00:24z dataLog: service started.
3/31/22 22:00:26z dataLog: Last log entry 03/31/22 21:59:50
3/31/22 22:00:29z historyLog: service started.
3/31/22 22:00:29z historyLog: Last log entry 03/31/22 21:59:00
3/31/22 22:00:32z Updater: Invalid response from server. HTTPcode: -4
3/31/22 23:00:35z Updater: Auto-update is current for class MINOR.

** Restart **

SD initialized.
4/01/22 22:40:38z Real Time Clock is running. Unix time 1648852838 
4/01/22 22:40:38z Reset Reason: Power-fail restart.
4/01/22 22:40:38z ESP8266 ID: 16295047, RTC PCF8523 (68)
4/01/22 22:40:38z IoTaWatt 5.0, Firmware version 02_07_05
4/01/22 22:40:38z SPIFFS mounted.
4/01/22 22:40:39z Local time zone: +0:00
4/01/22 22:40:39z device name: IotaWatt
4/01/22 22:40:41z HTTP server started
4/01/22 22:40:42z WiFi connected. SSID=Furry_Party, IP=192.168.1.114, channel=11, RSSI -56db
4/01/22 22:40:42z MDNS responder started for hostname IotaWatt
4/01/22 22:40:42z LLMNR responder started for hostname IotaWatt
4/01/22 22:40:42z timeSync: service started.
4/01/22 22:40:42z statService: started.
4/01/22 22:40:42z Updater: service started. Auto-update class is MINOR
4/01/22 22:40:42z Updater: Auto-update is current for class MINOR.
4/01/22 22:40:42z dataLog: service started.
4/01/22 22:40:43z dataLog: Last log entry 04/01/22 22:40:10
4/01/22 22:40:47z historyLog: service started.
4/01/22 22:40:47z historyLog: Last log entry 04/01/22 22:40:00

** Restart **

SD initialized.
4/01/22 22:41:49z Real Time Clock is running. Unix time 1648852909 
4/01/22 22:41:49z Reset Reason: Power-fail restart.
4/01/22 22:41:49z ESP8266 ID: 16295047, RTC PCF8523 (68)
4/01/22 22:41:49z IoTaWatt 5.0, Firmware version 02_07_05
4/01/22 22:41:49z SPIFFS mounted.
4/01/22 22:41:49z Local time zone: +0:00
4/01/22 22:41:49z device name: IotaWatt
4/01/22 22:41:52z HTTP server started
4/01/22 22:41:52z WiFi connected. SSID=Furry_Party, IP=192.168.1.114, channel=11, RSSI -60db
4/01/22 22:41:52z MDNS responder started for hostname IotaWatt
4/01/22 22:41:52z LLMNR responder started for hostname IotaWatt
4/01/22 22:41:52z timeSync: service started.
4/01/22 22:41:52z statService: started.
4/01/22 22:41:52z Updater: service started. Auto-update class is MINOR
4/01/22 22:41:53z dataLog: service started.
4/01/22 22:41:53z dataLog: Last log entry 04/01/22 22:41:00
4/01/22 22:41:55z Updater: Auto-update is current for class MINOR.
4/01/22 22:41:57z historyLog: service started.
4/01/22 22:41:57z historyLog: Last log entry 04/01/22 22:41:00

** Restart **

SD initialized.
4/01/22 22:42:06z Real Time Clock is running. Unix time 1648852926 
4/01/22 22:42:06z Reset Reason: Power-fail restart.
4/01/22 22:42:06z ESP8266 ID: 16295047, RTC PCF8523 (68)
4/01/22 22:42:06z IoTaWatt 5.0, Firmware version 02_07_05
4/01/22 22:42:06z SPIFFS mounted.
4/01/22 22:42:06z Local time zone: +0:00
4/01/22 22:42:06z device name: IotaWatt
4/01/22 22:42:09z HTTP server started
4/01/22 22:42:09z WiFi connected. SSID=Furry_Party, IP=192.168.1.114, channel=11, RSSI -66db
4/01/22 22:42:09z MDNS responder started for hostname IotaWatt
4/01/22 22:42:09z LLMNR responder started for hostname IotaWatt
4/01/22 22:42:09z timeSync: service started.
4/01/22 22:42:09z statService: started.
4/01/22 22:42:09z Updater: service started. Auto-update class is MINOR
4/01/22 22:42:10z Updater: Auto-update is current for class MINOR.
4/01/22 22:42:10z dataLog: service started.
4/01/22 22:42:11z dataLog: Last log entry 04/01/22 22:42:00

** Restart **

SD initialized.
4/01/22 22:43:24z Real Time Clock is running. Unix time 1648853004 
4/01/22 22:43:24z Reset Reason: Power-fail restart.
4/01/22 22:43:24z ESP8266 ID: 16295047, RTC PCF8523 (68)
4/01/22 22:43:24z IoTaWatt 5.0, Firmware version 02_07_05
4/01/22 22:43:24z SPIFFS mounted.
4/01/22 22:43:24z Local time zone: +0:00
4/01/22 22:43:24z device name: IotaWatt
4/01/22 22:43:27z HTTP server started
4/01/22 22:43:27z WiFi connected. SSID=Furry_Party, IP=192.168.1.114, channel=11, RSSI -60db
4/01/22 22:43:27z MDNS responder started for hostname IotaWatt
4/01/22 22:43:27z LLMNR responder started for hostname IotaWatt
4/01/22 22:43:27z timeSync: service started.
4/01/22 22:43:27z statService: started.
4/01/22 22:43:27z Updater: service started. Auto-update class is MINOR
4/01/22 22:43:28z dataLog: service started.
4/01/22 22:43:29z dataLog: Last log entry 04/01/22 22:42:00
4/01/22 22:43:29z historyLog: service started.
4/01/22 22:43:30z historyLog: Last log entry 04/01/22 22:41:00
4/01/22 22:43:30z Updater: Auto-update is current for class MINOR.

** Restart **

SD initialized.
4/01/22 23:05:01z Real Time Clock is running. Unix time 1648854301 
4/01/22 23:05:01z Reset Reason: Power-fail restart.
4/01/22 23:05:01z ESP8266 ID: 16295047, RTC PCF8523 (68)
4/01/22 23:05:01z IoTaWatt 5.0, Firmware version 02_07_05
4/01/22 23:05:01z SPIFFS mounted.
4/01/22 23:05:01z Local time zone: +0:00
4/01/22 23:05:01z device name: IotaWatt
4/01/22 23:05:04z HTTP server started
4/01/22 23:05:04z WiFi connected. SSID=Furry_Party, IP=192.168.1.114, channel=11, RSSI -69db
4/01/22 23:05:04z MDNS responder started for hostname IotaWatt
4/01/22 23:05:04z LLMNR responder started for hostname IotaWatt
4/01/22 23:05:04z timeSync: service started.
4/01/22 23:05:05z statService: started.
4/01/22 23:05:05z Updater: service started. Auto-update class is MINOR
4/01/22 23:05:05z dataLog: service started.
4/01/22 23:05:06z dataLog: Last log entry 04/01/22 23:04:50
4/01/22 23:05:07z Updater: Auto-update is current for class MINOR.
4/01/22 23:05:10z historyLog: service started.
4/01/22 23:05:10z historyLog: Last log entry 04/01/22 23:04:00
4/02/22 01:05:28z Updater: Invalid response from server. HTTPcode: -4

** Restart **

SD initialized.
4/03/22 23:14:34z Real Time Clock is running. Unix time 1649027674 
4/03/22 23:14:34z Reset Reason: Power-fail restart.
4/03/22 23:14:34z ESP8266 ID: 16295047, RTC PCF8523 (68)
4/03/22 23:14:34z IoTaWatt 5.0, Firmware version 02_07_05
4/03/22 23:14:34z SPIFFS mounted.
4/03/22 23:14:35z Local time zone: +0:00
4/03/22 23:14:35z device name: IotaWatt
4/03/22 23:14:37z HTTP server started
4/03/22 23:14:38z WiFi connected. SSID=Furry_Party, IP=192.168.1.114, channel=11, RSSI -57db
4/03/22 23:14:38z MDNS responder started for hostname IotaWatt
4/03/22 23:14:38z LLMNR responder started for hostname IotaWatt
4/03/22 23:14:38z timeSync: service started.
4/03/22 23:14:38z statService: started.
4/03/22 23:14:38z Updater: service started. Auto-update class is MINOR
4/03/22 23:14:38z dataLog: service started.
4/03/22 23:14:39z dataLog: Last log entry 04/03/22 23:14:20
4/03/22 23:14:41z Updater: Auto-update is current for class MINOR.
4/03/22 23:14:43z historyLog: service started.
4/03/22 23:14:43z historyLog: Last log entry 04/03/22 23:14:00

** Restart **

SD initialized.
4/04/22 01:15:46z Real Time Clock is running. Unix time 1649034946 
4/04/22 01:15:46z Reset Reason: Power-fail restart.
4/04/22 01:15:46z ESP8266 ID: 16295047, RTC PCF8523 (68)
4/04/22 01:15:46z IoTaWatt 5.0, Firmware version 02_07_05
4/04/22 01:15:46z SPIFFS mounted.
4/04/22 01:15:47z Local time zone: +0:00
4/04/22 01:15:47z device name: IotaWatt
4/04/22 01:15:49z HTTP server started
4/04/22 01:15:50z WiFi connected. SSID=Furry_Party, IP=192.168.1.114, channel=11, RSSI -54db
4/04/22 01:15:50z MDNS responder started for hostname IotaWatt
4/04/22 01:15:50z LLMNR responder started for hostname IotaWatt
4/04/22 01:15:50z timeSync: service started.
4/04/22 01:15:50z statService: started.
4/04/22 01:15:50z Updater: service started. Auto-update class is MINOR
4/04/22 01:15:50z dataLog: service started.
4/04/22 01:15:51z dataLog: Last log entry 04/04/22 01:06:50
4/04/22 01:15:55z Updater: Auto-update is current for class MINOR.
4/04/22 01:15:55z historyLog: service started.
4/04/22 01:15:56z historyLog: Last log entry 04/04/22 01:06:00

The message log shows a number of restarts on April 1. Were these all a result of your power cycling or did you have a storm that caused repeated power outages?

In all of the power fail restarts, the unit appears to have been logging right up to less than a minute before the point of failure. I think too close for you to have noticed the reported “not found /” problem and restarted. So the unit appears to be logging OK throughout this.

Are there any significant lapses in your datalog on April 1 or thereafter as viewed in a daily plots with Graph+?

The issue with “not found /”, on its face, appears to be a problem accessing the root directory of the SDcard. Yet after restart, the problem reportedly goes away. When this happens again, can you try accessing some other files:

Try to access a text file: http://iotawatt.apt/tables.txt

Try to run the file manager: http://iotawatt.apt/edit

If you get to the file manager, the configuration app should come up in the editor window. Does it? Because that is the file that should be missing in the “not found /” problem.

There is another file system on the ESP8266. A copy of your most recent config is kept there for recovery purposes. See if you can access that:
http://iotawatt.apt/esp_spiffs/config.txt

Yeah, had some wind blew thru the area.

I don’t see any gaps big enough to notice, but the way I noticed it was having is problem is I was actually doing laundry and the Home Assistant addon reported my laundry was done (0 power draw) and I went to check it was still running so I went “wait how” and discovered it was not loading. So it was probably only “down” for a couple minutes if it was not logging.

I didn’t know what other URLs to try and access to debug further.

Is the webserver the root of the SD card? I would have assumed its some virtual directory.

As explained above next time you get the “not found /” response.

If you want to go with battery backup, I’d suggest you just get one of these. Never tried one but looks like it would work.

Ah, I’ll look at those. That’s much more compact that most other things I’ve seen.

That’s the approach I’ve taken with everything else, even my TV and adjustable bed are on a UPS…and they switch to battery off and on almost every day it seems with brief bobbles and are clicking away frequently during any wind or bad weather. Seems to be “that’s just how it is” now - got way less stable when they decommissioned a power plant in the county in 2020 and now import all the power.

My S31 plugs are based on a similar ESP chip and I have to have carefully planned automation to “re-sync” them when they reset. Once in a while I’ll see one of them had a “blip” and reported 0 volts mains for one update.