Energy Monitoring - Solar Panel - Three Phase

Hi, I have been using home-assistant for a long time and I have recently installed two Shelly current clamps to manage the energy consumption and production of solar panels. My home system is three-phase and this causes some problems when setting up the energy monitoring system.

I would ask you to:

  • fix the solar production forecast by generating a single one, not by individual phase (see attached image)
  • automatically create an entity that sums the Wh of the three phases
  • implement a step-by-step guided UI that facilitates the assignment of entities according to the type of installations (single-phase, three-phase, etc.)
  • possibility of assigning the correct logic based on a sum/subtraction operation (e.g. to calculate the energy returned to the grid and feed it to Home Assistant’s energy system I must 1) sum all the solar production phases, 2) sum all the grid phases taken from the grid, 3) subtract the sum of the grid phases taken from the grid from the sum of the solar production phases. Too complex guys…

IF ANYONE CAN HELP ME WRITE TO ME THANK YOU :slight_smile:

Translated with DeepL

1 Like

Hi, I also have a 3fase system. We are few. Currently I use a Shelly 3EM to check the Solar production, plus a meter provided by the Wallbox which does the sum of the Power from/to the grid.
Eventually the solution is to get TWO Shelly 3EM so you count all phases (3+3=6 values).

In order to use them refer to this thread

Regarding the solar forecast, I haven’t yet had the chance to look into it. But nevertheless the solar production (do you have batteries?) all the 3 phases should be more or less the same value

1- the three phases should be more or less always the same
2- and 3- this of course are not the same, it depends on the load you have in your house, so I do not think is correct to sum the three phases, because is like having 3 houses with each hous one phase

Yes my system is three-phase so I installed two Shelly 3EM sensors:

  • one that measures the three phases of the grid meter (i.e. the Wh I take from the grid) [G]
  • one that measures the three production phases of the solar panels (to get the total Wh I produce I have to add up the three phases) [P]

I thank you for the link you shared with me. I will look at it now and try to implement it.

Currently, my problem is to create the sum/difference logic to correctly display the data on the Energy Meter screen, which uses a different logic from my home electrical system.

The Shelly 3EM that measures how much I draw from the grid only ever has a positive flow. Through that wiring I do not return anything to the grid.

To calculate how much electricity I feed back into the grid [R] I should take do:
[G]-[P]=[R].

I translate into words:

  • My house consumes tot Wh [G], solar production is tot Wh [P], if [P] > [G] then I am self-sufficient and return the difference, if [P] < [G] means I do not produce when I consume and return nothing to the grid because I exhaust my own production.

just a question of interest… doesn’t your Inverter already provide the required information?

I also have a three phase inverter - and my inverter providing all information per single Phase - but also total Production / Export and Import values.

Also, I am using SolarForecast - and it never looked like in your screenshot… (even after splitting forecast into multiple groups of solar modules)

I would have to check if the inverter is compatible with home assistant but I don’t think so because it is a 10-year-old system. I thought I would solve it with the shelly 3EM. You could show me your forecasts. I also use the same forecast system as you.

I have entered each phase individually and the production forecast does it for each phase

Hi,
ok - I GUESS - I know what the issue is.

I am using only the combined value from the production - directly from the inverter.
Therefore, I have only one entity in my Energy Dashboard Configuration.

grafik

I think, you have added all three phases individually as device - now, I am not sure, if HA will automatically add forecast to each device, if it has been set up for one - or if you have set it up for all entities…

I’ve just tried how it behaves when I want to add another entity to the production… in this case, I can decide, if I want to set forecast - or not.

I think, you don’t need to add forecast for each device - one where you setup the total kWp of your Solar should be OK

maybe your inverter setting is ZERO EXPORT?

I don’t really know the Shelly 3M - but it looks like the meters you put around your wire…
In this case, it COULD be, that the sensor is attached in the wrong direction.

That sometimes happen - and then export will be shown as positive value and for example import could be negative …

Can you not add template sensors that add the three phases together and then use those in the energy dashboard?

