Log and other Services not starting on Restart - resolved

On “Restart”, the iotawatt unit is not longer starting services… so I can’t access the logs (for example) and I don’t see “WiFi” status. How can I reset/fix this?

Here’s the most recent restart message list… notice it stops after “HTTP server started”
** Restart **

SD initialized.
1/29/23 16:52:36z Real Time Clock is running. Unix time 1675011156
1/29/23 16:52:36z Reset Reason: Power-fail restart.
1/29/23 16:52:36z ESP8266 ID: 14622785, RTC PCF8523 (68)
1/29/23 16:52:36z IoTaWatt 5.0, Firmware version 02_07_05
1/29/23 16:52:36z SPIFFS mounted.
1/29/23 08:52:36 Local time zone: -8:00, using DST/BST when in effect.
1/29/23 08:52:36 device name: IotaWatt
1/29/23 08:52:39 Connecting with WiFiManager.
1/29/23 08:52:44 HTTP server started

Here’s previous (few hours ago) Restart - showing that log and other services started OK.
** Restart **

SD initialized.
1/28/23 15:35:52z Real Time Clock is running. Unix time 1674920152
1/28/23 15:35:52z Reset reason: Software/System restart
1/28/23 15:35:52z Trace: 1:2, 1:3, 1:3, 1:1, 1:2[1], 9:0[1], 9:0, 9:1, 8:2[1], 8:2, 9:2, 1:2, 1:3, 1:3, 1:1[1], 1:2[2], 9:0[2], 9:0, 9:1, 8:2[2], 8:2, 9:2, 1:2, 1:3, 1:3, 1:1[2], 1:2, 9:0, 9:0, 8:2, 8:2, 1:2
1/28/23 15:35:52z ESP8266 ID: 14622785, RTC PCF8523 (68)
1/28/23 15:35:52z IoTaWatt 5.0, Firmware version 02_07_05
1/28/23 15:35:52z SPIFFS mounted.
1/28/23 07:35:52 Local time zone: -8:00, using DST/BST when in effect.
1/28/23 07:35:52 device name: IotaWatt
1/28/23 07:35:52 HTTP server started
1/28/23 08:47:26 WiFi connected. SSID=RANDOM1, IP=192.168.2.174, channel=11, RSSI -67db
1/28/23 08:47:26 MDNS responder started for hostname IotaWatt
1/28/23 08:47:26 LLMNR responder started for hostname IotaWatt
1/28/23 08:47:26 timeSync: service started.
1/28/23 09:59:01 statService: started.
1/28/23 12:18:33 Updater: service started. Auto-update class is NONE
1/28/23 12:18:33 dataLog: service started.
1/28/23 12:18:33 dataLog: Last log entry 01/28/23 06:19:40
1/28/23 12:18:34 historyLog: service started.
1/28/23 12:18:34 historyLog: Last log entry 01/28/23 05:02:00
1/29/23 07:09:50 dataLog: datalog WDT - restarting

View of the main “Status” screen - notice there’s no WiFi section and Logs are not available.

The system is working again!?
I dropped/reconnected the WiFi thinking this might be an issue but it didn’t seem to help until an hour later. Here’s the latest restart message sequence. Notice WiFi connected at 11:16:59 over an hour after the restart began?

** Restart **

SD initialized.
1/29/23 18:09:26z Real Time Clock is running. Unix time 1675015766
1/29/23 18:09:26z Reset Reason: Power-fail restart.
1/29/23 18:09:26z ESP8266 ID: 14622785, RTC PCF8523 (68)
1/29/23 18:09:26z IoTaWatt 5.0, Firmware version 02_07_05
1/29/23 18:09:26z SPIFFS mounted.
1/29/23 10:09:26 Local time zone: -8:00, using DST/BST when in effect.
1/29/23 10:09:26 device name: IotaWatt
1/29/23 10:09:29 Connecting with WiFiManager.
1/29/23 10:12:50 HTTP server started
1/29/23 11:16:59 WiFi connected. SSID=RANDOM1, IP=192.168.2.174, channel=11, RSSI -65db
1/29/23 11:16:59 MDNS responder started for hostname IotaWatt
1/29/23 11:16:59 LLMNR responder started for hostname IotaWatt
1/29/23 11:16:59 timeSync: service started.
1/29/23 11:17:00 statService: started.
1/29/23 11:17:00 Updater: service started. Auto-update class is NONE
1/29/23 11:17:00 dataLog: service started.
1/29/23 11:17:00 dataLog: Last log entry 01/29/23 07:04:50
1/29/23 11:17:00 historyLog: service started.
1/29/23 11:17:00 historyLog: Last log entry 01/29/23 07:04:00

The external event that occurred at 11:16 is the inverter turned on, so the external voltage reference and CTs started having non-zero data to return. Does this affect things?

My inverters turn on when there’s enough solar and turn off when the battery runs down at night. The inverter power goes thru ATSs to the home circuits which cause a power dip on each switch-over between grid and inverter - which causied the iotawatt to restart on each ATS swtich between grid and inverter.

Today I added a powerwall → USB adapter so the iotawatt will be powered directly from the battery instead of 120v USB and will be independent of inverter on/off - ATS switching. Maybe if the iotawatt runs steady the symptoms I saw today will clear up?

