Solaredge Modbus Configuration for Single Inverter and Battery

Thank you.

Please could you show the next bit - what comes after

entity_id: number.solaredge_i1_storage_discharge_limit

ie what are the variables?

Also some of the entities in my pre-installed YAMLs are of the form d17eca2b9c67371873384b590b0b17f1
rather than number.solaredge_i1_storage_discharge_limit

How are these translated?

That looks more like a device_id than an entity_id

number.solaredge_i1_storage_discharge_limit is an entity_id.

Hereā€™s the complete automation. Bear in mind that Iā€™ve created some input_boolean and some input_number helpers as well as a timer to limit the overall charge period to 4 hours at any single charge window . Iā€™ve also created an option to cope with the daily inverter reset that can happen during a charge window.

alias: Rolec EV Chargepoint schedule
description: Multiple Slots for Agile
trigger:
  - platform: state
    entity_id:
      - >-
        binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
    from: "off"
    to: "on"
    id: "On"
    enabled: true
  - platform: state
    entity_id:
      - >-
        binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
    from: "on"
    to: "off"
    id: "Off"
    enabled: true
  - platform: state
    entity_id:
      - switch.shelly1_c45bbe7867c7
    from: unavailable
    id: Rolec Available
  - alias: Rolec 4 Hour charge completed
    platform: event
    event_type: timer.finished
    event_data:
      entity_id: timer.rolec_4_hour_charge_period
    id: Stop Charge
  - platform: time
    at: "20:59:00"
    id: Activate Charge Session
  - alias: When inverter resets
    platform: state
    entity_id:
      - switch.solaredge_i1_advanced_power_control
    from: unavailable
    to: "on"
    id: Inverter Reset
    for:
      hours: 0
      minutes: 1
      seconds: 0
  - platform: numeric_state
    entity_id:
      - sensor.shellyem_244cab4194b1_channel_2_power
    below: 20
    id: Charge Complete
  - platform: state
    entity_id:
      - binary_sensor.morning
    to: "on"
    id: Reset Timer
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Activate Charge Session
        sequence:
          - condition: state
            entity_id: input_boolean.rolec_battery_master
            state: "off"
          - condition: state
            entity_id: input_boolean.car_plugged_in
            state: "on"
          - data: {}
            target:
              entity_id: input_boolean.rolec_battery_master
            action: input_boolean.turn_on
      - conditions:
          - condition: trigger
            id:
              - "On"
          - condition: state
            entity_id: input_boolean.rolec_battery_master
            state: "on"
          - condition: state
            entity_id: input_boolean.car_plugged_in
            state: "on"
        sequence:
          - data: {}
            target:
              entity_id: switch.shelly1_c45bbe7867c7
            action: switch.turn_on
          - delay:
              hours: 0
              minutes: 0
              seconds: 30
              milliseconds: 0
          - data:
              value: >-
                {{
                states('input_number.desired_battery_output_limit_for_overnight_ev_charging')
                | float(0) }}
            target:
              entity_id: number.solaredge_i1_storage_discharge_limit
            action: number.set_value
          - data: {}
            target:
              entity_id: timer.rolec_4_hour_charge_period
            action: timer.start
      - conditions:
          - condition: trigger
            id:
              - "Off"
        sequence:
          - data: {}
            target:
              entity_id: switch.shelly1_c45bbe7867c7
            action: switch.turn_off
          - delay:
              hours: 0
              minutes: 0
              seconds: 30
              milliseconds: 0
          - data:
              value: >-
                {{ states('input_number.default_battery_output_limit') |
                float(0) }}
            target:
              entity_id: number.solaredge_i1_storage_discharge_limit
            action: number.set_value
          - data: {}
            target:
              entity_id: timer.rolec_4_hour_charge_period
            action: timer.pause
      - conditions:
          - condition: trigger
            id: Rolec Available
          - condition: state
            entity_id: >-
              binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
            state: "on"
          - condition: state
            entity_id: switch.shelly1_c45bbe7867c7
            state: "off"
          - condition: state
            entity_id: input_boolean.rolec_battery_master
            state: "on"
          - condition: state
            entity_id: input_boolean.car_plugged_in
            state: "on"
        sequence:
          - data: {}
            target:
              entity_id: switch.shelly1_c45bbe7867c7
            action: switch.turn_on
          - data:
              message: >-
                The Rolec was turned on because it became available during a
                charge period.
              title: ROLEC ON
            action: script.text_notify_dave
          - delay:
              hours: 0
              minutes: 0
              seconds: 30
              milliseconds: 0
          - data:
              value: >-
                {{
                states('input_number.desired_battery_output_limit_for_overnight_ev_charging')
                | float(0) }}
            target:
              entity_id: number.solaredge_i1_storage_discharge_limit
            action: number.set_value
      - conditions:
          - condition: trigger
            id: Rolec Available
          - condition: state
            entity_id: >-
              binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
            state: "off"
          - condition: state
            entity_id: switch.shelly1_c45bbe7867c7
            state: "on"
        sequence:
          - data: {}
            target:
              entity_id: switch.shelly1_c45bbe7867c7
            action: switch.turn_off
          - data:
              message: >-
                The Rolec was turned off because it was on outside of a charge
                period.
              title: ROLEC OFF
            action: script.text_notify_dave
      - conditions:
          - condition: trigger
            id:
              - Stop Charge
              - Charge Complete
        sequence:
          - data: {}
            target:
              entity_id: switch.shelly1_c45bbe7867c7
            action: switch.turn_off
          - delay:
              hours: 0
              minutes: 0
              seconds: 30
              milliseconds: 0
          - data:
              value: >-
                {{ states('input_number.default_battery_output_limit') |
                float(0) }}
            target:
              entity_id: number.solaredge_i1_storage_discharge_limit
            action: number.set_value
          - action: script.car_plugged_in
            data: {}
      - conditions:
          - condition: trigger
            id:
              - Inverter Reset
          - condition: numeric_state
            entity_id: number.solaredge_i1_storage_discharge_limit
            above: 100
          - condition: state
            entity_id: switch.shelly1_c45bbe7867c7
            state: "on"
          - condition: state
            entity_id: timer.rolec_4_hour_charge_period
            state: active
          - condition: state
            entity_id: input_boolean.car_plugged_in
            state: "on"
        sequence:
          - data:
              value: >-
                {{
                states('input_number.desired_battery_output_limit_for_overnight_ev_charging')
                | float(0) }}
            target:
              entity_id: number.solaredge_i1_storage_discharge_limit
            action: number.set_value
      - conditions:
          - condition: trigger
            id:
              - Reset Timer
        sequence:
          - wait_for_trigger:
              - platform: state
                entity_id:
                  - switch.shelly1_c45bbe7867c7
                from: "on"
                to: "off"
                for:
                  hours: 0
                  minutes: 1
                  seconds: 0
            timeout:
              hours: 1
              minutes: 0
              seconds: 0
              milliseconds: 0
          - target:
              entity_id: timer.rolec_4_hour_charge_period
            data: {}
            action: timer.cancel
