Interesting artifact on pvoutput from power outage - resolved

On the morning of December 25th a squirrel popped a fuse out on the pole feeding my house and we lost power with a bang. The electric company got us back up and running fairly quickly. My iota is not on any sort of UPS so it went off with most everything else. Here’s my import for the day with the outage roughly underlined in red showing 30.8kWh for the day:

for some reason my pvoutput data is showing a HUUUUGE spike in consumption once the iota started to upload again:

by the end of the day it has me up to 212.183kWh.

Any idea why this would happen and any way to fix the data on pvoutput?

I assume the iota is a good candidate for one of those “router” UPSs that’s basically a lithium ion battery pack with USB outputs.

I hope the squirrel is OK.

This is interesting. Can you give me a more context?

Can you add import Wh to that plot please?
Can you show your outputs setup list?
Are you using integrations, and if so can you post the integration Script (calculator)?


Oh, and the PVoutput setup please.

As far as I know he’s ok…went out to the pole and was talking with the neighbor (just the two of us back off road served by the transformer), he used to do high voltage stuff and he said maybe there’s a squirrel around the pole and sure enough there was one twitching in the bushes. It seemed to be slowly recovering and was gone later by the the time the power company guy arrived.

new graph:


name unit script
consumption Watts = (solar_3 - grid.neg abs ) max 0 + grid.pos
cooktop Watts = Input_10
dishwasher Watts = Input_8
dryer Watts = Input_13 + Input_14
export Watts = grid.neg abs
heat_pump Watts = hp_condenser_4 + hp_air_handler_5
import Watts = grid.pos
misc Watts = (solar_3 - grid.neg abs ) max 0 + grid.pos - hp_condenser_4 - hp_air_handler_5 - subpanel_6 - subpanel_7 - Input_8 - Input_9 - Input_10 - Input_11 - Input_12 - Input_13 - Input_14
oven Watts = Input_11
shop_and_garage Watts = subpanel_6 + subpanel_7
solar_production Watts = solar_3
water_heater Watts = Input_9
well_pump Watts = Input_12

1 integration:
grid Wh = main_1 + main_2


(not sure if you were asking for more context of the squirrel/fuse thing but this is roughly what they look like:

and the part circled in red was blown open and it was dangling by what was the lower part. The power company guy used a special pole to take down the old and put the new back up and ram it back into place, was cool to watch.)

literally this: Changing a Power Line Fuse - YouTube

Had the exact same thing happen at my house maybe thirty years ago. The squirrel was DOA.

I think I see what’s happening here. If I’m correct, this is a complicated race condition that is occurring at startup after a power fail. I’d like to prove it out before going any further. Can you plot your export and import outputs in Wh units with accrue checked from on or before you created the integration until Dec 25 around the time of the failure and show the data statistics at the bottom. I’m interested in seeing if it’s in the 188 kWh ballpark.

UPDATE: I believe this will be fixable and your PVoutput can be corrected, but if you are not a donator, the clock is ticking and the update window is closing.

1 Like

You, sir, know your shit


You Ninja-edited me :slight_smile: . I am not a pvoutput donator. I just got my iota last month on Dec 14th (I was refreshing your pages a lot waiting for them to come back in stock) and am still exploring the utility of all this. It’s not the end of the world if it can’t be fixed in time. Just like I had initially configured my solar data as negative thinking that was the right thing to do until I found out about the integrations and switched to using that so at first my production goes negative.

1 Like

