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:
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.
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.
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: