Understanding 'My Solar Divert' from IoTaWatt server inputs

Our IoTaWatt installation consists of the 5Vdc and 9-12Vac power supplies along with CT1 (100A Consumption), CT2 (100A Generation) and CT3 (20A Immersun) for a TYPE1 system. It is believed that emoncms server inputs from iotawatt of Consumption, Generation, Immersun and the iotawatt calculated outputs of Grid_Cable (Consumption – Generation) and House_Use (Consumption – Immersun) have all been successfully installed.

That said, it is not understood why the emoncms app ‘My Solar Divert’ has a negative sign on the red grid bar when the house is taking power solely from the grid i.e. a one hour window after sun set when both ‘Solar’ and ‘Divert’ are zero.

The negative sign is also present on the red grid bar during a one hour window in the daytime when the power demanded is greater than the solar generation, so the extra power needed is being taken from the grid.

It is noted however, the emoncms Feeds graph of ‘Grid’ (Consumption – Generation) shows the correct positive/negative sign for import/export for both of these examples.

Changing the orientation of the CTs only makes matters worse. The graphs are then incorrect and the negative sign is still present on the red grid bar.

So, I would like to know:

  1. if the negative sign is correct, what is its meaning?
  2. if the negative sign is incorrect, what needs altering?

I apologise if insufficient information has been provided and would appreciate guidance where to locate what is needed.

I’ll need to come up to speed on the My Solar Divert app. We have several My Solar apps running fine, so I think it’s just a matter of setup. While I look at that, can you post your inputs configuration, output configuration and your status screen, as well as any configuration info that is provided to My Solar Divert?

Thanks for taking on another of my problems. The attached file contains seven screen dumps that hopefully cover the things you listed. IoTaWatt Info.zip (871.2 KB)

N.B. the Immersion Heater power supply, via the Immersun unit, is included in the Consumption CT1 reading. Hence the reason for the Consumption - Immersun calculation to find out what the house is actually using.

I think I can make a first pass at this, and maybe explain a few things along the way.

First, the principles under which this all should work. I’m struggling a little here to understand British terminology, and I may let some American terminology slip in or perhaps slightly misuse the British terminology, so feel free to comment back or ask questions if there is any doubt as to what I am saying.

You are making three measurements with the IotaWatt:

  1. What you call “Consumption” which I take to be a CT connected to the main on your “consumer unit”. This should be a signed quantity, in other words, power can flow in either direction, depending on whether you are importing or exporting power. So when you configure this input on IoTaWatt, you should click the “Allown negative power value” box. So the watts indicated for this input in the status display will either be positive or negative (import vs export) and will display green when negative (exporting). I am going to recommend you rename this to “main”, and I will henceforth refer to it as such.

  2. What you call “Generation” which I take to be the feed into your consumer unit from your solar PV system. Typically this is a positive number, and represents the power being added to your consumer unit. Conceptually, it is the same as the “main” except that it does not export. I am going to recommend you rename this to “solar” and I will henceforth refer to it as such.

  3. What you call “Immersun” I take to mean a CT on the connection to an Immersun solar diverter unit. Don’t know much about these except what I read from their website. Essentially, this is just a load that has a smart controller regulating how much power to draw based on the export status of a separate CT that they put on your main. I am going to recommend you rename this to “divert” and will henceforth refer to it as such.

So main and solar are both supplies to your consumer unit. To determine how much power you are using at any given time, you add those two together. Remember that main is signed, so for instance if your solar is producing 2000 watts, and your main is -1200, you are using 2000 + (-1200) = 800 watts. we will create an output called “use” and define it with the calculator as main + solar.

I see that you are interested in knowing what you are using exclusive of the power diverted to the Immersun, so for that you should define an output:

house_use = main + solar - divert

Now you need to export this data to Emoncms so that you can use the My Solar Divert app.

You can leave the voltage output as is, always nice to have. So, listing by Key:

  1. Voltage
  2. main (signed power from/to grid)
  3. solar (solar PV output)
  4. divert (power used by water heater via Immersun controller)
  5. main + solar (net total power used in the home)
  6. main + solar - divert (net total power excluding Immersun water heater)

