Solaredge Modbus Configuration for Single Inverter and Battery

@SgtBatten
Did you change your energy.yaml to work with this integration? If so, could you please share it?

@Remko
Can you provide details on how to add multiple inverters to the energy.yaml? I have three inverters and I am trying to figure out where to add xxx_i2 xxx_i3 into the code.

What is FEHM? What additional alternative solutions did you end up with?

FHEM is another middleware for house automation like ioBroker or in our case HassIO.

You can look at this post for my alternative:
https://community.home-assistant.io/t/updated-solaredge-modbus-full-setup-guide-with-energy-dashboard-integration-for-installations-with-battery-connected/340956/317?u=sam_81

1 Like

Hi,

So if I am understanding you correctly, the values that I am seeing here indicate I do not have a meter properly configured or configured at all?

Inverter 1 meter 1: C_SunSpec_DID 0x2bd
Inverter 1 meter 1: C_SunSpec_Length 0x99
Inverter 1 meter 2: C_SunSpec_DID 0xffff
Inverter 1 meter 2: C_SunSpec_Length 0x0
Inverter 1 meter 3: C_SunSpec_DID 0x0
Inverter 1 meter 3: C_SunSpec_Length 0x0

I am in a single inverter, no battery situation. 3800H model inverter, in the US.

Note, I have changed both RS485-1 and RS485-2 to be both in Follower or Leader state and it makes no difference.

Thanks

No, the inverter doesn’t have a meter.

You could take the cover off the inverter (shut everything down first: switch the red switch off, wait for it to shut down, turn off the DC safety switch and turn off AC power) and look inside to see if anything is wired to the RS485 ports.

SolarEdge systems do not generally ship with or come with E+I or consumption meters. The only exception I’m aware of is the revenue grade production meter pre-installed in some models. If your installer didn’t say anything about a meter and you don’t see a meter in your SolarEdge monitor app, you probably didn’t get one. I didn’t get a meter either with my install, I added it 2 months later.

I am looking for a little help on my template. I have three inverters and no batteries. I attempted to edit and use the template that b80k provided UPDATED! SolarEdge Modbus full setup guide with Energy Dashboard integration for Installations with Battery connected - #360 by b80k. But I am not 100% sure I edited it correctly. I attempted to take out the battery configs and add my third inverter. I am now getting an error. The template I modified has never worked so there could be more issues. I can somewhat guess what the code is doing but I am no coder.

Error:

Invalid config for [template]: invalid template (TemplateSyntaxError: unexpected '}', expected ')') for dictionary value @ data['sensor'][3]['state']. Got "{% if (states('sensor.solaredge_i1_dc_power') | float(0) + states('sensor.solaredge_i2_dc_power') | float(0) + states('sensor.solaredge_i3_dc_power') | float(0) <= 0) %}\n 0\n{% elif (is_state('sensor.solaredge_i1_dc_power', 'unknown') or is_state('sensor.solaredge_i2_dc_power', 'unknown') or is_state('sensor.solaredge_i3_dc_power', 'unknown')) %}\n 0\n{% else %}\n {{ (states('sensor.solaredge_i1_dc_power') | float(0) + states('sensor.solaredge_i2_dc_power') | float(0) + states('sensor.so.... (See /config/packages/energy.yaml, line 1).

Code for the template I modified.