mode: single

i am loving all these integrations so easy to get going

I have an automation working for mine where it tweaks the active power limit based on export cost, current home consumption and battery level

ONe issue i have is on the tesla style power dashboard my sensors for batteryā€™s from the template build are not doing anything

battery_to_house_entity: sensor.solar_battery_to_house_w
grid_to_battery_entity: sensor.solar_grid_to_battery_w
battery_extra_entity: sensor.solaredge_battery1_state_of_charge

the data is all but 0 watts. I.e sensor.solar_battery_to_house_w is 0 now even tho i can see in the solar app its pushing 0.5 kw to my house

Has anybody had their TCP connection suddenly refused? I had all working nicely and now Iā€™m getting an error saying TCP connection refused. Perhaps solar edge disabled it remotely?

Iā€™ve not seen that in 2 years of using this custom component.

Have you set a fixed IP address for your inverter?

Perhaps the IP address has changed?

Thanks. Yes itā€™s fixed on unfi. And hardwired.

So I called solar edge. And it turns out TCP was disabled on the inverter so it was enabled by solar edge and I had the integration working nicely. Not sure what has disabled it but itā€™s working again now after they re-enabled it.

Is there a full list anywhere of the SolarEdge commands done from HA with their syntax, arguments etc?

Yes, itā€™s all in the documentation for the custom component.

Hi,

I am new to SolarEdge and I have a few basic questions to things that I canā€™t explain!

my devices:
SE10K-RWB48BFN4
Firmware: 0004.0021.0023

SolarEdge Home Battery 9.2kWh
Firmware: 48V DCDC 3.4.2

SE-RGMTR-1D-240C-A