That will come in to Emoncms on the corresponding input Keys 1-6. It’s not neccessary, but for clarity you could name them:

  1. Voltage
  2. main
  3. solar
  4. divert
  5. use
  6. house_use

For each of these, you need to create power and Kwh feeds, so you will first add a “Log to feed” input process with first name I provide below, followed by a “Power to Kwh” input process using the second name I provide. So for each input:

  1. Voltage, (no Power to Kwh)
  2. import, import_kwh
  3. solar, solar_kwh
  4. divert, divert_kwh
  5. use, use_kwh
  6. house_use, house_use_kwh

So now, the easy part. If we’ve done all this correctly, you should be able to run the My Solar Divert app, or the My Solar app, or the My Electric app, using the standard defaults and get the correct results. Give it a try.

Caveat, I’ve not used this particular app before, so give me a shout if there are any problems.

If it goes, post a shot of a day’s data so I can see what it looks like and validate we got it right.

The set up you have described seems to match the TYPE2 system as shown on Solar PV - Guide | OpenEnergyMonitor

Unfortunately, because there were no spare Miniature Circuit Breakers (MCBs alias fuses) in the existing Distribution Box (DB1) the solar system installer put in a second Distribution Box (DB2) along with a junction block, so we have a TYPE1 set up.

As a retired mechanical engineer venturing into a new topic, I decided that probably the way forward to start with was to take advantage of the information readily available on the openenergymonitor.org web site. So the following describes our IoTaWatt installation:
CT1 is fitted between the junction block and DB1 (i.e. Consumption).
CT2 is fitted between the Grid-tie Inverter and the junction block (i.e. Generation).
CT3 is fitted on the input cable to the Immersun unit (i.e. Immersun) and its MCB is within DB1.

Hence, the amount exported/imported to or from the grid is the difference between generation and site-consumption (i.e. Consumption – Generation, referred to as ‘Grid’).

As the power taken by the Immersun unit is included within the ‘Consumption’ power figure the actual power used by the house must be found by removing the Immersun Power from the Consumed power (i.e. Consumption – Immersun, referred to as ‘House’).

Apart from adding in the Immersun aspect, it was hoped that by using an established procedure things would work out. If you are willing to have another look and make some suggestions it would be appreciated.

I apologize. I wasn’t familiar with the Type I and Type II documentation that you were using. Now that we are (hopefully) on the same page, I’ve been able to make sense of your original question. I think the problem is that you are specifying “6House” instead of “Consumption” for use in the My Solar Divert app. (and 6House_kWh instead of Consumption_kWh).

With those changes, and assuming your setup does match the TYPE 1 diagram, the My Solar Divert should work as designed. That said, I notice in the IoTaWatt status screenshot that the Immersun unit is using more than the excess generation of your PV system, so the results you see may not be what you expect. It appears that you are importing power even as your PV produces more than you need for the house load.

I’m not sure why that’s happening, or even that it’s correct, but if it’s possible and accessible, I’d like to see another CT on the line between the Junction Box and the Meter. If I understand the Immersun correctly, I believe their CT is installed there. In fact, using that as a signed CT (main) along with the Generation CT, you would essentially have a TYPE 2 system as I described in my last post.

With that additional CT, you would have the electrical equivalent of double entry bookkeeping.

main + generation = use

The computed use output should reasonably match your Consumption input.

I’ve got an interest in seeing the result of that experiment, as well as a reconciliation over time with your meter, because some time back Trystan was asking me about the ability of IoTaWatt to accurately measure the power consumption of a solar diverter. Apparently, the chopped up waveform that results from their power regulation does not measure accurately with low resolution power monitors. At 750 samples per cycle - ten times the TX sample rate - I expect better results.

Thank you for taking another look.

I took a screen dump of My Solar Divert with ‘Use’ set to 6Grid, changed ‘Use’ to Consumption and taken another screen dump. Both show the red grid bar at the bottom with a negative sign :disappointed: I also loaded emoncms’s graph for 6Grid covering the same time period which shows a positive import from the grid. A screen dump of this along with the previous two files can be found in the upload.emoncms Solar Divert Screens.zip (334.8 KB)

