What is GbbOptimizer#

GbbOptimizer (formerly GbbVictronWeb) is a program that optimizes energy use in a home photovoltaic installation with an energy storage system (battery). It analyzes PV production forecasts, energy consumption profiles, and purchase and sale prices to automatically control the inverter — deciding when to charge the battery, when to discharge it, and when to buy or sell energy from/to the grid.

How it works#

The program runs in the cloud and communicates with the inverter over the internet. It performs calculations every hour and sends commands to the inverter.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
┌─────────────────────────────────────────────────────────────────┐
│                       GbbOptimizer (cloud)                      │
│                                                                 │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────────────┐   │
│  │ PV Forecast  │  │  Consumption │  │  Purchase and sale   │   │
│  │ (Solcast,    │  │  profile     │  │  prices              │   │
│  │ forecast.    │  │  (home)      │  │  (tariffs, exchange) │   │
│  │  solar)      │  │              │  │                      │   │
│  └──────┬───────┘  └──────┬───────┘  └──────────┬───────────┘   │
│         │                 │                     │               │
│         └─────────────────┼─────────────────────┘               │
│                           │                                     │
│                    ┌──────▼───────┐                             │
│                    │  Optimizer   │                             │
│                    │  (Battery    │                             │
│                    │   Forecast)  │                             │
│                    └──────┬───────┘                             │
│                           │                                     │
│              Charge / discharge schedule                        │
│              + inverter operating mode                          │
└───────────────────────────┬─────────────────────────────────────┘
                    ┌───────▼────────┐
                    │   Connection   │
                    │  (VRM, MQTT,   │
                    │  Solarman,     │
                    │  GbbConnect2)  │
                    └───────┬────────┘
                    ┌───────▼────────┐
                    │    Hybrid      │
                    │   inverter     │
                    │  + battery     │
                    └────────────────┘

Each installation has a unique PlantId and PlantToken, which are used to identify and authorize communication.

Four operating modes#

The optimizer switches the inverter between four modes depending on the current price situation and battery state:

ModeDescription
NormalStandard inverter operation — battery charges from PV, home powered from PV and battery. PV surpluses can be exported to the grid
ChargeCharging the battery from the grid. Used when the purchase price is low (e.g. night tariff, negative exchange prices)
DischargeForced battery discharge to the grid. Used when the sale price is high and it is profitable to sell energy
DisableChargeBlock charging from PV. Used to leave room in the battery for later cheap grid charging

Configuration details for charging can be found in the Charging module, and for discharging in the Discharge module.

Price-based optimizer#

By default, the “Price-based optimizer” is selected. It analyzes purchase and sale prices for the coming hours and plans:

  • When to charge — looks for hours with the lowest purchase price
  • When to discharge — looks for hours with the highest sale price
  • How much to charge — takes into account the PV forecast (to avoid grid-charging what PV will produce anyway) and the battery’s MaxSOC
  • How much to discharge — takes into account the home consumption forecast and the battery’s MinSOC

The entire plan is visualized in the Battery Forecast module.

Key parameters#

  • SOC — current battery charge level
  • MinSOC — minimum battery level (protection)
  • MaxSOC — maximum charge level (recommended 90%)
  • GridSetpoint — target grid exchange power
  • RTE — round-trip efficiency of the charge/discharge cycle
  • Correction Factor — coefficient correcting the PV forecast (auto-calibrates over ~one week)

Supported inverters#

GbbOptimizer supports the following hybrid inverters:

InverterConnection methods
VictronVRM Portal (native), Home Assistant
DeyeDeyeCloud, Solarman, Home Assistant, GbbConnect2, DongleDirect
GoodWeSolarman, Home Assistant, GbbConnect2
AforeSolarman, GbbConnect2
HinenSolarman, GbbConnect2
SofarSolarDongleDirect, GbbConnect2

Victron is the longest-supported inverter with the most complete integration. Other inverters have full support for charge/discharge modes, but some advanced options may differ.

Configuration details for individual inverters can be found in the Installation section.

What’s next?#