Setting up solar in Emoncms

Howdy Iotawatt’ers,

I’ve been lurking for quite some time and haven’t yet found a thread that seems to answer my question. I believe I have my CTs installed and my inputs configured properly in the Iotawatt, but for the life of me can’t get the feeds setup correctly in Emoncms to properly display my solar generation and my electrical consumption correctly.

I started by following the Emoncms setup guide very closely but unfortunately it suggests one CT for mains and one CT for solar ('m in N. America and have opted for a CT on both L1 and L2). So how to properly import the both of those CTs into Emoncms is one question. Secondly I must be setting up the feed in Emoncms incorrectly because the solar graph and the use graph look very similar.



Iotawatt graph (CT1 main, CT2 main, and CT3 solar)

Emoncms output

Emoncms inputs

At this time I only have CT1 and CT3 logging to anything in Emoncms (I have it setup precisely like the Emoncms setup guide). I’d like to figure out how to log both CT1 and CT2 to Emoncms to accurately show my use and the I’d also like to figure out why the solar isn’t offsetting the use graphs as well. My apologies if this is more of an Emoncms question as opposed to an Iotawatt question. Feel free to tell me as much and I’ll seek info elsewhere.

You’ve come to the right place.

This doesn’t look too far off. I think there are a couple of IoTaWatt configuration issues. The reason your mains may appear to be tracking your solar is that possibly you haven’t checked “allow negative power value” for the two mains inputs. If you don’t do that, exported power appears to be imported power and shown as positive. I see you have a “>0” filter on one of your mains, so maybe you do have the that box checked, but double check that it’s set for both mains.

You solar appears to be correctly installed with one CT on one of the two conductors from the inverter, but you need to check the “Double” box in the input configuration menu because that is a 240V circuit. I see that you have a “+inp” input process configured for the solar, but I don’t know what input you are adding. No matter, read on.

Your Emoncms input configuration should look like this:


where the mains1 process list is:

and the solarhouse process list is:

You can use your own feed names, but those are the default names that the My Solar and My Electric apps use.

To recap:

Insure IoTaWatt mains have “Allow negative Power Value” checked.
Insure the Solar_House input had “Double” checked.
Setup the main1 input process list in Emoncms as above.
Setup the housesolar input process list in Emoncms as above.
Use the default configuration for My Solar.

Let me know how you make out.

1 Like

Thank you sincerely for the detailed reply, @overeasy. I did have the “allow negative” checked (your documentation on that elsewhere was helpful to me. I did not however have the “double” checked for the solar input. And my Emoncms input setup was significantly different than what you recommended so I have re-done all that. It’s gray and cloudy today so may not get any meaningful solar output to verify against but I’ll post back in here later this week with some screenshots to hopefully help others who are on the same quest.

I saw some improvements in your suggestions, Overeasy but not the results I was looking for. I let your suggested processes run for 12 hours or so but SolarPV read 0 watts the entire time (although Iotawatt showed it ranging in the 300 to 500 w range). So, I tried changing your suggested “Power to kWh” and “Wh Accumulator” processes to something different to see what I could get:

This began to display solar generation in yellow in the MySolar app but as previously it also caused the Use graph to spike proportionally. I opted to try one other change from your suggested mains1 process list. I changed the second “+ input” that added solarhouse to a “- input”:

And in doing so the MySolar display now appears to me to look like I think it should. I don’t fully understand the Emoncms processes and should perhaps research them more to fully grasp what they are doing but the graph did not look like I suspect it should. Any thoughts on my changes and whether I’m heading in the right direction or if I’m just fooling myself into thinking so because the graph looks as I think it should?

Note in the above screenshot that I made the change to “- input” at around 14:43.

Can you post a graph of main_1, main_2 and solar_house for the last day using the iotawatt graph app?

It looks to me like one or both of your mains CTs may be reversed.

1 Like

Below is requested graph. When CTs were first installed I followed the arrows on the device to the best of my ability of understanding. The Iotawatt software displayed the “CTs reversed” notation on one of them and I then physically reversed it. The solar CT was also marked as “CT reversed” in the software so I flipped that one around as well. I’m happy to share photos of the CTs in the panel if helpful.

Based on how this graph looks I’d venture that I have the solar CT reversed since shouldn’t it be showing it’s graph dipping down below zero? And then subsequently I should in fact have the solarhouse feed set to “+ input” as you originally suggested, and not “- input”?

Right, my mistake. Should have been log-to-feed and power-to-kwh as I specified for the mains and use.

I think I see what’s going on. The most common way solar is added to a residential panel is to connect the inverter output to a circuit-breaker at the bottom of the main panel. So the inverter power is used by your loads (use) and any excess is exported, causing the mains to go negative. When solar isn’t producing, or it is producing less than you are using, the mains will be positive.

Another way that it’s done sometimes is to connect the inverter output to the incoming main conductors before the main breakers. When it’s done this way, use becomes what is going through the mains, and import export is use-solar.

I think that’s what you have, so subtracting the solar is right, but the input process list on the mains should be going to use first, then to import after the solar is subtracted. Essentially the reverse of what you have now.

The My Solar above would read:

Which I think looks about right looking at the raw data you plotted from the IoTaWatt.

1 Like

I have a main panel outside my house that contains my electrical meter, a centerfed 200A main breaker, a 100A breaker below that feeding the subpanel inside my house, and a 20A breaker above it which is the backfeed breaker for my solar. This outside panel is built in such a way that I can’t clamp the CTs onto it’s mains so these CTs are instead installed inside the subpanel inside the home (aka my main use readings are downstream of my solar). The solar CT is clamped to the breaker in the outside panel (aka up stream from my mains CTs). Based on your notes above I believe your assumptions about my setup are correct.

As such I’ve attempted to maneuver the input orders on the mains. Please verify I have reordered these correctly. I’m not wholly positive where the “- input” solarhouse should live in this order of operations.

Looks like it might be right. Lets see what happens when you get some daylight on it.

Three inches of snow overnight with no particular end to the storm in sight. I’ll provide detail toward the end of this weekend or into next week whenever the solar decides to slough off the snow.

For those who have been curious about this thread or who may in the future be curious about this thread I believe it is safe to say the working and re-working that took place as this thread formed has reached a logical and successful conclusion. The Emoncms graphs now being produced successfully display my home energy usage overlaid by my solar production in such a way that the two are meshed and an accurate overall energy snapshot of our household is portrayed by the graph.

In this graph you’re seeing energy usage starting at around 0800am, the various initial spikes are the coffee machine going on and my desktop computer’s fan running and shutting off. The light blue is the sun just rising over the trees across the street from my house and the solar panels covered partially in snow producing a wee bit of energy. Around 1115am our energy usage was below the solar electricity generated and the graph displays pure yellow. You can then see the sun came out and although the panels are partially covered in snow the diodes were firing and the panels were producing electricity but not enough to offset the huge 7k+ spikes from our clothes dryer running. The nice yellow area around 13:30 is when we left the house to go to the park and our baseload dropped while the solar modules sucked up the sun in our absence.