Page 1 of 1

Enphase micro inverters + sunshine = charge battery?

Posted: Wednesday 25 November 2020 9:46
by MacManiac78
Hi there, i'm new here. I have NO coding experience at all. I do have a wish though.

I would like to build / code a switch withing Domoticz (on my Synology DS 110J NAS) to signal a switch to turn ON if the solar panels (With Enphase IQ7+ micro inverters) produce solar power and i would like to turn the switch OFF when the micro inverters are OFF.

Because I need to island the system when the grid goes down, i need a ATS too, to switch OFF (3 phase 25A) and allow some home appliances to run on battery power.

I do know I can buy Enphase battery systems, but I rather build it "myself", with a little help ofcours.

Domoticz is installed on the NAS, and i do have the P1 smart meter script running. This was plug and play, so i could do that myself. :lol:

I'm open for suggestions and willing to learn.
Ben

Re: Enphase micro inverters + sunshine = charge battery?

Posted: Wednesday 25 November 2020 11:35
by waltervl
How do you know in Domoticz if your Solar panels are producing energy? You can get that from the P1 metering or do you have an Enpahse plugin or scraping possibility to get the solar panels metering?


Based on that information you can switch a switch when needed with blockly, DzVents or lua scripting. https://www.domoticz.com/wiki/Scripting_in_Domoticz

Re: Enphase micro inverters + sunshine = charge battery?

Posted: Wednesday 25 November 2020 13:42
by wkossen
i have enphase info in domoticz from the envoy api. you could check on the Enphase kWh Production device. if it's >0 it is producing energy. i get that from the enphase plugin. i also run a script to get info from all the individual inverters, but that is probably not useful for what you want to accomplish.

i'm no good at scripting myself, others are probably much better equiped to help you there. with blockly you could probably do it like this
Untitled 2.png
Untitled 2.png (127.46 KiB) Viewed 975 times
and add a shutoff too.

Re: Enphase micro inverters + sunshine = charge battery?

Posted: Wednesday 25 November 2020 16:13
by FireWizard
Hi, @MacManiac78,

You wrote:
I would like to build / code a switch withing Domoticz (on my Synology DS 110J NAS) to signal a switch to turn ON if the solar panels (With Enphase IQ7+ micro inverters) produce solar power and i would like to turn the switch OFF when the micro inverters are OFF.
I'm sorry, but this post is unclear to me in what you are trying to achieve.
I assume, you want to create a virtual switch. What should this virtual switch do? Do you want to activate another external switch?
What kind of switch and protocol. Or should the external switch indicate something in Domoticz? It is not normal that a switch switches another switch.

What do you want with that external switch in case the solar panels produce power?
Because I need to island the system when the grid goes down, i need a ATS too, to switch OFF (3 phase 25A) and allow some home appliances to run on battery power.
It is mandatory that in case the grid goes down (fortunately very seldom), that you isolate you solar panels and power them down as well.
This is for safety reasons, that engineers can work safely. What is an ATS? How do you run your home appliances on battery?

Normally Enphase Solar systems are connected to the grid by means of, a so called, Q-relay. This relay is available as a 1 phase type or 3 phase type.
See: https://enphase.com/nl-nl/support/enpha ... andleiding

This Q-relay for 3- phases, also provides the phase-coupler. So an external phase coupler is not needed. This Q-relay isolates the invertersfrom the grid, in case the grid is powerless.
I do know I can buy Enphase battery systems, but I rather build it "myself", with a little help ofcours.
I'm not sure that that is a very good idea, but you have to decide yourself. Only one hint. Do not try to extinguish the fire in you solar panels with water.

@waltervl
How do you know in Domoticz if your Solar panels are producing energy? You can get that from the P1 metering or do you have an Enpahse plugin or scraping possibility to get the solar panels metering?
Your P1 Smart meter only indicate, whether you use electricity FROM the grid or that your panels produce so much electricity, that it exceeds your current consumption and that it delivers the rest TO the grid.
But as long as your solar panels produces less than you consume, you will not see it.
In this case, you will need an Enphase Envoy-S or Enphase Envoy-S metered.

It is possible to get the data for each individual panel, as it is able to indicate:
- producing
- communicating
- provisioned
- operating

The Q relay can tell you:
- Q-relay status
- Q-relay contact status
- Status L1, L2 and L3

The AC battery is also monitored

So I suggest that you look to this solution and don't try to build something yourself.

Regards

Re: Enphase micro inverters + sunshine = charge battery?

Posted: Thursday 26 November 2020 8:10
by MacManiac78
thanks allready,

Some answers... an ATS is a Automatic Transfer Switch. By using this i can cut off the grid and drain battery's without creating a deep fried grid maintainance guy.

I know Enphase will come with Encharge. A 3kw and 10kw home battery. This is still a pilot in the USA.

I could use 2 protocols. I do have the P1 (smart meter) script working, so it should be possible to trigger a switch, right?

I also have 3 phase Enphase Envoy metered with Q relay. I do not know how to use the API. Getting this to work might be a step forwards.
If the Q relay can be used as an ATS, this would be great. The 3 ABB HAF junction bixes are full allready.

Re: Enphase micro inverters + sunshine = charge battery?

Posted: Thursday 26 November 2020 14:22
by FireWizard
Hi, @MacManiac78

You wrote:
Some answers... an ATS is a Automatic Transfer Switch. By using this i can cut off the grid and drain battery's without creating a deep fried grid maintenance guy.
Okay, I understand this, the maintenance guy will like this.
This ATS is automatically controlled and you don't need to activate this from Domoticz or whatever.