With release 02_07_05 the IoTaWatt doesn’t work well without an active AC reference. Never was much of an issue until the proliferation of hybrid systems with batteries. Release 02_08_02 now in ALPHA auto-update is more robust.

I have an off-grid solar system. PV charges battery, inverters come on, sun goes down, and at low battery the inverters shut off.

I wired my IotaWatt directly to the battery (48v → USB) so it would have constant power thinking the Logs would just stay attached. But yet the unit dropped the Logs when the reference voltage went to 0 when the inverter shut off for the day due to low battery.

My 5 minute interval data retrieval is still working…
http://192.168.2.xxx/query?select=[time.local,VRef,I2Black.Watts,I2Red.Watts]&begin=2023-01-31T07:44:00&end=s&limit=360&group=5s&missing=zero&format=csv

uploading 0 for values - which is OK BUT… yesterday when the Inverter started and VRef came back there was corruption in the logs during the period when VRef = 0.

Just for my own info - why are things designed like this? Will the update referenced above fix this?
Do I have to fake it with a constant (small) inverter to produce a constant 120v reference?
Not understanding the design/logic behind "** Restart ** / Logs disconnected when VRef = 0.

With release 02_07_05 the IoTaWatt doesn’t work well without an active AC reference. Never was much of an issue until the proliferation of hybrid systems with batteries. Release 02_08_02 now in ALPHA auto-update is more robust.

Is this a BOT answer? It’s a repeat of above and doesn’t answer questions.
OK - I set ALPHA update. Does it address the unwanted "Restart / Log disconnects / Log corruption - I guess we’ll see.

I’d still like to know why things stop when VRef = 0 and what’s the common workaround.

Not a BOT, but asking the same question a different way doesn’t necessarily elicit a different response.

IoTaWatt has a single processor that both samples power (66.6% of the time) and logs, runs web server, handles queries etc. 33.3% of the time. It has to synchronize those acticities with the AC cycle, so the AC cycle is a fundamental part of the way it schedules and does things. When there is no AC cycle, it spends all of its time trying to find it.

The newer release times out the AC sampling so that other things, like the web server and datalogging can run.

Good to get some info instead of a repeat with no answers - thank you.

As long as the Query API starts returning data points when the VRef comes back, then great.
The issue I saw was corrupted Log values during the VRef = 0 period. There was a repeat of the same power data point every minute or so among the 0 values. I can ignore this when VRef = 0 so no problem there.

As a work I can setup a constant 120v VRef source - perhaps a small 120vac inverter running off the battery all the time regardless of the main inverters.

Not sure about an ALPHA update - don’t see any way to revert to a previous update in the docs.

You should get voltage = zero.

Don’t do that.

If you want to revert, just set auto-update back to MINOR.

Great info - thank you!

Why not do a constant 120v reference?

In my case, I have 2 x 240v/120v inverters off the powerwall but only 1 x 120v VRef (pluged into 1 phase of one inverter). My purpose is to CT each 120v leg of both inverters - that’s 4 x power data points. With only 1 VRef, it can’t be an actual VRef for both inverters no matter what I do. I’m OK with approximate data.

Where am I going wrong in my understanding / Is the idea to have 4 x VRefs?

***I get (now) that I’m may not be using IotaWatt in the way it was orignally envisioned - but I have to say its seems a really good product for my purposes of data logging Inverter output power. I’ve tried other means and I’m really excited about this unit. I’ve set update to ALPHA.

Quite a rig.

It doesn’t work like that. Voltage isn’t just 120V, it varies with 60 cycles per second and in each cycle the voltage varies between -170V and + 170V in a sine function. IoTaWatt samples that voltage 640 times per cycle and calculates (among other things) the RMS voltage (square root of the sum of the squares). Current is doing roughly the same thing with RMS Amps. Watts (real power) are an integration of those Voltage and Current samples. This OEM site does a good job of explaining it all.

IoTaWatt can handle up to three voltage references natively. Inputs 13 and 14 can be used for either CTs or VTs.

Actually, since you seem to have wiring skills, I’d recommend using two 240V references, one for each inverter. It would be quite accurate as the only variation would be the differential in leg voltage applied to the differential in leg power.

No, it was envisioned to be a very versatile monitor. It’s being used for all kinds of hybrid system, using a variety of voltages, single-phase, split-phase, three-phase, wye, delta, high-leg-delta, and also in various battery PV installs. Once you get how it works, there’s not much you can’t monitor.

1 Like

I understand much better now about VRef and what IotaWatt is doing OS/software wise - thank you.

Just ordered 2 x additional VRef units. I’ll use 1 on the 2nd inverter and then later this year I want to monitor incoming power from a generator and will use the 3rd one for that. When I plug them into Inputs 13 (and later 14) and they show voltage, I presume there will be a way to associate them with the respective CTs.

That ALPHA firmware just updated my unit to 02_08_02

I’m getting excited that IotaWatt is going to work very well for my situation :smile:

ALPHA 02_08_02 is working. Didn’t get a Restart when VRef went to 0 and the unit is retaining the Logs and no messages in the Message Log.
Cool! Thank you!