template:
  - sensor:
    - name: "Solar Selfconsumption Ratio"
      unique_id: solar_selfconsumption_ratio
      icon: mdi:percent-outline
      state: >
        {% if ((states('sensor.solar_panel_to_house_daily') | float(0) + states('sensor.solar_exported_power_daiy') | float(0)) <= 0) %}
          0
        {% else %}
          {{ ((states('sensor.solar_panel_to_house_daily') | float(0)) / (states('sensor.solar_panel_to_house_daily') | float(0) + states('sensor.solar_exported_power_daily') | float(0)) * 100) | round (0) }}
        {% endif %}

    - name: "Solar Autarkie Ratio"
      unique_id: solar_autarkie_ratio
      icon: mdi:percent-outline
      state: >
        {% if ((states('sensor.solar_house_consumption_daily') | float(0)) <= 0) %}
          0
        {% else %}
          {{ (1 - ((states('sensor.solar_imported_power_daily') | float(0)) / (states('sensor.solar_house_consumption_daily') | float(0))) * 100) | round (0) }}
        {% endif %}  
    
    - name: "Solar Inverter Effectiveness"
      unique_id: solar_inverter_effectiveness
      icon: mdi:percent-outline
      unit_of_measurement: '%'
      state: >
        {% if ((states('sensor.solaredge_i1_dc_power') | float(0) + states('sensor.solaredge_i2_dc_power') | float(0)  + states('sensor.solaredge_i3_dc_power') | float(0)) < 100 or (states('sensor.solaredge_i1_ac_power') | float(0) + states('sensor.solaredge_i2_ac_power') | float(0) + states('sensor.solaredge_i3_ac_power') | float(0)) < 100) %}
          {{ (states('sensor.solar_inverter_effectiveness')) }}
        {% else %}
          {% if (is_state('sensor.solar_inverter_effectiveness', 'unknown')) %}
            1
          {% elif (states('sensor.solaredge_i1_ac_power') | float(0) + states('sensor.solaredge_i2_ac_power') | float(0) + states('sensor.solaredge_i3_ac_power') | float(0) <= 0) %}
            {{ (states('sensor.solar_inverter_effectiveness')) }}
          {% elif (states('sensor.solaredge_i1_dc_power') | float(0) + states('sensor.solaredge_i2_dc_power') | float(0) + states('sensor.solaredge_i3_dc_power') | float(0) <= 0) %}
            {{ (states('sensor.solar_inverter_effectiveness')) }}
          {% else %}
            {{ (states('sensor.solaredge_i1_ac_power') | float(0) + states('sensor.solaredge_i2_ac_power') | float(0) + states('sensor.solaredge_i3_ac_power') | float(0)) / (states('sensor.solaredge_i1_dc_power') | float(0) + states('sensor.solaredge_i2_dc_power') | float(0) + states('sensor.solaredge_i3_dc_power') | float(0)) }}
          {% endif %}
        {% endif %}
        

    - name: "Solar Panel Production W"
      unique_id: solar_panel_production_w
      unit_of_measurement: 'W'
      icon: mdi:solar-power
      state: >
        {% if (states('sensor.solaredge_i1_dc_power') | float(0) + states('sensor.solaredge_i2_dc_power') | float(0) + states('sensor.solaredge_i3_dc_power') | float(0) <= 0) %}
          0
        {% elif (is_state('sensor.solaredge_i1_dc_power', 'unknown') or is_state('sensor.solaredge_i2_dc_power', 'unknown') or is_state('sensor.solaredge_i3_dc_power', 'unknown')) %}
          0
        {% else %}
          {{ (states('sensor.solaredge_i1_dc_power') | float(0) + states('sensor.solaredge_i2_dc_power') | float(0) + states('sensor.solaredge_i3_dc_power') | float(0) }}
        {% endif %}      

    - name: "Solar Panel To House W"
      unique_id: solar_panel_to_house_w
      unit_of_measurement: 'W'
      icon: mdi:solar-power
      state: >
          {% if (states('sensor.solaredge_i1_dc_power') | float(0) < 0 and states('sensor.solaredge_i1_ac_power') | float(0) <= 0) %}
            {{ (states('sensor.solaredge_i1_dc_power') | float(0) + states('sensor.solaredge_i2_ac_power') | float(0) + states('sensor.solaredge_i3_ac_power') | float(0) - states('sensor.solaredge_m1_ac_power') | float(0)) }}
          {% else %}
            {{ (states('sensor.solaredge_i1_ac_power') | float(0) + states('sensor.solaredge_i2_ac_power') | float(0) + states('sensor.solaredge_i3_ac_power') | float(0) - states('sensor.solaredge_m1_ac_power') | float(0)) }}
          {% endif %}
          {{ (states('sensor.solaredge_i1_ac_power') | float(0) + states('sensor.solaredge_i2_ac_power') | float(0) + states('sensor.solaredge_i3_ac_power') | float(0)) }}
          {% if (states('sensor.solaredge_i1_dc_power') | float(0) + states('sensor.solaredge_i2_dc_power') | float(0) + states('sensor.solaredge_i3_dc_power') | float(0) < 0) %}
            0
          {% else %}
            {{ ((states('sensor.solaredge_i1_dc_power') | float(0) + states('sensor.solaredge_i2_dc_power') | float(0) + states('sensor.solaredge_i3_dc_power') | float(0) ) * states('sensor.solar_inverter_effectiveness') | float(0)) }}
          {% endif %}   
            0
          {% endif %}
 
    - name: "Solar Grid To House W"
      unique_id: solar_grid_to_house_w
      unit_of_measurement: 'W'
      icon: mdi:transmission-tower-export
      state: >
        {% if (states('sensor.solaredge_m1_ac_power') | float(0) <= 0) %}
          {{ (states('sensor.solaredge_m1_ac_power') | float(0) *-1) }}
        {% else %}
          0
        {% endif %}

    - name: "Solar Panel To Grid W"
      unique_id: solar_panel_to_grid_w
      unit_of_measurement: 'W'
      icon: mdi:solar-power
      state: >
        {% if (states('sensor.solaredge_m1_ac_power') | float(0) > 0) %}
          {{ (states('sensor.solaredge_m1_ac_power') | float(0)) }}
        {% else %}
          0
        {% endif %}

    - name: "Solar House Consumption W"
      unique_id: solar_house_consumption_w
      unit_of_measurement: 'W'
      icon: mdi:home
      state: >
        {{ (states('sensor.solar_panel_to_house_w') | float(0) + states('sensor.solar_battery_to_house_w') | float(0) + states('sensor.solar_grid_to_house_w') | float(0)) }}  

    - name: "Solar Imported Power W"
      unique_id: solar_imported_power_w
      unit_of_measurement: 'W'
      icon: mdi:transmission-tower-export
      state: >
        {% if (states('sensor.solaredge_m1_ac_power') | float(0) <= 0) %}
          {{ (states('sensor.solaredge_m1_ac_power') | float(0) *-1) }}
        {% else %}
          0
        {% endif %}       

    - name: "Solar Exported Power W"
      unique_id: solar_exported_power_w
      unit_of_measurement: 'W'
      icon: mdi:transmission-tower-import
      state: >
        {% if (states('sensor.solaredge_m1_ac_power') | float(0) > 0) %}
          {{ (states('sensor.solaredge_m1_ac_power') | float(0)) }}
        {% else %}
          0
        {% endif %}        

    - name: "Solar Lifetime Production"
      unique_id: solar_lifetime_production
      unit_of_measurement: 'MWh'
      icon: mdi:solar-power
      state: >
        {{ ((states('sensor.solaredge_ac_energy_kwh') | float(0) / 1000) | round (2)) }}
                 
sensor:
  - platform: integration
    source: sensor.solar_panel_production_w
    method: left
    unit_prefix: k
    name: solar_panel_production_kwh 
  - platform: integration
    source: sensor.solar_battery_to_house_w
    method: left
    unit_prefix: k
    name: solar_battery_out_kwh
  - platform: integration
    source: sensor.solar_house_consumption_w
    method: left
    unit_prefix: k
    name: solar_house_consumption_kwh 
  - platform: integration
    source: sensor.solar_imported_power_w
    method: left
    unit_prefix: k
    name: solar_imported_power_kwh 
  - platform: integration
    source: sensor.solar_exported_power_w
    method: left
    unit_prefix: k
    name: solar_exported_power_kwh 
  - platform: integration
    source: sensor.solar_panel_to_house_w
    method: left
    unit_prefix: k
    name: solar_panel_to_house_kwh

  - platform: statistics
    name: "Solar Inverter Effectiveness Average"
    unique_id: solar_inverter_effectiveness_average
    state_characteristic: mean
    sampling_size: 1200
    max_age:
      hours: 24
    entity_id: sensor.solar_inverter_effectiveness

    
utility_meter:
  solar_panel_production_daily:
    source: sensor.solar_panel_production_kwh
    name: Solar Panel Production Daily
    cycle: daily
  solar_house_consumption_daily:
    source: sensor.solar_house_consumption_kwh
    name: Solar House Consumption Daily
    cycle: daily 
  solar_imported_power_daily:
    source: sensor.solar_imported_power_kwh
    name: Solar Imported Power Daily
    cycle: daily 
  solar_imported_power_daily_solaredge:
    source: sensor.solaredge_m1_imported_kwh
    name: Solar Imported Power Daily Solar Edge
    cycle: daily 
  solar_exported_power_daily:
    source: sensor.solar_exported_power_kwh
    name: Solar Exported Power Daily
    cycle: daily
  solar_panel_to_house_daily:
    source: sensor.solar_panel_to_house_kwh
    name: Solar Panel To House Daily
    cycle: daily
  solar_panel_to_house_weekly:
    source: sensor.solar_panel_to_house_kwh
    name: Solar Panel To House Weekly
    cycle: weekly
  solar_imported_power_weekly:
    source: sensor.solar_imported_power_kwh
    name: Solar Imported Power Weekly
    cycle: weekly 
  solar_house_consumption_weekly:
    source: sensor.solar_house_consumption_kwh
    name: Solar House Consumption Weekly
    cycle: weekly 
  solar_panel_production_weekly:
    source: sensor.solar_panel_production_kwh
    name: Solar Panel Production Weekly
    cycle: weekly
  solar_exported_power_weekly:
    source: sensor.solar_exported_power_kwh
    name: Solar Exported Power Weekly
    cycle: weekly
  solar_panel_to_house_monthly:
    source: sensor.solar_panel_to_house_kwh
    name: Solar Panel To House Monthly
    cycle: monthly
  solar_imported_power_monthly:
    source: sensor.solar_imported_power_kwh
    name: Solar Imported Power Monthly
    cycle: monthly 
  solar_house_consumption_monthly:
    source: sensor.solar_house_consumption_kwh
    name: Solar House Consumption Monthly
    cycle: monthly 
  solar_panel_production_monthly:
    source: sensor.solar_panel_production_kwh
    name: Solar Panel Production Monthly
    cycle: monthly
  solar_exported_power_monthly:
    source: sensor.solar_exported_power_kwh
    name: Solar Exported Power Monthly
    cycle: monthly 
  solar_panel_to_house_yearly:
    source: sensor.solar_panel_to_house_kwh
    name: Solar Panel To House Yearly
    cycle: yearly
  solar_imported_power_yearly:
    source: sensor.solar_imported_power_kwh
    name: Solar Imported Power Yearly
    cycle: yearly 
  solar_house_consumption_yearly:
    source: sensor.solar_house_consumption_kwh
    name: Solar House Consumption Yearly
    cycle: yearly 
  solar_panel_production_yearly:
    source: sensor.solar_panel_production_kwh
    name: Solar Panel Production Yearly
    cycle: yearly
  solar_exported_power_yearly:
    source: sensor.solar_exported_power_kwh
    name: Solar Exported Power Yearly
    cycle: yearly

Any help would be greatly appreciated.

I have tried to modify my “energy.yaml” to match the setup with 3 inverters and no battery. I am not sure if it is all correct, since I cannot test this, but here you go. You will have to use the integration I use as well (linked in the first post) and I am assuming you have one Import/Export meter in your setup as well (not 3 or so). Also the configuration for the Lovelace cards would need to be modified of course, since you have no “grid to battery”, “battery to house” or “panel to battery” of course.

I hope this works for you.

template:
  - sensor:
      - name: "Solar Selfconsumption Ratio"
        unique_id: solar_selfconsumption_ratio
        icon: mdi:percent-outline
        state: >
          {% set panel_to_house_daily = states('sensor.solar_panel_to_house_daily') | float(0) %}
          {% set exported_power_daiy = states('sensor.solar_exported_power_daiy') | float(0) %}

          {% if (panel_to_house_daily  + exported_power_daiy <= 0) %}
            0
          {% else %}
            {{ ((panel_to_house_daily ) / (panel_to_house_daily + exported_power_daiy) * 100) | round (1) }}
          {% endif %}

      - name: "Solar Autarkie Ratio"
        unique_id: solar_autarkie_ratio
        icon: mdi:percent-outline
        state: >
          {% set house_consumption_daily = states('sensor.solar_house_consumption_daily') | float(0) %}
          {% set imported_power_daily = states('sensor.solar_imported_power_daily') | float(0) %}

          {% if (house_consumption_daily <= 0) %}
            0
          {% else %}
            {{ (1 - (imported_power_daily / house_consumption_daily) * 100) | round (1) }}
          {% endif %}

      - name: "Solar Inverter Effectiveness"
        unique_id: solar_inverter_effectiveness
        icon: mdi:percent-outline
        unit_of_measurement: "%"
        state: >
          {% set i1_dc_power = states('sensor.solaredge_i1_dc_power') | float(0) %}
          {% set i2_dc_power = states('sensor.solaredge_i2_dc_power') | float(0) %}
          {% set i3_dc_power = states('sensor.solaredge_i3_dc_power') | float(0) %}
          {% set i1_ac_power = states('sensor.solaredge_i1_ac_power') | float(0) %}
          {% set i2_ac_power = states('sensor.solaredge_i2_ac_power') | float(0) %}
          {% set i3_ac_power = states('sensor.solaredge_i3_ac_power') | float(0) %}
          {% set m1_ac_power = states('sensor.solaredge_m1_ac_power') | float(0) %}
          {% set inverter_effectiveness = states('sensor.solar_inverter_effectiveness') %}

          {% if (is_state('sensor.solar_inverter_effectiveness', 'unknown')) %}
            1
          {% elif ((i1_dc_power + i2_dc_power + i3_dc_power) < 100) or ((i1_ac_power + i2_ac_power + i3_ac_power)  < 100) %}
            {{ inverter_effectiveness }}
          {% else %}
            {{ (i1_ac_power + i2_ac_power + i3_ac_power) / (i1_dc_power + i2_dc_power + i3_dc_power) }}
          {% endif %}
        availability: >
          {{ states('sensor.solaredge_i1_dc_power') | is_number and states('sensor.solaredge_i2_dc_power') | is_number and states('sensor.solaredge_i3_dc_power') | is_number and states('sensor.solaredge_i1_ac_power') | is_number and states('sensor.solaredge_i2_ac_power') | is_number and states('sensor.solaredge_i3_ac_power') | is_number }}        

      - name: "Solar Panel Production W"
        unique_id: solar_panel_production_w
        unit_of_measurement: "W"
        icon: mdi:solar-power
        state: >
          {% set i1_dc_power = states('sensor.solaredge_i1_dc_power') | float(0) %}
          {% set i2_dc_power = states('sensor.solaredge_i2_dc_power') | float(0) %}
          {% set i3_dc_power = states('sensor.solaredge_i3_dc_power') | float(0) %}

          {% if (is_state('sensor.solaredge_i1_dc_power', 'unknown')) or (is_state('sensor.solaredge_i2_dc_power', 'unknown')) or (is_state('sensor.solaredge_i3_dc_power', 'unknown'))  %}
            0
          {% elif ((i1_dc_power + i2_dc_power + i3_dc_power)  <= 0) %}
            0
          {% else %}
            {{ (i1_dc_power + i2_dc_power + i3_dc_power) }}
          {% endif %}
        availability: >
          {{ states('sensor.solaredge_i1_dc_power') | is_number and states('sensor.solaredge_i2_dc_power') | is_number and states('sensor.solaredge_i3_dc_power') | is_number}}

      - name: "Solar Panel To House W"
        unique_id: solar_panel_to_house_w
        unit_of_measurement: "W"
        icon: mdi:solar-power
        state: >
          {% set i1_dc_power = states('sensor.solaredge_i1_dc_power') | float(0) %}
          {% set i2_dc_power = states('sensor.solaredge_i2_dc_power') | float(0) %}
          {% set i3_dc_power = states('sensor.solaredge_i3_dc_power') | float(0) %}
          {% set i1_ac_power = states('sensor.solaredge_i1_ac_power') | float(0) %}
          {% set i2_ac_power = states('sensor.solaredge_i2_ac_power') | float(0) %}
          {% set i3_ac_power = states('sensor.solaredge_i3_ac_power') | float(0) %}
          {% set m1_ac_power = states('sensor.solaredge_m1_ac_power') | float(0) %}
          {% set inverter_effectiveness = states('sensor.solar_inverter_effectiveness') | float(0) %}

          {% if ( m1_ac_power > 0) %}
            {% if ((i1_dc_power + i2_dc_power + i3_dc_power) < 0 and (i1_ac_power + i2_ac_power + i3_ac_power) <= 0) %}
              {{ ((i1_dc_power + i2_dc_power + i3_dc_power)  - m1_ac_power) }}
            {% else %}
              {{ ((i1_ac_power + i2_ac_power + i3_ac_power) - m1_ac_power) }}
            {% endif %}
          {% elif (m1_ac_power <= 0) %}
            {% if ((i1_dc_power + i2_dc_power + i3_dc_power) < 0 and (i1_ac_power + i2_ac_power + i3_ac_power) <= 0) %}
              {{ (i1_dc_power + i2_dc_power + i3_dc_power) }}
            {% else %}
              {{ (i1_ac_power + i2_ac_power + i3_ac_power) }}
            {% endif %}
          {% else %}
            0
          {% endif %}
        availability: >
          {{ states('sensor.solaredge_i1_dc_power') | is_number and states('sensor.solaredge_i2_dc_power') | is_number and states('sensor.solaredge_i3_dc_power') | is_number and states('sensor.solaredge_i1_ac_power') | is_number and states('sensor.solaredge_i2_ac_power') | is_number and states('sensor.solaredge_i3_ac_power') | is_number and states('sensor.solaredge_m1_ac_power') | is_number }}
        
      - name: "Solar Panel To Grid W"
        unique_id: solar_panel_to_grid_w
        unit_of_measurement: "W"
        icon: mdi:solar-power
        state: >
          {% set panel_production_w = states('sensor.solar_panel_production_w') | float(0) %}
          {% set exported_power_w = states('sensor.solar_exported_power_w') | float(0) %}

          {% if (exported_power_w > 0 and panel_production_w > 0) %}
            {% if (exported_power_w > panel_production_w) %}
              {{ panel_production_w }}
            {% else %}
              {{ exported_power_w }}
            {% endif %}
          {% else %}
            0
          {% endif %}

      - name: "Solar Grid To House W"
        unique_id: solar_grid_to_house_w
        unit_of_measurement: "W"
        icon: mdi:transmission-tower-export
        state: >
          {% set m1_ac_power = states('sensor.solaredge_m1_ac_power') | float(0) %}

          {% if (m1_ac_power <= 0) %}
            {{ (m1_ac_power * -1) }}
          {% else %}
            0
          {% endif %}
        availability: >
          {{ states('sensor.solaredge_m1_ac_power') | is_number }}

      - name: "Solar House Consumption W"
        unique_id: solar_house_consumption_w
        unit_of_measurement: "W"
        icon: mdi:home
        state: >
          {% set panel_to_house_w = states('sensor.solar_panel_to_house_w') | float(0) %}
          {% set grid_to_house_w = states('sensor.solar_grid_to_house_w') | float(0) %}

          {{ (panel_to_house_w  + grid_to_house_w) }}

      - name: "Solar Imported Power W"
        unique_id: solar_imported_power_w
        unit_of_measurement: "W"
        icon: mdi:transmission-tower-export
        state: >
          {% set m1_ac_power = states('sensor.solaredge_m1_ac_power') | float(0) %}

          {% if (m1_ac_power < 0) %}
            {{ (m1_ac_power * -1) }}
          {% else %}
            0
          {% endif %}
        availability: >
          {{ states('sensor.solaredge_m1_ac_power') | is_number}}

      - name: "Solar Exported Power W"
        unique_id: solar_exported_power_w
        unit_of_measurement: "W"
        icon: mdi:transmission-tower-import
        state: >
          {% set m1_ac_power = states('sensor.solaredge_m1_ac_power') | float(0) %}

          {% if (m1_ac_power > 0) %}
            {{ (m1_ac_power) }}
          {% else %}
            0
          {% endif %}
        availability: >
          {{ states('sensor.solaredge_m1_ac_power') | is_number }}
          
      - name: "Solar Lifetime Production"
        unique_id: solar_lifetime_production
        unit_of_measurement: "MWh"
        icon: mdi:solar-power
        state: >
          {% set ac_energy_i1_kwh = states('sensor.solaredge_i1_ac_energy_kwh') | float(0) %}
          {% set ac_energy_i2_kwh = states('sensor.solaredge_i2_ac_energy_kwh') | float(0) %}
          {% set ac_energy_i3_kwh = states('sensor.solaredge_i3_ac_energy_kwh') | float(0) %}

          {{ (((ac_energy_i1_kwh + ac_energy_i2_kwh + ac_energy_i3_kwh) / 1000) | round (2)) }}
        availability: >
          {{ states('sensor.solaredge_i1_ac_energy_kwh') | is_number }}

      - name: "Solar Accounting Cost Rate"
        unique_id: solar_accounting_cost_rate
        icon: mdi:cash-plus
        unit_of_measurement: "€/kWh"
        state: >
          0.305

      - name: "Solar Accounting Compensation Rate"
        unique_id: solar_accounting_compensation_rate
        icon: mdi:cash-minus
        unit_of_measurement: "€/kWh"
        state: >
          0.0864

      - name: "Solar Accounting Total Daily"
        unique_id: solar_accounting_total_daily
        icon: mdi:currency-eur
        unit_of_measurement: "€"
        state: >
          {% set cost = (states('sensor.solar_imported_power_daily') | float(0)) * (states('sensor.solar_accounting_cost_rate') | float(0)) %}
          {% set compensation = (states('sensor.solar_exported_power_daily') | float(0)) * (states('sensor.solar_accounting_compensation_rate') | float(0)) %}
          {{ (cost - compensation) | round(2) }}

      - name: "Solar Accounting Total Weekly"
        unique_id: solar_accounting_total_weekly
        icon: mdi:currency-eur
        unit_of_measurement: "€"
        state: >
          {% set cost = (states('sensor.solar_imported_power_weekly') | float(0)) * (states('sensor.solar_accounting_cost_rate') | float(0)) %}
          {% set compensation = (states('sensor.solar_exported_power_weekly') | float(0)) * (states('sensor.solar_accounting_compensation_rate') | float(0)) %}
          {{ (cost - compensation) | round(2) }}

      - name: "Solar Accounting Total Monthly"
        unique_id: solar_accounting_total_monthly
        icon: mdi:currency-eur
        unit_of_measurement: "€"
        state: >
          {% set cost = (states('sensor.solar_imported_power_monthly') | float(0)) * (states('sensor.solar_accounting_cost_rate') | float(0)) %}
          {% set compensation = (states('sensor.solar_exported_power_monthly') | float(0)) * (states('sensor.solar_accounting_compensation_rate') | float(0)) %}
          {{ (cost - compensation) | round(2) }}

      - name: "Solar Accounting Total Yearly"
        unique_id: solar_accounting_total_yearly
        icon: mdi:currency-eur
        unit_of_measurement: "€"
        state: >
          {% set cost = (states('sensor.solar_imported_power_yearly') | float(0)) * (states('sensor.solar_accounting_cost_rate') | float(0)) %}
          {% set compensation = (states('sensor.solar_exported_power_yearly') | float(0)) * (states('sensor.solar_accounting_compensation_rate') | float(0)) %}
          {{ (cost - compensation - 40) | round(2) }}

      - name: "Solar Inverter Effectiveness Int"
        unique_id: solar_inverter_effectiveness_int
        icon: mdi:percent-outline
        unit_of_measurement: "%"
        state: >
          {{ ((states('sensor.solar_inverter_effectiveness') | float(0)) * 100) | round(2) }}

      - name: "Solar Inverter Effectiveness Average Int"
        unique_id: solar_inverter_effectiveness_average_int
        icon: mdi:percent-outline
        unit_of_measurement: "%"
        state: >
          {{ ((states('sensor.solar_inverter_effectiveness_average') | float(0)) * 100) | round(2) }}


sensor:
  - platform: integration
    source: sensor.solar_panel_production_w
    method: left
    unit_prefix: k
    name: solar_panel_production_kwh
  - platform: integration
    source: sensor.solar_house_consumption_w
    method: left
    unit_prefix: k
    name: solar_house_consumption_kwh
  - platform: integration
    source: sensor.solar_imported_power_w
    method: left
    unit_prefix: k
    name: solar_imported_power_kwh
  - platform: integration
    source: sensor.solar_exported_power_w
    method: left
    unit_prefix: k
    name: solar_exported_power_kwh
  - platform: integration
    source: sensor.solar_panel_to_house_w
    method: left
    unit_prefix: k
    name: solar_panel_to_house_kwh

  - platform: statistics
    name: "Solar Inverter Effectiveness Average"
    unique_id: solar_inverter_effectiveness_average
    state_characteristic: mean
    sampling_size: 1200
    max_age:
      hours: 24
    entity_id: sensor.solar_inverter_effectiveness

utility_meter:
  solar_panel_production_daily:
    source: sensor.solar_panel_production_kwh
    name: Solar Panel Production Daily
    cycle: daily
  solar_house_consumption_daily:
    source: sensor.solar_house_consumption_kwh
    name: Solar House Consumption Daily
    cycle: daily
  solar_imported_power_daily:
    source: sensor.solar_imported_power_kwh
    name: Solar Imported Power Daily
    cycle: daily
  solar_imported_power_daily_solaredge:
    source: sensor.solaredge_m1_imported_kwh
    name: Solar Imported Power Daily Solar Edge
    cycle: daily
  solar_exported_power_daily:
    source: sensor.solar_exported_power_kwh
    name: Solar Exported Power Daily
    cycle: daily
  solar_panel_to_house_daily:
    source: sensor.solar_panel_to_house_kwh
    name: Solar Panel To House Daily
    cycle: daily

  solar_panel_to_house_weekly:
    source: sensor.solar_panel_to_house_kwh
    name: Solar Panel To House Weekly
    cycle: weekly
  solar_imported_power_weekly:
    source: sensor.solar_imported_power_kwh
    name: Solar Imported Power Weekly
    cycle: weekly
  solar_house_consumption_weekly:
    source: sensor.solar_house_consumption_kwh
    name: Solar House Consumption Weekly
    cycle: weekly
  solar_panel_production_weekly:
    source: sensor.solar_panel_production_kwh
    name: Solar Panel Production Weekly
    cycle: weekly
  solar_exported_power_weekly:
    source: sensor.solar_exported_power_kwh
    name: Solar Exported Power Weekly
    cycle: weekly

  solar_panel_to_house_monthly:
    source: sensor.solar_panel_to_house_kwh
    name: Solar Panel To House Monthly
    cycle: monthly
  solar_imported_power_monthly:
    source: sensor.solar_imported_power_kwh
    name: Solar Imported Power Monthly
    cycle: monthly
  solar_house_consumption_monthly:
    source: sensor.solar_house_consumption_kwh
    name: Solar House Consumption Monthly
    cycle: monthly
  solar_panel_production_monthly:
    source: sensor.solar_panel_production_kwh
    name: Solar Panel Production Monthly
    cycle: monthly
  solar_exported_power_monthly:
    source: sensor.solar_exported_power_kwh
    name: Solar Exported Power Monthly
    cycle: monthly

  solar_panel_to_house_yearly:
    source: sensor.solar_panel_to_house_kwh
    name: Solar Panel To House Yearly
    cycle: yearly
  solar_imported_power_yearly:
    source: sensor.solar_imported_power_kwh
    name: Solar Imported Power Yearly
    cycle: yearly
  solar_house_consumption_yearly:
    source: sensor.solar_house_consumption_kwh
    name: Solar House Consumption Yearly
    cycle: yearly
  solar_panel_production_yearly:
    source: sensor.solar_panel_production_kwh
    name: Solar Panel Production Yearly
    cycle: yearly
  solar_exported_power_yearly:
    source: sensor.solar_exported_power_kwh
    name: Solar Exported Power Yearly
    cycle: yearly
    
recorder:
  include:
    entities:
      - sensor.solaredge_m1_exported_kwh
      - sensor.solaredge_m1_imported_kwh
      - sensor.solaredge_m1_imported_kwh_cost
      - sensor.solaredge_m1_exported_kwh_compensation
      - sensor.solaredge_b1_state_of_energy
      - sensor.solar_inverter_effectiveness
      - sensor.solar_inverter_effectiveness_average
      - sensor.solar_accounting_total_yearly
      
      - sensor.solar_panel_production_daily
      - sensor.solar_house_consumption_daily
      - sensor.solar_imported_power_daily
      - sensor.solar_exported_power_daily
      - sensor.solar_inverter_effectiveness
      - sensor.solar_panel_to_house_daily

      - sensor.solar_panel_to_house_weekly
      - sensor.solar_imported_power_weekly      
      - sensor.solar_exported_power_weekly
      - sensor.solar_house_consumption_weekly
      - sensor.solar_panel_production_weekly
      - sensor.solar_exported_power_weekly
      
      - sensor.solar_panel_to_house_monthly
      - sensor.solar_imported_power_monthly      
      - sensor.solar_exported_power_monthly
      - sensor.solar_house_consumption_monthly
      - sensor.solar_panel_production_monthly
      - sensor.solar_exported_power_monthly

      - sensor.solar_panel_to_house_yearly
      - sensor.solar_imported_power_yearly      
      - sensor.solar_exported_power_yearly
      - sensor.solar_house_consumption_yearly
      - sensor.solar_panel_production_yearly
      - sensor.solar_exported_power_yearly

Remko, thank you! I really appreciate your help. There is only one issue I have, sensor.solar_exported_power_w and sensor.solar_panel_to_grid_w I am getting a value of zero. This value never changes from zero so I assume it’s in the calculations, and due to the removal of the battery sensors. I did find on line 387 (in notepad++) there is a reference to sensor.solaredge_b1_state_of_energy. Should that be something different? See the screen cap of what I am seeing. Sorry the forum only lets me post one picture since I am a new user.

I’ll look at it tomorrow and see if I can find an error.

1 Like

I have a 7600H with both the Production and E/I meter - the dropdown in the selection box is actually Production +E/I meter and the data on the solaredge cloud monitoring site looks reasonable. I’m just starting to try to figure out why my data into HA isn’t making sense, but I also see similar text as above in my debug log.

Inverter 1 meter 1: C_SunSpec_Length 0x41
Inverter 1 meter 1: C_Manufacturer SolarEdge
Inverter 1 meter 1: C_Model SE-RGMTR-1D-240C-B
Inverter 1 meter 1: C_Option Production
Inverter 1 meter 1: C_Version 1077
Inverter 1 meter 1: C_SerialNumber 606794426
Inverter 1 meter 1: C_Device_address 0x1
Found meter 1 on inverter ID 1
Inverter 1 meter 2: C_SunSpec_DID 0x2bd
Inverter 1 meter 2: C_SunSpec_Length 0x99
Inverter 1 meter 3: C_SunSpec_DID 0xffff
Inverter 1 meter 3: C_SunSpec_Length 0x0```

Edit:  Re-reading the above posts again, I now better understand, that the issue showing that bcink's setup didn't have a meter was that the DID value wasn't 0x1 and Length of 0x41 instead of having an Inverter 1 meter 1 type of format.  Sorry for the extra spam.

The built in RG meter uses CT 1 and 2 for line, and the CT 3 input internally for production. It’s still physically a single meter so it only reports as one meter, just doing the job of two meters in software.

I would assume that A and B associated sensors are for line (consumption or E+I) and C associated sensors would be production. If the meter identifies as single or split phase then the C associated sensors are disabled by default so you’ll need to select them and enable the entity in HA.

Thank you for replying to my very poorly written post, and thank you for all of your work on this. By connecting to the inverter access point, I can confirm what you are describing as shown under meter status. Line 1 and 2 for the meter show 120v each and associated watts (for export at this time). The third line is labeled as inverter production, 241v. (US Split phase). The solar production is being received in home assistant as the Solaredge M1 AC Power sensor, but after enabling all the entities, nothing is reflecting the E/I portion. Any suggestions if this is an inverter set-up communication issue or other troubleshooting suggestions? Thanks again.

Post all of the debug lines for Inverter 1 meter 1

Thanks - I skipped some of the inverter 1 lines (not referencing meter 1), let me know if there’s something else I should look for.

2022-10-22 12:46:32.991 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 2: C_SunSpec_DID 0x2bd
2022-10-22 12:46:32.992 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 2: C_SunSpec_Length 0x99
2022-10-22 12:46:33.031 DEBUG (SyncWorker_4) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 3: C_SunSpec_DID 0xffff
2022-10-22 12:46:33.032 DEBUG (SyncWorker_4) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 3: C_SunSpec_Length 0x0
2022-10-22 12:46:33.761 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: C_SunSpec_DID 0xcb
2022-10-22 12:46:33.763 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: C_SunSpec_Length 0x69
2022-10-22 12:46:33.814 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: C_SunSpec_DID 0xcb
2022-10-22 12:46:33.814 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Current 0xea
2022-10-22 12:46:33.814 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Current_A 0x0
2022-10-22 12:46:33.814 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Current_B 0x0
2022-10-22 12:46:33.814 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Current_C 0xea
2022-10-22 12:46:33.814 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Current_SF -0x1
2022-10-22 12:46:33.814 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Voltage_LN 0x0
2022-10-22 12:46:33.814 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Voltage_AN 0x0
2022-10-22 12:46:33.814 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Voltage_BN 0x0
2022-10-22 12:46:33.814 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Voltage_CN 0x5e5f
2022-10-22 12:46:33.814 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Voltage_LL 0x0
2022-10-22 12:46:33.815 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Voltage_AB 0x0
2022-10-22 12:46:33.815 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Voltage_BC 0x0
2022-10-22 12:46:33.815 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Voltage_CA 0x0
2022-10-22 12:46:33.815 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Voltage_SF -0x2
2022-10-22 12:46:33.815 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Frequency 0x176d
2022-10-22 12:46:33.815 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Frequency_SF -0x2
2022-10-22 12:46:33.815 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Power 0x1629
2022-10-22 12:46:33.815 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Power_A 0x0
2022-10-22 12:46:33.815 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Power_B 0x0
2022-10-22 12:46:33.815 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Power_C 0x1629
2022-10-22 12:46:33.815 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Power_SF 0x0
2022-10-22 12:46:33.815 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_VA 0x1629
2022-10-22 12:46:33.815 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_VA_A 0x0
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_VA_B 0x0
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_VA_C 0x1629
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_VA_SF 0x0
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_var -0x2d
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_var_A 0x0
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_var_B 0x0
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_var_C -0x2d
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_var_SF 0x0
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_PF 0x2706
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_PF_A 0x0
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_PF_B 0x0
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_PF_C 0x2706
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_PF_SF -0x2
2022-10-22 12:46:33.816 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Energy_WH_Exported 0x4419e7
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Energy_WH_Exported_A 0x0
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Energy_WH_Exported_B 0x0
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Energy_WH_Exported_C 0x4419e7
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Energy_WH_Imported 0x2730
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Energy_WH_Imported_A 0x0
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Energy_WH_Imported_B 0x0
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Energy_WH_Imported_C 0x2730
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: AC_Energy_WH_SF 0x0
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_VAh_Exported 0x0
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_VAh_Exported_A 0x0
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_VAh_Exported_B 0x0
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_VAh_Exported_C 0x0
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_VAh_Imported 0x0
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_VAh_Imported_A 0x0
2022-10-22 12:46:33.817 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_VAh_Imported_B 0x0
2022-10-22 12:46:33.818 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_VAh_Imported_C 0x0
2022-10-22 12:46:33.818 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_VAh_SF -0x8000
2022-10-22 12:46:33.818 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Import_Q1 0x0
2022-10-22 12:46:33.818 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Import_Q1_A 0x0
2022-10-22 12:46:33.819 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Import_Q1_B 0x0
2022-10-22 12:46:33.819 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Import_Q1_C 0x0
2022-10-22 12:46:33.819 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Import_Q2 0x0
2022-10-22 12:46:33.819 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Import_Q2_A 0x0
2022-10-22 12:46:33.819 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Import_Q2_B 0x0
2022-10-22 12:46:33.819 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Import_Q2_C 0x0
2022-10-22 12:46:33.819 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Export_Q3 0x0
2022-10-22 12:46:33.819 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Export_Q3_A 0x0
2022-10-22 12:46:33.819 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Export_Q3_B 0x0
2022-10-22 12:46:33.819 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Export_Q3_C 0x0
2022-10-22 12:46:33.819 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Export_Q4 0x0
2022-10-22 12:46:33.820 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Export_Q4_A 0x0
2022-10-22 12:46:33.820 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Export_Q4_B 0x0
2022-10-22 12:46:33.820 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_Export_Q4_C 0x0
2022-10-22 12:46:33.820 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_varh_SF -0x8000
2022-10-22 12:46:33.820 DEBUG (SyncWorker_9) [custom_components.solaredge_modbus_multi.hub] Inverter 1 meter 1: M_Events 0x0

So yeah the bad news is that it’s only reporting the production values on phase C (which is correct for how they are hooked up), while the A and B values are all zero. My guess is because it’s a “combo” device they picked one of the sets of values to report over modbus, and it happens to be the production values. The modbus specs only mention three types: Export + Import, Production, and Consumption. So based on this each “meter” reported over modbus is a single type vs. internally where its treated as a double duty device.

You could try contacting SolarEdge support to ask them if there’s a setting in the inverter they can push from their side change the Meter 1 modbus reported values to be associated to E+I values instead of production, but that’s not something I’ve ever tried personally to know what they would say if it’s possible or not.

Thanks for checking. I’ll reach out to SolarEdge and see if I can get a response. The setup from the access point has a different option (Inverter Production +E/I) than what I’ve seen other people noting for their setups, so maybe this is a “newer” setup not yet documented in the modbus specs. I’ll post back if I get any solutions.

Hi Remko,

Great stuff as usual! I’ve moved over to this implementation a couple weeks back, and looking good so far.

With my Battery set up, I’m getting increased situations where my house consumption figures aren’t matching what’s being either pushed from solar, supplied by the battery or imported from the grid. Narrowing it down, it appears to be related to the battery calculation in the house consumption sensor, as a result of a bad (zero) value of the Battery Effectiveness. Sometimes get a Battery effectiveness value of “unavailable”, which then means my “battery to house w” output is zero (thanks to a multiply by zero).

The symptons are that when compared against the solarEdge monitoring website, the house consumption is just too low…

I must admit, I’m a little light on knowledge about the battery and inverter effectiveness but can I suggest a change to the battery effectiveness template set up to help handle sensors that aren’t quite ready.

name: "Solar Battery Effectiveness"
        unique_id: solar_battery_effectiveness
        icon: mdi:percent-outline
        unit_of_measurement: "%"
        state: >
          {% set i1_dc_power = states('sensor.solaredge_i1_dc_power') | float(0) %}
          {% set b1_dc_power = states('sensor.solaredge_b1_dc_power') | float(0) %}
          {% set battery_effectiveness = states('sensor.solar_battery_effectiveness') %}

          {% if (is_state('sensor.solar_battery_effectiveness', 'unknown') or (solar_battery_effectiveness == 0)) %}
            1
          {% elif (i1_dc_power + b1_dc_power <= 0) %}
            {% if (b1_dc_power >= 0 or i1_dc_power <= 0) %}
              {{ battery_effectiveness }}
            {% else %}
              {{ (1 - ((b1_dc_power * -1 - (i1_dc_power)) / b1_dc_power * -1)) }}
            {% endif %} 
          {% else %}
            {{ battery_effectiveness }}
          {% endif %}
        availability: >
          {{ states('sensor.solaredge_i1_dc_power') | is_number and states('sensor.solaredge_i1_ac_power') | is_number and states('sensor.solaredge_b1_dc_power') | is_number }}

Should perhaps read

      - name: "Solar Battery Effectiveness"
        unique_id: solar_battery_effectiveness
        icon: mdi:percent-outline
        unit_of_measurement: "%"
        state: >
          {% set i1_dc_power = states('sensor.solaredge_i1_dc_power') | float(0) %}
          {% set b1_dc_power = states('sensor.solaredge_b1_dc_power') | float(0) %}
          {% set battery_effectiveness = states('sensor.solar_battery_effectiveness') %}

          {% if (is_state('sensor.solar_battery_effectiveness', 'unknown') or (solar_battery_effectiveness == 0) or (is_state('sensor.solar_battery_effectiveness', 'unavailable'))) %}
            1
          {% elif (i1_dc_power + b1_dc_power <= 0) %}
            {% if (b1_dc_power >= 0 or i1_dc_power <= 0) %}
              {{ battery_effectiveness }}
            {% else %}
              {{ (1 - ((b1_dc_power * -1 - (i1_dc_power)) / b1_dc_power * -1)) }}
            {% endif %} 
          {% else %}
            {{ battery_effectiveness }}
          {% endif %}

With this, we at least get a 1 for our battery effectiveness initially instead of “unavailable”, and onwards from there, if I’ve understood the logic of self referencing previous values, it should work.

As a note, I’ve also modified the wider configuration a little more to accept time of day tariff values, as with my battery and autumn/winter looming, I’m charging the battery during off peak time from my energy provider (managed to talk my way into an EV car tariff without an EV car), and wanted a way in HA to monitor what my spend “would have been” without PV and a battery (based purely on house consumption), vs. what my spend is now (imported elec only, topping up the solar/battery combination). I’ve done this to help me track savings as a result of buying PV & Battery earlier this year.

I’ve also had to do this as the solarEdge monitoring doesn’t present the right information after a charge, I read in the preivous post something about SolarEdge not knowing where the power came from, so go minimal on the information about what solar was generated for that day; they will show zero, until your house consumes as much electric as you charged the battery.

If anyone is interested in the setup/configuration, I’d be happy to spend a bit of time one evening pulling together the automation/config to help inspire someone else.

2 Likes

It seems like this integration cannot be used with the standard energy dashboard in Home Assistant (entities like current solar power production seem to not be configured to be included there), or am I missing something? I wanted to try that first before following your tutorial on setting up this alternate energy dashboard.

It should work fine, check for things that need fixing on the developer tools>statistics page.

I see no errors there.
It’s just that sensor.solaredge_m1_ac_power (current grid consumption) and sensor.solaredge_i1_ac_power (current solar production) cannot be selected as source entities when configuring the standard dashboard. Only the entity for total energy produced is selectable.