Self consumption method

I have a single phase installation that I will be having an IoTaWatt installed on later today.

I have the inputs set up, Input_0 calibrated, and an integrator configured for import/export.

Screenshot 2024-02-27 at 09-01-09 IoTaWatt Configuration app

Regarding the outputs, I would like to calculate my self solar consumption and my total consumption (self solar + import) for use in home assistant (my own energy dashboard not the core one). At the moment I have these outputs set up:

Screenshot 2024-02-27 at 09-01-27 IoTaWatt Configuration app

Export and Import are fine, but I could replace the Self_Solar and Self_Total with calculations using the integrator instead of what I have now:

Self_Solar = Solar - Grid.neg abs
Self_Total = Solar - Grid.neg abs + Grid.pos

Which method is the best to use?

My reasoning for not using the integrator was that these outputs should be monotonically increasing outputs so do not need it and the resolution of the calculations using just inputs would be better than the 5 second integration output.

Or am I completely wrong?

Well I’m glad I did not use the integrator.

I’ve had this device for 2 years configured but un-installed waiting for me to get around to removing my existing power monitoring.

It’s parsing 15-20 minute chunks every second. The integrator Grid Log is going to take forever 5 hours to catch up at this rate.

I cleared the Current and History Logs but the Grid log is still going back years.

Is there a way to clear all three logs?

I tried deleting and recreating the integrator but the log still starts in 2022.

Will this happen every time there is a power outage to the IoTaWatt?

That’s why we do continuous integration, it would take a long time to do it on demand. There are about 378 million 5 second intervals in a year.

Delete the integration.

Enter this URL into your browser:


When you restart the unit, use the file manager to check that there is no directory called /iotawatt/integrations. If so, delete it.

I would recommend that when you create a new integration, you use a unique name.

I’ll comment on your other questions above later.

1 Like


I did try deleting the integrator and found that URL to delete the logs earlier and did deleted my logs before my last post. The delete directory step was probably what I needed.

It finished up an hour ago and is now showing a value for the Import output (night so not exporting at the moment). So all good now.

Say I have a power outage some time in the future, when the power returns will the Export and Import outputs hold their previous value while the grid integrator is catching up again?

Or will they report 0?

If 0 I need to filter that in Home Assistant (easy to do). Otherwise if they hold their values I’ll just use the outputs as is.

One other thing I could not find in the API is the ability to query the wifi RSSI. Is that possible?

Use the browser debugger to view the status transactions when the status screen is active. This is undocumented and not guaranteed to never change, but realistically it probably won’t.

Yes, they will not be valid until the integrator synchronizes. That takes about 10 minutes for a day’s worth of backlog.

Back to your original questions:

I try not to use the min/max functions too much as they make my head hurt. You are dealing with two inputs: Grid and Solar. Those are the only sources of energy to your panel. They are positive when power is being supplied.

Grid is negative when power is being exported, so it is not a monotonically increasing value. You do need the integrator to separate the import from the export. I recommend a unique name for the integrator.

grid Wh = Grid

Export Wh = grid.neg abs

Import Wh = grid.pos

What you call “Self_Total” is the total power being consumed. It should never be negative and so is always monotonically increasing. That output is simply:

Self_Total Wh = Grid + Solar

What you call “Self_Solar” seems to be the amount of Self_Total that is being supplied by the Solar inverter. It is also a monotonically increasing value. There are a couple of ways to compute this.

You can take the smaller of what you are using and what you are producing:

Self_Solar Wh = Solar min (Grid + Solar)

or you can subtract what you are exporting from what you are producing:

Self_Solar Wh = Solar + grid.neg
(Remember that grid.neg is negative so you add it.)


Unfortunately I rarely have that open. Any chance of it being added to the API?

Not a big deal if you can’t be bothered. Just a “nice to have” for my network device monitoring. With my last energy monitor the wifi would occasionally drop below -70dBm when I parked my car in just the wrong spot to cause multi-path issues for my outdoor AP.

Ha fair enough.

Mine were working but your provided solutions are a lot simpler. Except I was after power not energy, which is still possible. I already changed them.

I also tested the power outage question before you replied and found it is not going to be an issue.

Thanks for the help.

What I’m saying is that there already is an API that reports RSSI and you can see the request and response using the browser debugger. Enter this URL to see the Cliff notes version:


1 Like

That’s perfect. I completely misunderstood, sorry and thanks.