However if (for one reason or another) the grid is powerless, your Enphase inverters are cut-off and do not produce power ( The new IQ8 will do).
In this case you will connect the battery via an inverter to your local mains.

You said:
I could use 2 protocols. I do have the P1 (smart meter) script working, so it should be possible to trigger a switch, right?
You mean you can collect data from either the P1 Smart meter or from the Enphase Envoy-S metered.
As already said in my previous post, the P1 meter only indicate if (and how much) energy is consumed from the grid or delivered to the grid.
If you consume energy from the grid, it does not mean, the the solar production is zero. The only thing that is for sure, is that if you deliver to the grid, the solar panels are producing.

In my opinion you cannot use this information for the decision to switch to the back-up power.
Of course with this information, you can create a script, which triggers a switch. And what should this switch do?

As also said you can probably use information from the Envoy-S

If you go to (in a browser, you prefer): http://<IP address of Envoy-S>/inventory.json, you will get a result as follows:

0: Status Information of each of your inverters.
1: Your AC battery; probably not information.
2: Your Q relay data.

At the bottom you will find:
gficlearset":false,
"producing":false,
"communicating":true,
"provisioned":true,
"operating":true,
"relay":"closed",
"reason_code":-1,
"reason":"ok",
"line-count":3,
"line1-connected":true
,"line2-connected":true,
"line3-connected":true
I never tested it (by switching of a phase). so I don't know if it works. In this case your Domoticz and Envoy-S should behind a UPS in order to be able to report this. To switch of an individual phase is not that easy in a 3 phase installation. The main switch does all 3 phases together.
If you think that this might be useful in your situation and what you want to achieve I can provide a Node Red flow that monitors the 3 Lines.

Regards

Re: Enphase micro inverters + sunshine = charge battery?

Posted: Monday 30 November 2020 6:59
by MacManiac78
I think I was not clear enough.
When production is above consumption i would like a SOnOff (Or any other WiFi switch) to be triggered to ON. This will allow a battery to charge. When consumption is higher than production, the charger (SOnOff) should be switched off.
Switching off a phase is not what i want. ;-)
I do not want to drain loads of produced solar power to the grid, i would like to harvest as much as i can.

Re: Enphase micro inverters + sunshine = charge battery?

Posted: Monday 30 November 2020 10:41
by rrozema
There are a couple of issues with your plan. But most important is the amount of power involved. Unless you live in a single room appartment with little to no appliances -which I think is not true, given that you have your own set of solar panels-, your total power usage will be multiple KWs at times. No simple switch can be used to switch this amount of power. You need real good, prodessional switches for that. Have a look before you even start trying anything, because the risk of electrocuting yourself or someone else is real, as is the risk of fire.

Another issue is the speed required to switch over to battery power. Again, you need something dedicated, much faster than Domoticz and it's devices to respond in a timely way.

Did you already do some calculations on how big a batteryset you would need to provide sufficient power for your home to last any time? I know there are some youtube bloggers that actually do it, I advise to have a look at how they do this and especially how big their battery setups are. Hint: they most of the time have a separate shed for the batteries alone. And it's not just for the size that they have this separate shed; it's also for the fire hazard. There are currently no special regulations yet for large lion battery sets around residents a.f.a.i.k., but local fire department will want to know in advance that you have this sort of equpment in a residential area.

But let's assume you do get everything set up correctly and safely and you want to use domoticz to switch the battery-charger on and off, to use only the over-production to charge your batteries. That can be done by reading the Enphase Envoy-S metered values: in Domoticz install the "Enphase Envoy with LAN (HTTP) interface)", enter your envoy's ip address and you'll get some new devices installed. The metered Envoy has additional power meters that the standard Envoy S doesn't have: one of them around the lead coming from the solar inverters and another around the lead from the mains-power line. Using these it constantly measures the power coming from both sources. The envoy only updates the power information every few seconds however, so it would again not be very efficient. I would go a dedicated hardware solution instead and use domoticz for monitoring the various components.

Re: Enphase micro inverters + sunshine = charge battery?

Posted: Monday 30 November 2020 15:44
by FireWizard
Hi, @MacManiac78

First of all.

I fully agree with @rrozema comments, regarding electrical and fire safety.

You wrote:
When production is above consumption i would like a SOnOff (Or any other WiFi switch) to be triggered to ON. This will allow a battery to charge. When consumption is higher than production, the charger (SOnOff) should be switched off.
This looks very simple, as it assumes that in case the P1 Smart meter indicate that energy is returned to the grid, you should switch a SOnOff to On and vice versa. But this is far more complex as the charging current is not stable in time, as it depends on the charged state of the battery and also the production of the solar panels is not stable and it will vary, according to cloud coverage, angle, etc.
I do not want to drain loads of produced solar power to the grid, i would like to harvest as much as i can.
In this case I would never do that investment as:

1. Currently you get for each kWh, you deliver to the grid, the same as for a kWh, you consume from the grid.
The grid is the best and largest "battery" you can get, without any extra investment.

2. The equipment you need, like battery charger, batteries, inverter, etc. will cost far more than you will save.

In the UK they call it "Penny wise and Pound foolish".

Beside making a good technical plan, I would definitely also make an economical plan,

Regards

Re: Enphase micro inverters + sunshine = charge battery?

Posted: Monday 30 November 2020 16:37
by waltervl
If you are living in the Netherlands a battery for solar power storage is far from economical the next coming year's. Perhaps when tarrifs for buy increase and sell are set to 0 it will become interesting.