So create a total solar and total consumption template sensor. I created a template sensor to convert another sensor from km to miles so I would’ve thought you could do something similar.

template:
  - sensor: 
    - name: volkswagen_id_vinhere_charge_rate_mph
      unique_id: volkswagen_id_vinhere_charge_rate_mph
      unit_of_measurement: mph
      state: >
        {{ (states('sensor.vinhere_charge_rate')|float/1.60934)|round(0) }}

it would be possible to create a template sensor which does sum up the three phases…

the correct logic based on a sum/subtraction operation (e.g. to calculate the energy returned to the grid and feed it to Home Assistant’s energy system I must 1) sum all the solar production phases, 2) sum all the grid phases taken from the grid, 3) subtract the sum of the grid phases taken from the grid from the sum of the solar production phases. Too complex guys…

So… I would do it like this:

- template:
  - sensor: threephase_production
    unique_id: threephase_production
    device_class: energy
    state_class: measurement # I don't know, how the sensor behaves - it might be possible to use "total_increasing"
    state: >-
      {% set threephase_measurement_production = states('sensor.measurement_phaseA_production') + states('sensor.measurement_phaseB_production') + states('sensor.measurement_phaseC_production') %}
      {{ threephase_measurement_production | float(0) | round(2) }}

I would also include an availability check - something like:

    availability: >
      {{ states('sensor.measurement_phaseA_production') not in ['unknown', 'unavailable', 'None'] }}
      {{ states('sensor.measurement_phaseB_production') not in ['unknown', 'unavailable', 'None'] }}
      {{ states('sensor.measurement_phaseC_production') not in ['unknown', 'unavailable', 'None'] }}

or

availability: "{{ 'unavailable' not in [ states('sensor.measurement_phaseA_production'), states('sensor.measurement_phaseB_production'), states('sensor.measurement_phaseC_production') ] }}"

But I am a bit unsure about how it should be written… :frowning:

for calculating the grid “import” - you could go with the solution "calculate sum of production, calculate sum of import - substract …

But you could also do it “per phase”…

But anyway - what Inverter is this?
if it is a 10 year old system - that doesn’t have to say anything I guess :slight_smile:
If you can connect to the inverter over ethernet, for example - it should be possible to collect relevant information - also, does it provide some kind of monitoring information like a Web-Portal?

I would really prefer trying to get the data directly from the inverter, rather than working around with other sensors and calculating stuff like this…
This will become hard to maintain at a certain level…

I managed to solve the sum and subtraction problem. Thank you very much for your support.

The inverteris an ABB Aurora (Inverter - Aurora / ABB / Power-One - PVI-12,5-OUTD-FS-CZ - Stringa - Secondsol)

Do you know a way to connect it to Home Assistant?

It seems that this inverter does support the SunSpec Protocol over Modbus

You could therefore try it with the Sunspec integration :slight_smile:

in addition, it seems that there is an ABB integration directly available in the CORE…

grafik

grafik

Only through the proprietary addon card VSN300 (or the VSN700). But many systems have it embedded at installation time.

The official integration only provides one sensor (total produced), that is why I decided to create the custom component, I wanted to see ALL the available info the inverter could provide.

Buy a VSN300 addon card (costs €120 more or less). Then you’ll have an embedded webserver that sends data to FIMER Aurora cloud and is accessible also locally through ModBus SunSpec, for which I made a custom component.

Ciao @alexdelprete. Thank you for your reply. I looked at your custom component and I think I will go ahead and install it.

Could you recommend where to buy the board? I see that many sellers don’t have direct-to-consumer purchasing.

Also I wanted to ask you if you have any way to share a screenshot where you can show the list of sensors/entities it can generate. (just to see if I can get all the data I need).

If I were to go ahead with the purchase I could create a step by step guide on the installation since I will have to do it. What do you think?

Check if you already have it installed first. Ask your installer just to be sure. In this post I replied to a user about a couple or resellers, the first is the one where I bought it from.

I capture ALL available info, it supports monophase and 3-phase systems. I don’t capture battery and meter info though because I don’t have them so I can’t test it. Please ask other questions in the component’s thread.