Manual

See start of configuration: here

Remarks:

  • In bridge configuration you should change topic to following: topic # both 2 ha_gbb/ <plantID>/ha_gbb/
  • You should write yourself how commands from/to GbbOptimizer are translated to commands to/from Inverter.
  • You should use HA Automation to process operation to inverter as describe bellow

Downloads

Data reading in mqtt by GbbOptimizer:

Program is waiting for data in mqtt in topic: <plantId>/ha_gbb/sensor.

In Payload should be send json data with following information:

  • "soc_perc" (or "V" if 'Use Voltage (V) instead of SOC (Deye)' checked)
  • "loads_total_kWh" 
  • "fromgrid_total_kWh"
  • "togrid_total_kWh"
  • "pv_total_kWh"

Following information are optional:

  • "ev_charge_total_kWh"
  • "hp_total_kWh"
  • "other1_total_kWh"
  • "other2_total_kWh"

Remarks:

  • Total counters can be reseted from time to time, so it could be for example "daily counters". 
  • Values<0 is treated as null: no data, wait for data
  • Only optional data (one or more) can be sent if the inverter operation data is sent via a different route.

 

Example of mqtt publish configuration:

alias: mqtt_publikacja
trigger:
  - platform: time_pattern
    seconds: /60
action:
  - service: mqtt.publish
    data:
      qos: "0"
      retain: false
      payload_template: |2-
                {
                  "loads_total_kWh": {{ states.sensor.easun_out_total_daily_energy.state | float(-1)  }},
                  "fromgrid_total_kWh": {{ states.sensor.easun_in_total_daily_energy.state | float(-1)  }},
                  "pv_total_kWh": {{ states.sensor.total_daily_energy_offgrid.state | float(-1) }},
                  "soc_perc": {{ states.sensor.easun_battery_soc.state | float(-1) }},
                  "togrid_total_kWh": 0,
                }
      topic: ha_gbb/sensor

Commands reiceived from GbbOptimizer:

Program sends following topics:

  • <plantid>/ha_gbb/Start_Charge - start charge up to SOC specify in payload (see below) from PV and grid. When SOC level is riched: stop charge from grid, stop discharge battery, can charge from PV
  • <plantid>/ha_gbb/Start_Discharge - start discharge from battery to grid
  • <plantid>/ha_gbb/Start_DisableCharge - stop discharge battery, send PV to loads and grid
  • <plantid>/ha_gbb/Start_Normal - return to normal operation (PV to loads than to battery than to grid, Loads from PV than from battery than from grid)

In parallel program send the same information to one topic:

  • <plantid>/ha_gbb/EMS

As payload program sends JSON data with following properties: {"Hour":22, "FromMinute":0, "ToMinute":59, "PriceLessZero":0, "Operation":"Normal", "SOC":90}

  • Hour 
  • FromMinute
  • ToMinute
  • ChargeLimitW
  • InputLimitW
  • PriceLessZero: 0 - normal purchase price, 1- price<0
  • Operation: "Normal", "Discharge", "DisableCharge", "Charge"
  • SOC: SOC level to charge to
  • V: SOC converted to V (if 'Use Voltage (V) instead of SOC (Deye)' checked)

Example of mqtt trigger:

alias: mqtt output_source_priority_battery
description: ""
trigger:
  - platform: mqtt
    topic: ha_gbb/Start_Charge
condition: []
action:
  - service: switch.turn_on
    target:
      entity_id: switch.bms_1_output_source_priority_battery
    data: {}
mode: single