Regarding the Immersun, early on when viewing the ‘Input Channels Status’ window of the IoTaWatt Power Monitor on iotawatt.local, it was noticed that the figures displayed for the Immersun fluctuated randomly between positive and negative numbers! The numbers were sometimes red, sometimes black and occasionally green! Changing the direction of the CT made no difference. This issue appears to have been overcome by changing the configuration of CT3 to allow negative power values. It was also been noted that Generation needs to exceed Consumption by 200W or more before the Immersun diverts power. It appears therefore, that the Immersum only starts diverting power once an excess export threshold had been reached. As an aside, I have put a voltmeter across the output of the Immersun and found that the voltage fluctuates fairly wildly rather than a steady state lower voltage. The significance of this will probably mean more to you than it does to me.

I understand the purpose and am willing to install another CT on the cable between the Junction Box and the Meter but I need to purchase one and an extension cable first.

Sorry, please would you explain what these next two sentences mean -
If I understand the Immersun correctly, I believe their CT is installed there. In fact, using that as a signed CT (main) along with the Generation CT, you would essentially have a TYPE 2 system as I described in my last post.

I’m not able to unzip that file. Could you just post the images right into the forum thread?

When I looked at the Immerson unit site, it appeared that they had a CT that was to be installed on the main line coming from the meter. That doesn’t appear to be how yours works. It’s not important. The second part of the statement was that if you did put a CT on the main line coming from the meter, that CT would be the “Grid” CT in the TYPE 2 setup, and your “Generation” CT would be the “PVgen” (I don’t get why they used different terms for that one in the two diagrams). You would essentially have the components of a TYPE 2 system.

So I’d like to see those screenshots, and also, could you use the IoTaWatt graph app to plot a days worth of the three inputs and post that?


I’m not able to unzip that file. Could you just post the images right into the forum thread?
‘Take 2’

Could you use the IoTaWatt graph app to plot a days worth of the three inputs and post that?
Fingers crossed -

You’re not gonna like this, but I think that negative number is normal. I think it means you are importing vs. exporting. I can’t say for sure, but I configured that app on a solar home, assigning the feed for the heat-pump water heater as the diverter.

Maybe there’s a trick in the signs someplace, but here’s the same house My Solar app:

The IoTaWatt plot of the three inputs looks reasonable. Shows the diverter coming on when the generation exceeds consumption be about 200W as you said.

You are correct, I am not happy. :thinking: I am still not convinced that the negative sign on the red grid bar on the ‘My Solar Diversion’ app display is correct for the following reasons:

  1. As you pointed out, the figures on the ‘My Solar’ app display are showing the grid as importing in red (and this turns green to figures when exporting).

  2. The number and arrow direction shown below the red grid bar on the ‘My Solar Diversion’ app also indicates an importing situation.

  3. When exporting is taking place, the ‘My Solar Diversion’ app continues to show a red grid bar containing a negative sign! My engineers logic suggests the grid bar should change to green (as on the ‘My Solar’ app display) or not show the negative sign when importing. Either way, the ‘My Solar Diversion’ display would then better match that of the ‘My Solar’ app display.

  4. Lastly (and I consider this to be very relevant), I refer once again to the ‘solar-pv’ page on the OEM web site mentioned earlier, where there is an Important Note and I quote: “The polarity of the power readings depends on the orientation of the clip-on CT sensor. Orientate the CTs so that generation and site-consumption is positive and grid import/export is positive when importing and negative when exporting. The correct orientation can be determined by trial and error.”

Unfortunately, I do not have the ability to find out if ‘there is a trick in the signs’ somewhere within the ‘My Solar Diversion’ display processing.:disappointed:

See the discussion attached to this PR for some insight to the mysolarpvdivert app

The colours and the arrows are not dynamic AFAIK.

Bobs example does look a bit odd to me as the solar percentages add up to 126% and 0.7+2.6+0.1 doesn’t equal 2.6 even with rounding, but it has been along time since I looked this closely at the numbers, so I could be wrong.

I’m not defending this app, but I think I understand what he’s trying to say, notwithstanding the (IMO) unjustified negative sign on grid. Those percentages seem to represent the fractional part that the number and the value in the box containing the percent: 0.7/2.6 = ~26%, 2.6/22.4 = ~11%, 20.6/22.4 = ~92% you get the idea.