Questions:

  • I would like to modify the battery reserve from 10% to 15%, moved the slider to 15% and confirmed by pressing the ā€œcommit power savingā€ button. But it seams that nothing changes. The ā€œBackup-Reserveā€ in the SolarEdge App is still on 10%, the HA-Screenshot shows the correct value. Can someone tell me, what is going wrong? Did I miss anything?

  • How can I temporarily charge the battery from grid? I am totally unsure how to make the changes in the inverter section. What is needed here?

hello I followed your instructions. I installed solaredge-modbus-multi, which also could find the inverter and the meter however not the batterie. I have a se6000HE with a high voltage batterie from lg. That is the first question how can i fix that?
Further I installed Remko76/hasolarcfg and edited Configuration.yaml accordingly. My dashbord however does not look like yours. Did I forget something?

hello the battery topic has been solved by reading the help

does anyone happen to have this working in node red and willing to export it for me to start with? I am wanting to use all the feautres here to manage my own power: Power Control Options ā€ Configuration Ā· WillCodeForCats/solaredge-modbus-multi Wiki Ā· GitHub
I have mod bus multi installed and working.

thank you

ok i got very far today with a bit of chatgpt help and will happily share my export when its working

anyone know why i battery controls are greyed out? I have advanced power controls on:


thank you

Edit: I didnā€™t read the docs properly. Itā€™s only enabled in remote those grayed out options.

I would like to modify the battery reserve from 10% to 15%, moved the slider to 15% and confirmed by pressing the ā€œcommit power savingā€ button. But it seams that nothing changes. The ā€œBackup-Reserveā€ in the SolarEdge App is still on 10%, the HA-Screenshot shows the correct value. Can someone tell me, what is going wrong? Did I miss anything?

This is not possible. At least not without a bunch of complicated Automations that make sure, the battery isnā€™t discharged further until a specific SoC value. I created a ā€œWinter Modeā€ for my battery, that makes sure it doesnā€™t get discharged less than 40% SoC when activated (so the battery doesnā€™t stay at 10% for a long time in winter) - but itā€™s rather complicated and still not perfect.

How can I temporarily charge the battery from grid? I am totally unsure how to make the changes in the inverter section. What is needed here?

This is easy. Just set the ā€œStorage Command Modeā€ (and if you want to preserve it longer than the set timeout also the ā€œStorage Default Modeā€) to ā€œCharge from Solar Power & Gridā€. The Storage Control Mode has to be on ā€œRemote Controlā€ to be able to do that.

Then the battery gets charged with whatever comes from the solar panels PLUS the set charge limit from the grid (Standard is 5000 W). If you do this at night, the power of course solely comes from the grid.

Hope this helps.

Hi @Remko,

I used the solaredge cloud inverter for about 2 years, but since extending with a Battery the reporting interval was to high - so ich switched over to the ā€œoldā€ modbus integration. But I struggeld a bit to get the solar power right, with pure luck i stumbled upon your (first older) post and tried to understand your calculations - which helped with the whole charting alogā€¦ after that problem solved i thought to myself screw it - lets update to the newer modbus integration variant. and i used your github scripts as example, took what i need, modified entity names as needed and voilaā€¦ all is running the way it should run.

Thank you for making your config and explanations public.

Rufinus

I have serious problems activating the Modbus/TCP integration for solaredge in HA, all sensor status are unknown. I have a SE5000H inverter with a LG Resu battery and use two RS485 comms which run on device id 2 and 3. If I set the TCP modbus port to 502 and ID to 1 in HA nothing happens. In the solaredge manual it says that the devices are preset with ID=2 and the manual states further that it must be set at 2. IN this forum I read that the ID needs to be set to 1. I did change this in the settings of the inverter and then get an 3x6E comm counter error, so this cannot be the solution. I started with home assistant approx 3 weeks ago and almost every integration causes some problems. Is this normal?

There is no requirement to set the inverter ID to 1.

Start here: Configuration Ā· WillCodeForCats/solaredge-modbus-multi Wiki Ā· GitHub

Hi everyone! Iā€™ve got it up and running. Iā€™m searching for a way to stop my battery from temorarely discharging when Iā€™m plugging in my car without a smart charger.
Can this be done with the Storage Command Modes?

Couple of ways to do it:

  1. Set the Storage Command Mode to any mode that effectively turns off the battery
  2. Set the battery discharge level to 0 Watts

I use Option 2.

2 Likes