Unless I miss my guess, I think if you set the PVupload history date to 12/25/21 and restart your IoTaWatt, it will reload correctly. Once it finishes reloading (If you are a freeloader it may do a rate limit pause until the hour partway through, but when it catches up completely, I think Dec25 forward should be OK. Once it is caught up, clear the upload history date so it won’t do that every time it restarts.

Going forward, I don’t think you should be using the integration to compute consumption. It’s not necessary. I think both your consumption output and your PVoutput consumption Script should simply be:

consumption = main_1 + Main_2 + Solar_3

This should always give the same result as your current Script but it is simpler and because it doesn’t use the integration, can’t fail in a power fail restart before the integration can synchronize.

1 Like

Wow, yeah that formula makes a lot more sense. I think I was just getting so wrapped up around the axles when I first set the thing up with positive vs negative values with the solar…then I found out about the integrations and updated to the, at the time, beta version that supported that and just never got back to the nice simple math. I updated my consumption and misc outputs as well as the consumption for the pvoutput uploader.

Before I put in the date and restart…you didn’t mention, but do I check the “Reload History” box? I am aware that I should blank out the date after it’s done so it doesn’t keep trying to start over every restart.

Thank you very much, yet again, for you timely and on-point support.

Yes, check the box, then uncheck it after the update. I forgot about that. You can leave the date as long as you uncheck the box but may as well do both.

Please report your result so I can mark this resolved.

Hold on, don’t you need to subtract the solar export to get to the net consumption? Sorry if I missed something here. Maybe this is a learning experience for me.

I think what you are calling net consumption is my “import”. I want to report actual consumption which is how much electricity I am actually using, not just “what I’m paying for”.

My old, overly complicated consumption was
(solar_3 - grid.neg abs ) max 0 + grid.pos
that was a long winded way of saying…take the solar production (a + #) and remove any export then add back in what I’m importing from the grid.

If my house is drawing 500w baseline and solar is producing 2000w…I want to measure that 500w…not ignore it because my import is 0 and export is 1500w. I’m still using the electricity and want to measure/report it.

Your “import” is what you consumed from the grid (you pay for this). But your “consumption” would also include the solar generation minus the export back to the grid.

If the house is using 500W and the solar is producing 2000W, Main_1 + main_2 will be -1,500.

-1500 + 2000 = 500

It’s baked in the cake.


Dunno…it all makes sense to me on the graph…
my house “consumed” 14.3kWh
I “imported” from grid 11.4kWh
my solar “generated” 8.03kWh
I “exported” to grid 5.2kWh

The ~3kWh difference between what I generated vs exported is the same as the consumption - import…I used that 3 before it had a chance to get out to the grid.

Dec 25th on pvoutput is looking good…it’s showing 32.022kWh instead of 212.

Since it was really only that day…any reason to let it keep overwriting the data or just uncheck the box, clear the date and restart again?

PVoutput: Running, Last update 12/30/2021 8:00:00 PM
Transaction Rate-Limit exceeded. Resume at 20:00

I am going by what is written in the docs: Tracking Grid import/export with solar
This is what you were originally doing. But it seems you are not interested in the grid import and export values but only your own consumption. Thanks both for your patience.

I’m a little confused. I still have all those numbers as shown in my graph. I am using an integration to determine import and export:

export= grid.neg abs
import = grid.pos

Those #s are “net” in from and out to the meter from my panel. I like having the “full” consumption # (Using Bob’s simplified formula) for my own purposes. Before I switched it out I added a consumption2 with his formula and graphed both and they were on top of each other.

@overeasy Sorry…one more…I let it go and upon the iotawatt trying to resume uploading at 20:00, I see the following:
PVoutput: Running, Last update 12/30/2021 8:00:00 PM
Unrecognized HTTP completion, upload Bad request 400: Missing parameter [data

message log:
1/04/22 18:57:53 PVoutput: started
1/04/22 18:57:53 PVoutput: Transaction Rate-Limit exceeded. Resume at 19:00
1/04/22 19:00:51 PVoutput: System NTAC Solar, interval 5, freeload mode
1/04/22 19:00:51 PVoutput: Reload status beginning 12/25/21 00:05:00
1/04/22 19:01:57 PVoutput: Transaction Rate-Limit exceeded. Resume at 20:00
1/04/22 20:00:57 PVoutput: Unrecognized HTTP completion, upload Bad request 400: Missing parameter [data

I think all my data was fine after that day…it was the only abnormal spike I saw so I’m gonna uncheck the box and restart the unit.

Edit: PVoutput: Running, Last update 1/4/2022 8:10:00 PM

1 Like

Don’t know what happened there, but it should be fine now. What is the name of your PVoutput site?

Just to standardize the terminology, I use “net” to mean the algebraic sum of the two as in = grid.neg + grid.pos

grid.neg is the total exported energy (-)
grid.pos is the total imported energy (+)

NTAC Solar 3.200kW (

I do recall something similar happening before when I originally getting things setup and I don’t remember what I did to fix. I think I thought it was the voltage causing a problem or something so I stopped sending that data and I reloaded everything from the start. I don’t remember if I just let it go and it eventually worked or what. Sort of doesn’t matter now since the later data was ok and it appears to have picked back up with current stuff just fine.

1 Like