klatremis / esphome-for-deye

Esphome component for Deye 3 phase inverters for Home Assistant
113 stars 30 forks source link

Set the Deye at its lowest possible self-consumption #31

Open Breinholm-coder opened 4 months ago

Breinholm-coder commented 4 months ago

Hej Klatremis, I have 2 parallel 12 kW Deye hybrid inverters - like yours. I want to reduce their power usage to the absolute minimum during night-time. They have a rather high idling power level (around 160W) and that's too high and ineffective compared to my house load of about 350 W. I have therefore invested in a microinverter that I crank up when our power usage is low and the sun-production has ended for the day. I can see there is a Modbus 80 register that could be a software ON/OFF switch for the Deyes - Have you tried to address that register? If using 80 is not feasible can you then suggest alternatives to reduce the Deye power level? Thanks / Peter

pvprodk commented 4 months ago

You can play around with theese modbus registers. Setting the Battery Control Mode to "No Battery" reduces the idle consumption to ~15W But the inverter goes into error-state for around 15 mins when going to "No Battery", but I guess that doesn't matter if its at night. You could make automations to trigger "No Battery" and back to "SoC Mode"

switch:
  - platform: modbus_controller
    use_write_multiple: true
    modbus_controller_id: ${modbus_controller_id}
    name: "Deye Battery - Lithium Mode"
    id: lithium_mode
    register_type: holding
    address: 98
    bitmask: 1
    icon: "mdi:toggle-switch"
    on_turn_on: 
      lambda: |-
        auto call = id(batt_control).make_call();
        call.set_option("SoC mode");
        call.perform() ;

select:
  - platform: modbus_controller
    use_write_multiple: true
    modbus_controller_id: ${modbus_controller_id}
    name: "Deye Battery Control Mode"
    id: batt_control
    address: 111
    value_type: U_WORD
    optionsmap:
      "Voltage Mode": 0
      "SoC mode": 1
      "No Battery": 2
    optimistic: true
    disabled_by_default: false
    on_value:
      then:
        - if:
            condition:
              lambda: |-
                return id(batt_control).state == "Voltage Mode";
            then:
               - switch.turn_on: lithium_mode
switschel commented 4 months ago

Are you sure you need to set the 98 register? I'm just switching 111 register only every day from "No Battery" to "SoC mode" and vice versa and it is working very fine.

switschel commented 4 months ago

I also tried the 80 register to turn off the inverter. Unfortunately you don't get any data anymore via modbus if you do that. So I switched over using the "no battery" option which is working fine.

You can check my adapted config here: https://github.com/switschel/esphome-for-deye/blob/main/esphome%20extended%20config.yaml

pvprodk commented 4 months ago

Are you sure you need to set the 98 register? I'm just switching 111 register only every day from "No Battery" to "SoC mode" and vice versa and it is working very fine.

Thats also what I am doing, but the cude in register 111 addresses the code in 98, so I have not dared to remove it ;)

kababoom commented 4 months ago

Using the same, working good.

  - platform: modbus_controller
    use_write_multiple: true
    modbus_controller_id: ${modbus_controller_id}
    name: "sun3p-Battery mode"
    id: sun3p_battery_mode
    address: 111
    value_type: U_WORD
    optionsmap:
      "BattV mode": 0
      "No Battery": 2
Breinholm-coder commented 4 months ago

Thanks guys - I will try the 111 register. Have you all also added a microinverter, connected to your batteries, for low-power supply? It works flawlessly (When I depress the blue button manually though) and reduces the power drainage by about 250 W.