What’s interesting is one of the final screenshots in the PR:
There’s out old friend the negative sign. Today is pretty sunny around here, so I took another look at that solar installation and zoomed in on a net export window:

So, at least in this case, the color didn’t change, and the sign did change to positive when exporting. We may not agree on whether the app should take the street view or the house view, but at least it does appear to be consistent. I’ve initiated an experiment to develop the street view, but because of the way these feeds work, I can’t do it retroactively. Stay tuned and I’ll try it tomorrow after the new feed has some data.

Id like to note here that OddJob’s raw data comes from an IotaWatt, and it seems to report all thepower very well including the diverter power. Also, the site I’m using to generate the examples is a US solar IoTaWatt installation that has been running near perfectly for seven months (the gap in late September was a hardware problem that had been fixed in a later version, still need to upgrade this site). This thread is about a problem related completely to expectations of the My Solar Divert app.

I tried using a negated grid value for “import_kwh” but it doesn’t change anything. So the negative grid is how it is. Here’s a shot of the app while the system is exporting. As in th My Solar app, the real-time red importing :frowning_face: becomes green exporting :grinning: But the “Grid” box below remains red either way.

I was also mystified by the value in the black space between solar and grid. I have determined that is the actual Kwh exported to the grid. With the solar diverter, you would expect that to be a low number. Here in this example without a diverter (using the heat-pump water heater load to simulate), there is some export.

And as you can see from this My Solar from the same period, the 3.8 is Kwh exported, and the -4.6 is the net Kwh exported (4.6 imported). Makes my head hurt, but if you are going to put the numbers side by side, it does kind of make some sense to make one positive if it represents export, and the other negative if it represents a net export. I suppose you could do the opposite, but there is a certain logic to it.

Thank you for the push in the right direction.
Having become aware of “Add solar PV app for people who divert excess generation by mattjgalloway · Pull Request #17 · emoncms/app” an understanding has been achieved regarding the ‘My Solar Diversion’ app. It is hoped the following list of observations may be of help to others who, like me, start using emoncms.org for the first time:
The figures at the top of the screen show the current power situation for the various areas being monitored. Whilst logged in to emoncms these figures represent the current situation and are not necessarily related to the graphic display below. When exporting power, the word ‘EXPORTING’ is displayed and the power figures shown immediately below are green. When importing power the word ‘IMPORTING’ is displayed and the power figures shown immediately below are red.
Next, the graphic display, the horizontal time scale can be selected from the six listed options and then adjusted by clicking on the +, -, < & > symbols or a portion can be selected for expansion by using the mouse.
The several coloured bars beneath the graphic display represent the various possible aspects included in the time period being displayed. The kWh figures show the respective cumulative energy for each aspect in the graphic display and should be treated is indicative only, because they appear to be rounded up/down. The % values show how this energy is distributed.
The red grid bar beneath the display stays red regardless of the direction of current flow.
The number on the red bar is the algebraic sum of grid Import/Export energy during the period of the graphic display. When proceeded by a -ve symbol this signifies more energy has been imported than exported. The absence of a -ve symbol therefore means the opposite i.e. more energy has been exported to the grid than imported.
IMHO the use of the -ve symbol in this case is contrary to the fundamental principle stated on OEMs PV set up guidance procedure i.e. the polarity from the installed CTs should be such that -ve means exporting and hence +ve means importing. This apparent contradiction in the OEM principle was the sole reason for raising the topic in the first place, but at least an explanation has been established.

Sorry for the delay in responding but other task got in the way :disappointed:
I’ve managed to install a 100A CT on the line coming from the meter (Grid CT). So I can now look at and compare the figures for the Type1 and Type2 installations. The following screen dumps are for the Type1 set up:

This next series are for the Type2 set up:

If these are not what you had in mind please let me know.

I’ve now realised that I made a complete mess of uploading the screen dumps on my previous post - sorry. Having edited that post you should now be able to see what I believe you requested.
Please let me know if you would like anything else and I’ll try not to take as long to respond.