<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>GbbOptimizer — Manual</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/</link><description>Recent content on GbbOptimizer — Manual</description><generator>Hugo</generator><language>en</language><atom:link href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/index.xml" rel="self" type="application/rss+xml"/><item><title>Battery Forecast</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/battery-forecast/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/battery-forecast/</guid><description>&lt;h1 id="battery-forecast"&gt;Battery Forecast&lt;a class="anchor" href="#battery-forecast"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The central module of GbbOptimizer. It analyzes &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#soc" class="glossary-term" title="State of Charge — battery level as a percentage (0–100%)"&gt;SOC&lt;/a&gt; of the battery for the next 24 hours (or more) based on PV charging, grid charging, discharging, and home consumption. It includes an optimizer that automatically selects charging and discharging parameters.&lt;/p&gt;
&lt;p&gt;In this module you can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Analyze the battery SOC forecast for the next 24 hours&lt;/li&gt;
&lt;li&gt;See when SOC exceeds minimum or maximum values&lt;/li&gt;
&lt;li&gt;Optimize charging and discharging plans&lt;/li&gt;
&lt;li&gt;View purchase and sale prices and profits&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="forecast-table-columns"&gt;Forecast Table Columns&lt;a class="anchor" href="#forecast-table-columns"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The table shows data for the next 24 hours. Abbreviations: &lt;strong&gt;DC&lt;/strong&gt; = direct current, &lt;strong&gt;AC&lt;/strong&gt; = alternating current.&lt;/p&gt;</description></item><item><title>C# IoT Procedures</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/advanced/csharp-procedures/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/advanced/csharp-procedures/</guid><description>&lt;h1 id="c-iot-procedures"&gt;C# IoT Procedures&lt;a class="anchor" href="#c-iot-procedures"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;GbbOptimizer allows you to create custom procedures in C# that control IoT devices based on forecasts, energy prices, and consumption history.&lt;/p&gt;
&lt;blockquote class='book-hint warning'&gt;
&lt;p&gt;A procedure must run in &lt;strong&gt;no more than 100 ms&lt;/strong&gt; and must not interfere with the program&amp;rsquo;s operation. Otherwise it will be suspended.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="the-app-object"&gt;The App Object&lt;a class="anchor" href="#the-app-object"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Each IoT procedure receives an &lt;code&gt;App&lt;/code&gt; object as a parameter. The available properties are listed below.&lt;/p&gt;
&lt;h3 id="main-properties"&gt;Main Properties&lt;a class="anchor" href="#main-properties"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Property&lt;/th&gt;
 &lt;th&gt;Type&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;App.CurrDate&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;DateTime?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Date for which the device should be turned on/off&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;App.CurrHour&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Hour (12:30 = 12.5; 12:45 = 12.75)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;App.CurrForecastIndex&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;int?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Index in &lt;code&gt;App.Forecast&lt;/code&gt; for the current date and hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;App.StringVariables&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;Dictionary&amp;lt;string, string?&amp;gt;&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;User string variables (persistent between calls)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;App.DecimalVariables&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;Dictionary&amp;lt;string, decimal?&amp;gt;&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;User numeric variables (persistent between calls)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="forecast"&gt;Forecast&lt;a class="anchor" href="#forecast"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Property&lt;/th&gt;
 &lt;th&gt;Type&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;App.Forecast&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;IForecast[]&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Battery forecast array. &lt;code&gt;[0]&lt;/code&gt; = current hour, &lt;code&gt;[1]&lt;/code&gt; = next hour, etc.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Date&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;DateTime&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Forecast date&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.DateNo&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;0 = today, 1 = tomorrow, etc.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Hour&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Forecast hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.HourNo&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Hour counted from the start of the forecast (&lt;code&gt;[0].HourNo == 0&lt;/code&gt; always)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.StartBattery_kWhAC&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;kWh in battery (AC) at the start of the hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.StartBattery_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;kWh in battery (DC) at the start of the hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Prod_KWhAC&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Production (PV + wind) in the given hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Loads_kWhAC&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Consumption in the given hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.GridCharge_kWhAC&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;kWh from grid to battery (grid side)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.GridCharge_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;kWh from grid to battery (battery side)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Discharge_kWhAC&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;kWh from battery to grid (grid side)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Discharge_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;kWh from battery to grid (battery side)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.EndBattery_kWhAC&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;kWh in battery (AC) at the end of the hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.EndBattery_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;kWh in battery (DC) at the end of the hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Meteo_SOC&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;null = no weather warnings; value = target SOC for the warning&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Temperature_C&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Temperature (°C) in the given hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.ExtraLoads_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Total extra loads&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.FromGrid_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;kWh from grid&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.PurchasePrice&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Purchase price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.PurchaseAmount&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Purchase amount&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.ToGrid_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;kWh to grid&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.SalePrice&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Sale price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.SaleAmount&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Sale amount&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="prices"&gt;Prices&lt;a class="anchor" href="#prices"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Property&lt;/th&gt;
 &lt;th&gt;Type&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;App.Prices&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;Dictionary&amp;lt;(DateTime, decimal), IPrice&amp;gt;&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Prices for yesterday, today, and tomorrow&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Day&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;DateTime&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Price date&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Hour&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Price hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.PurchasePrice&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Purchase price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.SalesPrice&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Sale price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Imported_PurchasePrice&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Purchase price imported from price source&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Imported_SalesPrice&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Sale price imported from price source&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="history"&gt;History&lt;a class="anchor" href="#history"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Property&lt;/th&gt;
 &lt;th&gt;Type&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;App.History&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;IHistory[]&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Historical data. &lt;code&gt;[0]&lt;/code&gt; = hour before current, &lt;code&gt;[1]&lt;/code&gt; = two hours before, etc.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Date&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;DateTime&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Date&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Hour&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.FromGrid_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;kWh from grid&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.PurchasePrice&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Purchase price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.PurchaseAmount&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Purchase amount&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.ToGrid_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;kWh to grid&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.SalePrice&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Sale price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.SaleAmount&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Sale amount&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Loads_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Consumption (kWh)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.LoadsPrice&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Consumption energy price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.LoadsAmount&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Consumption energy amount&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.PV_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;PV production (kWh)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.SOC_Start&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;SOC at the start of the hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.SOC_End&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;SOC at the end of the hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.ExtraLoads_Price&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Extra loads price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.ExtraLoads_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;decimal?&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Total extra loads (kWh)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="iot-devices"&gt;IoT Devices&lt;a class="anchor" href="#iot-devices"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Property&lt;/th&gt;
 &lt;th&gt;Type&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;App.IoTDevices&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;Dictionary&amp;lt;string, IIoTDevice&amp;gt;&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;List of IoT devices&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.Name&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Device name&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;.IsOn&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Current switch state&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="special-functions"&gt;Special Functions&lt;a class="anchor" href="#special-functions"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Function&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;void App.ToLog(string message)&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Display a message in the Log menu&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;bool App.IsInLowerPrices(DateTime CurrDate, decimal CurrHour, int LowerHours, bool Purchase)&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Is the given hour among the lowest-price hours of the day?&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;bool App.IsInHigherPrices(DateTime CurrDate, decimal CurrHour, int HigherHours, bool Purchase)&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Is the given hour among the highest-price hours of the day?&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="available-libraries"&gt;Available Libraries&lt;a class="anchor" href="#available-libraries"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mscorlib.dll&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;system.runtime.dll&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;System.Text.RegularExpressions.dll&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;system.linq.dll&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;System.Collections.dll&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example"&gt;Example&lt;a class="anchor" href="#example"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;div style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;"&gt;&lt;tr&gt;&lt;td style="vertical-align:top;padding:0;margin:0;border:0;"&gt;
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;1
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;2
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;3
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;4
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%"&gt;
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;public&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;bool&lt;/span&gt; IoTDevice_0036_IsOn(IApp App)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; App.IsInLowerPrices(App.CurrDate, App.CurrHour, &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;false&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; || App.Forecast[App.CurrForecastIndex].FromGrid_kWh &amp;gt; &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This example turns the device on when:&lt;/p&gt;</description></item><item><title>Deye</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mode-mappings/deye/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mode-mappings/deye/</guid><description>&lt;h1 id="mode-mapping--deye"&gt;Mode Mapping — Deye&lt;a class="anchor" href="#mode-mapping--deye"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;span class="badge" style="background-color: #9b59b6; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75em; font-weight: 600; text-transform: uppercase; vertical-align: middle;"&gt;deye-only&lt;/span&gt;

&lt;p&gt;How GbbOptimizer modes translate to Deye inverter settings depending on the connection method.&lt;/p&gt;
&lt;h2 id="solarman--deyecloud-new-connection-method"&gt;Solarman / DeyeCloud (new connection method)&lt;a class="anchor" href="#solarman--deyecloud-new-connection-method"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;span class="badge" style="background-color: #27ae60; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75em; font-weight: 600; text-transform: uppercase; vertical-align: middle;"&gt;recommended&lt;/span&gt;

&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Operation&lt;/th&gt;
 &lt;th&gt;Work Mode&lt;/th&gt;
 &lt;th&gt;GridCharge (TimeOfUse)&lt;/th&gt;
 &lt;th&gt;Time (TimeOfUse)&lt;/th&gt;
 &lt;th&gt;SOC (TimeOfUse)&lt;/th&gt;
 &lt;th&gt;Power (TimeOfUse)&lt;/th&gt;
 &lt;th&gt;Charge A&lt;/th&gt;
 &lt;th&gt;MaxSellPower&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Normal&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;5%*&lt;/td&gt;
 &lt;td&gt;Max Battery Discharge, if absent: Max Inverter Discharge&lt;/td&gt;
 &lt;td&gt;no change&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Charge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;SOC%&lt;/td&gt;
 &lt;td&gt;ChargeLimitW, if absent: Max Battery Charge, if absent: Max Inverter Charge&lt;/td&gt;
 &lt;td&gt;ChargeLimitW, if absent: Max Battery Charge, if absent: Max Inverter Charge&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Discharge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;SellingFirst (on completion: restore previous value)&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;SOC%&lt;/td&gt;
 &lt;td&gt;Max Battery Discharge, if absent: Max Inverter Discharge&lt;/td&gt;
 &lt;td&gt;no change; KeepSOC: 0W&lt;/td&gt;
 &lt;td&gt;Max GridSetpoint / Discharge (W); if discharge must be slower the program calculates a value; on completion: restore previous value&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;DisableCharge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;5%*&lt;/td&gt;
 &lt;td&gt;Max GridSetpoint / Discharge (W)&lt;/td&gt;
 &lt;td&gt;changed to 0 (on completion: restore previous value)&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;* 5% can be changed with the &lt;strong&gt;&amp;ldquo;Default MinSOC after discharge&amp;rdquo;&lt;/strong&gt; parameter in discharge plan settings.&lt;/p&gt;</description></item><item><title>Glossary</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/</guid><description>&lt;h1 id="glossary"&gt;Glossary&lt;a class="anchor" href="#glossary"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;div class="glossary-list"&gt;&lt;div class="glossary-entry" id="batteryfulldate"&gt;
 &lt;h3&gt;Battery Full Date&lt;/h3&gt;
 &lt;p&gt;Specific days of the month when the optimizer aims to charge the battery to 100% SOC. Provided as comma-separated values (e.g., &amp;#39;1, 15&amp;#39;). Enables periodic full charge cycles for battery health.&lt;/p&gt;
 &lt;/div&gt;&lt;div class="glossary-entry" id="correctionfactor"&gt;
 &lt;h3&gt;Correction Factor&lt;/h3&gt;
 &lt;p&gt;A multiplier calculated over approximately one week of operation that corrects PV forecast values to match actual production, improving prediction accuracy.&lt;/p&gt;
 &lt;/div&gt;&lt;div class="glossary-entry" id="dongledirect"&gt;
 &lt;h3&gt;DongleDirect&lt;/h3&gt;
 &lt;p&gt;A connection method where the inverter&amp;#39;s WiFi dongle is reconfigured to communicate directly with the GbbOptimizer server instead of the manufacturer&amp;#39;s cloud.&lt;/p&gt;</description></item><item><title>Installation parameters</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/installation-parameters/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/installation-parameters/</guid><description>&lt;h1 id="installation-parameters"&gt;Installation parameters&lt;a class="anchor" href="#installation-parameters"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Below are all the configuration parameters for an installation in GbbOptimizer, grouped by topic.&lt;/p&gt;
&lt;h2 id="type"&gt;Type&lt;a class="anchor" href="#type"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Parameter&lt;/th&gt;
 &lt;th&gt;Unit&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Type&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;Type of connection to the inverter (Victron, Solarman, GbbConnect2, DongleDirect, SolarAssistant)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Time slots per day&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;Number of time slots per day. In Poland, 60 slots apply for individual customers&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="installation"&gt;Installation&lt;a class="anchor" href="#installation"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Parameter&lt;/th&gt;
 &lt;th&gt;Unit&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Name&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;Unique installation name within the account&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Time zone&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;Time zone of the installation location&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Maximum grid import power&lt;/td&gt;
 &lt;td&gt;kW&lt;/td&gt;
 &lt;td&gt;Grid connection parameter — maximum power drawn from the grid&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Maximum grid export power&lt;/td&gt;
 &lt;td&gt;kW&lt;/td&gt;
 &lt;td&gt;Grid connection parameter — maximum power fed into the grid&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;What % of PV is connected on the DC side?&lt;/td&gt;
 &lt;td&gt;%&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;0%&lt;/code&gt; — all PV connected to AC. &lt;code&gt;100%&lt;/code&gt; — all PV connected to DC&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Latitude/Longitude&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;Geographic location of the installation. Used by the Meteo and PV Forecast modules&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="price-sources"&gt;Price sources&lt;a class="anchor" href="#price-sources"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Parameter&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Purchase: Tariff for purchase prices&lt;/td&gt;
 &lt;td&gt;Source of imported energy purchase prices&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Transmission: Tariff for transmission prices&lt;/td&gt;
 &lt;td&gt;Source of transmission (transport) prices. Empty = 0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Sale: Tariff for sale prices&lt;/td&gt;
 &lt;td&gt;Source of imported energy sale prices&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Details of price formulas — in the &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/prices/"&gt;Prices&lt;/a&gt; module.&lt;/p&gt;</description></item><item><title>Mosquitto Bridge</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/home-assistant/mosquitto-bridge/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/home-assistant/mosquitto-bridge/</guid><description>&lt;h1 id="mosquitto-bridge"&gt;Mosquitto Bridge&lt;a class="anchor" href="#mosquitto-bridge"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;For GbbOptimizer to communicate with Home Assistant, you need to configure a bridge between the local Mosquitto broker in HA and the GbbOptimizer MQTT server.&lt;/p&gt;
&lt;h2 id="requirements"&gt;Requirements&lt;a class="anchor" href="#requirements"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Home Assistant with the &lt;strong&gt;Mosquitto broker&lt;/strong&gt; add-on installed&lt;/li&gt;
&lt;li&gt;An active installation in GbbOptimizer with an assigned &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#plantid" class="glossary-term" title="Unique identifier for a PV installation"&gt;PlantId&lt;/a&gt; and &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#planttoken" class="glossary-term" title="Authentication token for MQTT and API"&gt;PlantToken&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;MQTT server address — see &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mqtt-servers/"&gt;MQTT Servers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="step-by-step-configuration"&gt;Step-by-Step Configuration&lt;a class="anchor" href="#step-by-step-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="1-enable-the-configuration-folder-in-mosquitto"&gt;1. Enable the configuration folder in Mosquitto&lt;a class="anchor" href="#1-enable-the-configuration-folder-in-mosquitto"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In Home Assistant go to &lt;strong&gt;Settings&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Add-ons&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Mosquitto broker&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Configuration&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Signals</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/mqtt-api/signals/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/mqtt-api/signals/</guid><description>&lt;h1 id="mqtt-signals"&gt;MQTT Signals&lt;a class="anchor" href="#mqtt-signals"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;GbbOptimizer sends signals to external programs (e.g. Home Assistant) every hour, based on the forecast for the current hour.&lt;/p&gt;
&lt;p&gt;MQTT connection parameters (address, port, TLS, ClientID) — see &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/mqtt-api/request-response/"&gt;Request / Response&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote class='book-hint note'&gt;
&lt;ul&gt;
&lt;li&gt;Signals must first be enabled in the &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/discharging/"&gt;Discharge&lt;/a&gt; module&lt;/li&gt;
&lt;li&gt;A given signal is not sent if the &amp;ldquo;X&amp;rdquo; parameter is not defined (field empty)&lt;/li&gt;
&lt;/ul&gt;&lt;/blockquote&gt;&lt;h2 id="binary-signals"&gt;Binary Signals&lt;a class="anchor" href="#binary-signals"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;External programs can subscribe to the following topics:&lt;/p&gt;
&lt;div class="mqtt-topic-card mqtt-direction--publish"&gt;
 &lt;div class="mqtt-topic-header"&gt;
 &lt;span class="mqtt-badge mqtt-direction--publish"&gt;PUB&lt;/span&gt;
 &lt;code class="mqtt-topic-path"&gt;{PlantId}/signals/SOCHigherEqThanX&lt;/code&gt;&lt;span class="mqtt-badge mqtt-qos"&gt;QoS 0&lt;/span&gt;&lt;/div&gt;
 &lt;p class="mqtt-topic-description"&gt;&amp;#34;1&amp;#34; if SOC ≥ X, otherwise &amp;#34;0&amp;#34;&lt;/p&gt;</description></item><item><title>Solarman</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/connection-methods/solarman/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/connection-methods/solarman/</guid><description>&lt;h1 id="solarman"&gt;Solarman&lt;a class="anchor" href="#solarman"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Solarman is a cloud-based method for connecting an inverter to GbbOptimizer. Data passes through Solarman servers — no additional software installation required.&lt;/p&gt;
&lt;h2 id="step-by-step-configuration"&gt;Step-by-step configuration&lt;a class="anchor" href="#step-by-step-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Add an installation: &lt;strong&gt;Add new installation with inverter connected to Solarman&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Fill in the fields up to the &amp;ldquo;Solarman&amp;rdquo; group (details in &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/installation-parameters/"&gt;Installation parameters&lt;/a&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Log in to the Solarman servers: enter your &lt;strong&gt;email&lt;/strong&gt; and &lt;strong&gt;password&lt;/strong&gt; (the same as for the Solarman app) and press &lt;strong&gt;Connect&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select your inverter from the list &lt;strong&gt;Select inverter SerialNo&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Victron</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/inverters/victron/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/inverters/victron/</guid><description>&lt;h1 id="victron"&gt;Victron&lt;a class="anchor" href="#victron"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;span class="badge" style="background-color: #3498db; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75em; font-weight: 600; text-transform: uppercase; vertical-align: middle;"&gt;victron-only&lt;/span&gt;

&lt;p&gt;Configuring a Victron inverter with GbbOptimizer requires correct setup of the &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#ess" class="glossary-term" title="Energy Storage System"&gt;ESS&lt;/a&gt; system and the &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#vrm" class="glossary-term" title="Victron Remote Management portal"&gt;VRM&lt;/a&gt; portal.&lt;/p&gt;
&lt;h2 id="checklist"&gt;Checklist&lt;a class="anchor" href="#checklist"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before starting GbbOptimizer, verify the following settings:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Do not install Beta&lt;/strong&gt; firmware&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DESS must be disabled&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Schedules&lt;/strong&gt; — the &amp;ldquo;Self-consumption above limit&amp;rdquo; option should be set to &lt;strong&gt;PV&lt;/strong&gt; (not &amp;ldquo;PV &amp;amp; Battery&amp;rdquo;). This ensures schedules do not cause battery discharge at night&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Battery Life&lt;/strong&gt; in &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#ess" class="glossary-term" title="Energy Storage System"&gt;ESS&lt;/a&gt; must be &lt;strong&gt;disabled&lt;/strong&gt; — select mode: &lt;code&gt;Optimized (without BatteryLife)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Log interval&lt;/strong&gt; (in VRM Online Portal) set to &lt;strong&gt;1 min&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;VRM permissions&lt;/strong&gt; — the user must have &lt;strong&gt;Full Control&lt;/strong&gt; enabled&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restart Cerbo&lt;/strong&gt; after making changes&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote class='book-hint warning'&gt;
&lt;p&gt;Incorrect Battery Life or Schedules settings can cause unexpected battery discharge at night.&lt;/p&gt;</description></item><item><title>What is GbbOptimizer</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/introduction/what-is-gbboptimizer/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/introduction/what-is-gbboptimizer/</guid><description>&lt;h1 id="what-is-gbboptimizer"&gt;What is GbbOptimizer&lt;a class="anchor" href="#what-is-gbboptimizer"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id="how-it-works"&gt;How it works&lt;a class="anchor" href="#how-it-works"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;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.&lt;/p&gt;</description></item><item><title>GbbConnect2 Addon</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/home-assistant/gbbconnect2-addon/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/home-assistant/gbbconnect2-addon/</guid><description>&lt;h1 id="gbbconnect2--home-assistant-addon"&gt;GbbConnect2 — Home Assistant Addon&lt;a class="anchor" href="#gbbconnect2--home-assistant-addon"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#gbbconnect2" class="glossary-term" title="Local software for direct inverter connection"&gt;GbbConnect2&lt;/a&gt; is available as a &lt;strong&gt;Home Assistant addon&lt;/strong&gt;, allowing you to run it directly in HA without a separate Windows PC or Docker container.&lt;/p&gt;
&lt;p&gt;The addon runs the GbbConnect2Console application and connects the inverter to GbbOptimizer via &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#modbusinmqtt" class="glossary-term" title="Modbus commands transmitted via MQTT"&gt;ModbusInMqtt&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="requirements"&gt;Requirements&lt;a class="anchor" href="#requirements"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Home Assistant OS&lt;/strong&gt; or &lt;strong&gt;Home Assistant Supervised&lt;/strong&gt; (Supervisor required)&lt;/li&gt;
&lt;li&gt;An active GbbOptimizer account with a &lt;strong&gt;GbbConnect2&lt;/strong&gt; type installation&lt;/li&gt;
&lt;li&gt;A hybrid inverter with a datalogger (WiFi or Ethernet)&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;fixed IP address&lt;/strong&gt; for the datalogger on the local network&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="installation"&gt;Installation&lt;a class="anchor" href="#installation"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="1-add-the-repository"&gt;1. Add the repository&lt;a class="anchor" href="#1-add-the-repository"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Click the button below to automatically add the repository to Home Assistant:&lt;/p&gt;</description></item><item><title>Charging</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/charging/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/charging/</guid><description>&lt;h1 id="charging"&gt;Charging&lt;a class="anchor" href="#charging"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The charging module manages battery charging schedules from the grid. In Victron systems it controls the Schedules in the ESS module.&lt;/p&gt;
&lt;blockquote class='book-hint note'&gt;
&lt;p&gt;&lt;span class="badge" style="background-color: #3498db; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75em; font-weight: 600; text-transform: uppercase; vertical-align: middle;"&gt;victron-only&lt;/span&gt;
 We assume that &amp;ldquo;Self-consumption above limit&amp;rdquo; is set to &lt;strong&gt;PV&lt;/strong&gt; (not &amp;ldquo;PV &amp;amp; Battery&amp;rdquo;), because we want the schedule to stop battery discharging at night.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="fetch-schedule-from-installation"&gt;Fetch Schedule from Installation&lt;a class="anchor" href="#fetch-schedule-from-installation"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="badge" style="background-color: #3498db; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75em; font-weight: 600; text-transform: uppercase; vertical-align: middle;"&gt;victron-only&lt;/span&gt;
 The program connects to the installation and retrieves 5 schedules (Schedulers).&lt;/p&gt;</description></item><item><title>Deye</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/inverters/deye/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/inverters/deye/</guid><description>&lt;h1 id="deye"&gt;Deye&lt;a class="anchor" href="#deye"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;span class="badge" style="background-color: #9b59b6; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75em; font-weight: 600; text-transform: uppercase; vertical-align: middle;"&gt;deye-only&lt;/span&gt;

&lt;p&gt;Deye hybrid inverters can be connected to GbbOptimizer in several ways. On this page you will find a checklist of inverter settings and a comparison of connection methods.&lt;/p&gt;
&lt;h2 id="checklist"&gt;Checklist&lt;a class="anchor" href="#checklist"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before starting GbbOptimizer, verify the following on the Deye inverter:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Operating mode&lt;/strong&gt; — &lt;code&gt;Zero export to CT&lt;/code&gt; or &lt;code&gt;Zero export to Loads&lt;/code&gt; (not &amp;ldquo;Selling First&amp;rdquo;!)&lt;/p&gt;</description></item><item><title>DeyeCloud</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/connection-methods/deye-cloud/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/connection-methods/deye-cloud/</guid><description>&lt;h1 id="deyecloud"&gt;DeyeCloud&lt;a class="anchor" href="#deyecloud"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;span class="badge" style="background-color: #9b59b6; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75em; font-weight: 600; text-transform: uppercase; vertical-align: middle;"&gt;deye-only&lt;/span&gt;

&lt;p&gt;DeyeCloud is a backup connection method available for &lt;strong&gt;Solarman&lt;/strong&gt;-type installations. It can be used as a fallback in case of Solarman issues, or as the sole connection.&lt;/p&gt;
&lt;h2 id="operating-modes"&gt;Operating modes&lt;a class="anchor" href="#operating-modes"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Mode&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Disabled&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;DeyeCloud is not used&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Enabled&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;DeyeCloud activates automatically when Solarman reports an error&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Backup only&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Do not use Solarman — always use DeyeCloud&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="configuration"&gt;Configuration&lt;a class="anchor" href="#configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;In the &lt;strong&gt;Backup connection — DeyeCloud&lt;/strong&gt; section of the installation parameters, select the operating mode&lt;/li&gt;
&lt;li&gt;Enter the &lt;strong&gt;login credentials&lt;/strong&gt; for DeyeCloud (may differ from Solarman)&lt;/li&gt;
&lt;li&gt;Check &lt;strong&gt;Remember login credentials&lt;/strong&gt; — without this, manual re-login is required&lt;/li&gt;
&lt;li&gt;After connecting, select the &lt;strong&gt;inverter SerialNo&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A detailed description of the parameters can be found in &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/installation-parameters/"&gt;Installation parameters&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>evcc</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/evcc/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/evcc/</guid><description>&lt;h1 id="integration-with-evcc"&gt;Integration with evcc&lt;a class="anchor" href="#integration-with-evcc"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://evcc.io"&gt;evcc.io&lt;/a&gt; is software for intelligent electric vehicle charging. GbbOptimizer can communicate with it via MQTT to coordinate EV charging with home battery optimization.&lt;/p&gt;
&lt;h2 id="requirements"&gt;Requirements&lt;a class="anchor" href="#requirements"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A working evcc installation&lt;/li&gt;
&lt;li&gt;Local MQTT broker (Mosquitto in Home Assistant or standalone)&lt;/li&gt;
&lt;li&gt;Configured &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/home-assistant/mosquitto-bridge/"&gt;Mosquitto Bridge&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="bridge-configuration"&gt;Bridge Configuration&lt;a class="anchor" href="#bridge-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In the Mosquitto configuration file (&lt;code&gt;/share/mosquitto/GbbOptimizer.conf&lt;/code&gt;) add &lt;code&gt;topic&lt;/code&gt; lines for evcc:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;"&gt;&lt;tr&gt;&lt;td style="vertical-align:top;padding:0;margin:0;border:0;"&gt;
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;1
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;2
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;3
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;4
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;5
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%"&gt;
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;connection GbbOptimizer_&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;PlantId&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;remote_username &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;PlantId&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;remote_password &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;PlantToken&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;address &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;mqtt&lt;span style="color:#f92672"&gt;-&lt;/span&gt;server&lt;span style="color:#f92672"&gt;-&lt;/span&gt;address&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;:&lt;span style="color:#ae81ff"&gt;8883&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;bridge_capath &lt;span style="color:#f92672"&gt;/&lt;/span&gt;etc&lt;span style="color:#f92672"&gt;/&lt;/span&gt;ssl&lt;span style="color:#f92672"&gt;/&lt;/span&gt;certs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;topic &lt;span style="color:#75715e"&gt;# both 2 evcc/loadpoints/ &amp;lt;PlantId&amp;gt;/evcc/site/loadpoints/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="mqtt-topics"&gt;MQTT Topics&lt;a class="anchor" href="#mqtt-topics"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="data-from-evcc-evcc---gbboptimizer"&gt;Data from evcc (evcc -&amp;gt; GbbOptimizer)&lt;a class="anchor" href="#data-from-evcc-evcc---gbboptimizer"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Topic&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;{PlantId}/evcc/site/statistic/total/chargedKWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Total energy charged to EV (kWh)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="commands-from-gbboptimizer-gbboptimizer---evcc"&gt;Commands from GbbOptimizer (GbbOptimizer -&amp;gt; evcc)&lt;a class="anchor" href="#commands-from-gbboptimizer-gbboptimizer---evcc"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Topic&lt;/th&gt;
 &lt;th&gt;Payload&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;{PlantId}/evcc/loadpoints/{chargerId}/mode&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;off&lt;/code&gt; or &lt;code&gt;now&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Enable/disable charging&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;{PlantId}/evcc/loadpoints/{chargerId}/maxCurrent&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;number (A)&lt;/td&gt;
 &lt;td&gt;Maximum charging current&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;{PlantId}/evcc/loadpoints/{chargerId}/connected&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;true&lt;/code&gt;/&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Charger connection status&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Where &lt;code&gt;{chargerId}&lt;/code&gt; is the charging point identifier in evcc.&lt;/p&gt;</description></item><item><title>GBB Shunt</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/advanced/gbb-shunt/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/advanced/gbb-shunt/</guid><description>&lt;h1 id="gbb-shunt"&gt;GBB Shunt&lt;a class="anchor" href="#gbb-shunt"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;GBB Shunt is a GbbOptimizer module designed for installations with lead-acid batteries (flooded, gel, AGM).&lt;/p&gt;
&lt;h2 id="what-is-gbb-shunt"&gt;What is GBB Shunt?&lt;a class="anchor" href="#what-is-gbb-shunt"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In installations with lead-acid batteries, the standard &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#soc" class="glossary-term" title="State of Charge — battery level as a percentage (0–100%)"&gt;SOC&lt;/a&gt; measurement by the inverter can be inaccurate. GBB Shunt enables more accurate tracking of the battery state of charge based on current measurement through a shunt (coulomb counter).&lt;/p&gt;
&lt;h2 id="key-features"&gt;Key Features&lt;a class="anchor" href="#key-features"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Accurate SOC measurement&lt;/strong&gt; — based on current measurement (coulomb counting), not voltage&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Temperature compensation&lt;/strong&gt; — accounts for the effect of temperature on lead-acid battery capacity&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Battery protection&lt;/strong&gt; — prevents deep discharges that shorten the life of lead-acid batteries&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="when-to-use"&gt;When to Use?&lt;a class="anchor" href="#when-to-use"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;GBB Shunt is recommended if:&lt;/p&gt;</description></item><item><title>GoodWe</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mode-mappings/goodwe/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mode-mappings/goodwe/</guid><description>&lt;h1 id="mode-mapping--goodwe"&gt;Mode Mapping — GoodWe&lt;a class="anchor" href="#mode-mapping--goodwe"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;How GbbOptimizer modes translate to GoodWe protocol settings.&lt;/p&gt;
&lt;h2 id="battery-charge-discharge"&gt;Battery Charge-Discharge&lt;a class="anchor" href="#battery-charge-discharge"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Operation&lt;/th&gt;
 &lt;th&gt;BatteryCDEnable&lt;/th&gt;
 &lt;th&gt;BatteryCDMode&lt;/th&gt;
 &lt;th&gt;BatteryCDPW&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Normal&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Charge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;td&gt;ChargeLimitW&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Discharge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;3&lt;/td&gt;
 &lt;td&gt;DischargeLimitW: Max GridSetpoint / Discharge (W). If discharge must be slower to last the full hour — the program calculates the appropriate value. On completion: restore previous value.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;DisableCharge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="missing-options"&gt;Missing Options&lt;a class="anchor" href="#missing-options"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote class='book-hint warning'&gt;
&lt;p&gt;The GoodWe protocol does not support:&lt;/p&gt;</description></item><item><title>Inverter Modes</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/inverter-modes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/inverter-modes/</guid><description>&lt;h1 id="inverter-modes"&gt;Inverter Modes&lt;a class="anchor" href="#inverter-modes"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;GbbOptimizer controls the inverter using four basic modes (protocol operations). Each inverter implements them differently — see the &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mode-mappings/"&gt;Mode Mappings&lt;/a&gt; section for detailed mappings.&lt;/p&gt;
&lt;h2 id="required-data-from-the-inverter"&gt;Required Data from the Inverter&lt;a class="anchor" href="#required-data-from-the-inverter"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The inverter must provide the following data:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Field&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;soc_perc&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Battery &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#soc" class="glossary-term" title="State of Charge — battery level as a percentage (0–100%)"&gt;SOC&lt;/a&gt; in percent (or &lt;code&gt;V&lt;/code&gt; if controlling via voltage)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;loads_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Consumption counter (kWh, cumulative)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;fromgrid_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Grid import energy counter (kWh)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;togrid_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Grid export energy counter (kWh)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;pv_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;PV production counter (kWh)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Optionally:&lt;/p&gt;</description></item><item><title>Quick start</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/introduction/quick-start/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/introduction/quick-start/</guid><description>&lt;h1 id="quick-start"&gt;Quick start&lt;a class="anchor" href="#quick-start"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A step-by-step guide on how to set up GbbOptimizer for your photovoltaic installation.&lt;/p&gt;
&lt;h2 id="1-create-an-account-and-add-an-installation"&gt;1. Create an account and add an installation&lt;a class="anchor" href="#1-create-an-account-and-add-an-installation"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Go to the GbbOptimizer website and create an account. Then add a new installation by selecting the appropriate option depending on your inverter:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Inverter&lt;/th&gt;
 &lt;th&gt;Menu option&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Victron&lt;/strong&gt; (Cerbo GX or other GX module)&lt;/td&gt;
 &lt;td&gt;&amp;ldquo;Add new installation with Victron System&amp;rdquo;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Deye&lt;/strong&gt; via DeyeCloud&lt;/td&gt;
 &lt;td&gt;&amp;ldquo;Add new installation with Deye inverter connected to DeyeCloud&amp;rdquo;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Deye&lt;/strong&gt; via Solarman&lt;/td&gt;
 &lt;td&gt;&amp;ldquo;Add new installation with Solarman&amp;rdquo;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Deye&lt;/strong&gt; via Home Assistant&lt;/td&gt;
 &lt;td&gt;&amp;ldquo;Add new installation with Home Assistant&amp;rdquo;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Other inverter&lt;/strong&gt; via Solarman&lt;/td&gt;
 &lt;td&gt;&amp;ldquo;Add new installation with Solarman&amp;rdquo;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Other inverter&lt;/strong&gt; via Home Assistant&lt;/td&gt;
 &lt;td&gt;&amp;ldquo;Add new installation with Home Assistant&amp;rdquo;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;SofarSolar&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;&amp;ldquo;Installation with DongleDirect (Deye, SofarSolar)&amp;rdquo;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote class='book-hint note'&gt;
&lt;p&gt;If you have Deye inverters in a Master-Slave setup, select &amp;ldquo;Installation with Solarman&amp;rdquo; and add Master as the primary inverter and Slave as an additional one in the installation parameters.&lt;/p&gt;</description></item><item><title>Request / Response</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/mqtt-api/request-response/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/mqtt-api/request-response/</guid><description>&lt;h1 id="mqtt-request-and-response"&gt;MQTT Request and Response&lt;a class="anchor" href="#mqtt-request-and-response"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;GbbOptimizer supports request/response queries over MQTT. An external program sends a request and GbbOptimizer replies with data.&lt;/p&gt;
&lt;h2 id="connection"&gt;Connection&lt;a class="anchor" href="#connection"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The external program should connect to MQTT with the following parameters:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Parameter&lt;/th&gt;
 &lt;th&gt;Value&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Address&lt;/td&gt;
 &lt;td&gt;See &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mqtt-servers/"&gt;MQTT servers&lt;/a&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Port&lt;/td&gt;
 &lt;td&gt;8883&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Username&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;{PlantId}&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Password&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;{PlantToken}&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;UseTLS&lt;/td&gt;
 &lt;td&gt;true&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;ClientID&lt;/td&gt;
 &lt;td&gt;must end with &lt;code&gt;_{PlantId}&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="topics"&gt;Topics&lt;a class="anchor" href="#topics"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Direction&lt;/th&gt;
 &lt;th&gt;Topic&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Request →&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;{PlantId}/ha_gbb/dataserver/serverrequest&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;← Response&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;{PlantId}/ha_gbb/dataserver/serverresponse&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote class='book-hint note'&gt;
&lt;p&gt;For backward compatibility the program also handles &lt;code&gt;{PlantId}/dataserver/serverrequest&lt;/code&gt; and &lt;code&gt;{PlantId}/dataserver/serverresponse&lt;/code&gt; (not recommended).&lt;/p&gt;</description></item><item><title>SolarAssistant</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/home-assistant/solar-assistant/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/home-assistant/solar-assistant/</guid><description>&lt;h1 id="solarassistant"&gt;SolarAssistant&lt;a class="anchor" href="#solarassistant"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;span class="badge" style="background-color: #9b59b6; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75em; font-weight: 600; text-transform: uppercase; vertical-align: middle;"&gt;deye-only&lt;/span&gt;

&lt;p&gt;GbbOptimizer integration with the Deye inverter via &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#solarassistant" class="glossary-term" title="Inverter monitoring software"&gt;SolarAssistant&lt;/a&gt; and Home Assistant.&lt;/p&gt;
&lt;h2 id="supported-configurations"&gt;Supported Configurations&lt;a class="anchor" href="#supported-configurations"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Home Assistant (HA) with SolarAssistant (SA) connected to a hybrid Deye inverter as &lt;code&gt;inverter_1&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="requirements"&gt;Requirements&lt;a class="anchor" href="#requirements"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Home Assistant with Mosquitto broker&lt;/li&gt;
&lt;li&gt;SolarAssistant installed and connected to the Deye inverter&lt;/li&gt;
&lt;li&gt;Configured &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/home-assistant/mosquitto-bridge/"&gt;Mosquitto Bridge&lt;/a&gt; with a topic for SolarAssistant&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="solarassistant-configuration"&gt;SolarAssistant Configuration&lt;a class="anchor" href="#solarassistant-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In the SolarAssistant settings go to &lt;strong&gt;Configuration&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Advanced MQTT&lt;/strong&gt; and change:&lt;/p&gt;</description></item><item><title>Automation</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/home-assistant/automation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/home-assistant/automation/</guid><description>&lt;h1 id="home-assistant-automation"&gt;Home Assistant Automation&lt;a class="anchor" href="#home-assistant-automation"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;After configuring the &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/home-assistant/mosquitto-bridge/"&gt;Mosquitto Bridge&lt;/a&gt; you can create automations in Home Assistant that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Send data&lt;/strong&gt; from HA sensors to GbbOptimizer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;React to commands&lt;/strong&gt; received from GbbOptimizer&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="sending-data-to-gbboptimizer"&gt;Sending Data to GbbOptimizer&lt;a class="anchor" href="#sending-data-to-gbboptimizer"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;GbbOptimizer expects data on the topic &lt;code&gt;ha_gbb/sensor&lt;/code&gt; (locally in HA; via bridge it arrives as &lt;code&gt;&amp;lt;PlantId&amp;gt;/ha_gbb/sensor&lt;/code&gt;).&lt;/p&gt;
&lt;h3 id="required-fields"&gt;Required Fields&lt;a class="anchor" href="#required-fields"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Field&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;soc_perc&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Battery &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#soc" class="glossary-term" title="State of Charge — battery level as a percentage (0–100%)"&gt;SOC&lt;/a&gt; in percent (or &lt;code&gt;V&lt;/code&gt; if voltage-based control is selected)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;loads_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Consumption meter (kWh, cumulative)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;fromgrid_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Energy drawn from grid meter (kWh)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;togrid_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Energy sent to grid meter (kWh)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;pv_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;PV production meter (kWh)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="optional-fields"&gt;Optional Fields&lt;a class="anchor" href="#optional-fields"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Field&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;ev_charge_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;EV charging meter&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;hp_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Heat pump meter&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;other1_total_kWh&lt;/code&gt; &amp;hellip; &lt;code&gt;other6_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Additional meters&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="multiple-pv-arrays"&gt;Multiple PV Arrays&lt;a class="anchor" href="#multiple-pv-arrays"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To send data from multiple PV arrays, use the &lt;code&gt;more&lt;/code&gt; field:&lt;/p&gt;</description></item><item><title>Best practices</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/introduction/best-practices/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/introduction/best-practices/</guid><description>&lt;h1 id="best-practices"&gt;Best practices&lt;a class="anchor" href="#best-practices"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Tips and advice from experienced GbbOptimizer users.&lt;/p&gt;
&lt;h2 id="patience"&gt;Patience&lt;a class="anchor" href="#patience"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote class='book-hint warning'&gt;
&lt;p&gt;The most common mistake of new users is making configuration changes too quickly. The program needs time to calibrate.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;GbbOptimizer is a program that teaches patience. During the first week of operation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#correctionfactor" class="glossary-term" title="PV forecast accuracy calibration"&gt;Correction Factor&lt;/a&gt; for the PV forecast calibrates itself&lt;/li&gt;
&lt;li&gt;The consumption profile collects historical data&lt;/li&gt;
&lt;li&gt;The optimizer &amp;ldquo;learns&amp;rdquo; your installation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Do not disable &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#testmode" class="glossary-term" title="Observation mode — calculates but does not send commands"&gt;Test Mode&lt;/a&gt; sooner than after one week. Give the program time to collect data.&lt;/p&gt;</description></item><item><title>Data Commands</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/mqtt-api/data-commands/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/mqtt-api/data-commands/</guid><description>&lt;h1 id="mqtt-data-commands"&gt;MQTT Data Commands&lt;a class="anchor" href="#mqtt-data-commands"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Commands that allow external programs to modify data in GbbOptimizer. Each command sends data to a dedicated topic and receives a result on &lt;code&gt;{PlantId}/ha_gbb/api/result&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="command-result"&gt;Command Result&lt;a class="anchor" href="#command-result"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class="mqtt-topic-card mqtt-direction--publish"&gt;
 &lt;div class="mqtt-topic-header"&gt;
 &lt;span class="mqtt-badge mqtt-direction--publish"&gt;PUB&lt;/span&gt;
 &lt;code class="mqtt-topic-path"&gt;{PlantId}/ha_gbb/api/result&lt;/code&gt;&lt;/div&gt;
 &lt;p class="mqtt-topic-description"&gt;Result of each data command — OK or error description&lt;/p&gt;&lt;/div&gt;

&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Field&lt;/th&gt;
 &lt;th&gt;Type&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;OrderId&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;string?&lt;/td&gt;
 &lt;td&gt;Copied from the request&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Result&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;string&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;&amp;quot;OK&amp;quot;&lt;/code&gt; or error description&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Data&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;object&lt;/td&gt;
 &lt;td&gt;Data from the original request&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;details class="mqtt-endpoint" id="endpoint-setmanualprices"&gt;
 &lt;summary class="mqtt-endpoint-summary"&gt;&lt;span class="mqtt-badge mqtt-direction--subscribe"&gt;SUB&lt;/span&gt;&lt;span class="mqtt-endpoint-name"&gt;SetManualPrices&lt;/span&gt;
 &lt;span class="mqtt-endpoint-description"&gt;Set manual energy prices&lt;/span&gt;&lt;/summary&gt;
 &lt;div class="mqtt-endpoint-body"&gt;
 &lt;div class="mqtt-topic-row"&gt;&lt;span class="mqtt-badge mqtt-direction--subscribe"&gt;SUB&lt;/span&gt;&lt;code class="mqtt-topic-path"&gt;{PlantId}/ha_gbb/api/setmanualprices&lt;/code&gt;
 &lt;/div&gt;&lt;div class="mqtt-endpoint-content"&gt;
 &lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Field&lt;/th&gt;
 &lt;th&gt;&lt;/th&gt;
 &lt;th&gt;Type&lt;/th&gt;
 &lt;th&gt;Required&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;OrderId&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;string&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;Text copied to the response&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Data&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;array&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;Date&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;date&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;Price date&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;StartHour&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;int (0-23)&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;Start hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;StartMinute&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;int (0-59)&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;Minute (default 0)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;PurchasePrice&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;decimal&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;Purchase price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;TransferPrice&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;decimal&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;Transfer price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;SalePrice&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;decimal&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;Sale price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Discharging</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/discharging/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/discharging/</guid><description>&lt;h1 id="discharging"&gt;Discharging&lt;a class="anchor" href="#discharging"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The discharging module controls when and how energy from the battery is sent to the grid or used to power the home. The key parameter is &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#gridsetpoint" class="glossary-term" title="Target grid power exchange value in watts"&gt;GridSetpoint&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="gridsetpoint--how-it-works"&gt;GridSetpoint — how it works&lt;a class="anchor" href="#gridsetpoint--how-it-works"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#gridsetpoint" class="glossary-term" title="Target grid power exchange value in watts"&gt;GridSetpoint&lt;/a&gt; determines how much energy should flow through the grid meter:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Positive value&lt;/strong&gt; (e.g. +100 W) — the system draws energy from the grid. Surplus PV goes to the battery.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Negative value&lt;/strong&gt; (e.g. -5000 W) — the system exports energy to the grid. First from PV, then from the battery.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt; GridSetpoint = +100 W&lt;/p&gt;</description></item><item><title>GbbConnect2</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/connection-methods/gbbconnect2/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/connection-methods/gbbconnect2/</guid><description>&lt;h1 id="gbbconnect2"&gt;GbbConnect2&lt;a class="anchor" href="#gbbconnect2"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#gbbconnect2" class="glossary-term" title="Local software for direct inverter connection"&gt;GbbConnect2&lt;/a&gt; is software running on the local network that connects the inverter directly to GbbOptimizer via &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#modbusinmqtt" class="glossary-term" title="Modbus commands transmitted via MQTT"&gt;ModbusInMqtt&lt;/a&gt;, bypassing cloud servers.&lt;/p&gt;
&lt;h2 id="requirements"&gt;Requirements&lt;a class="anchor" href="#requirements"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A computer with &lt;strong&gt;Windows&lt;/strong&gt; or a &lt;strong&gt;Docker&lt;/strong&gt; container running 24/7 on the local network&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;Deye&lt;/strong&gt; hybrid inverter with a WiFi logger (dongle)&lt;/li&gt;
&lt;li&gt;A fixed IP address for the logger on the local network&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="step-by-step-configuration"&gt;Step-by-step configuration&lt;a class="anchor" href="#step-by-step-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download and install GbbConnect2: &lt;a href="https://github.com/gbbsoft/GbbConnect2"&gt;github.com/gbbsoft/GbbConnect2&lt;/a&gt;&lt;/p&gt;</description></item><item><title>GoodWe</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/inverters/goodwe/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/inverters/goodwe/</guid><description>&lt;h1 id="goodwe"&gt;GoodWe&lt;a class="anchor" href="#goodwe"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Configuring a GoodWe inverter with GbbOptimizer requires granting access through the SEMS portal and configuring on the GbbOptimizer side.&lt;/p&gt;
&lt;h2 id="step-by-step-configuration"&gt;Step-by-step configuration&lt;a class="anchor" href="#step-by-step-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Log in to the &lt;strong&gt;SEMS&lt;/strong&gt; portal (GoodWe)&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Management&lt;/strong&gt; menu, in your plant data, add the email &lt;code&gt;gbbsoft@gbbsoft.pl&lt;/code&gt; as a &lt;strong&gt;Guest&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;In GbbOptimizer, add an installation with GoodWe, but &lt;strong&gt;do not select a SerialNo&lt;/strong&gt; — the list should be empty (except for the &amp;ldquo;Select SerialNo&amp;rdquo; label)&lt;/li&gt;
&lt;li&gt;At the bottom of the page, check &lt;strong&gt;Share installation with technical support&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Contact technical support (e.g. via Discord: &lt;code&gt;gbbsoft&lt;/code&gt;) and provide your inverter&amp;rsquo;s &lt;strong&gt;SerialNo&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Technical support will select your SerialNo&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote class='book-hint note'&gt;
&lt;p&gt;GoodWe configuration requires a one-time technical support intervention to link the inverter serial number to your installation.&lt;/p&gt;</description></item><item><title>Hinen</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mode-mappings/hinen/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mode-mappings/hinen/</guid><description>&lt;h1 id="mode-mapping--hinen"&gt;Mode Mapping — Hinen&lt;a class="anchor" href="#mode-mapping--hinen"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;How GbbOptimizer modes translate to Hinen protocol settings.&lt;/p&gt;
&lt;h2 id="mapping-table"&gt;Mapping Table&lt;a class="anchor" href="#mapping-table"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Operation&lt;/th&gt;
 &lt;th&gt;Work Mode&lt;/th&gt;
 &lt;th&gt;Charge/Discharge Enable&lt;/th&gt;
 &lt;th&gt;Charge/Discharge Start/End&lt;/th&gt;
 &lt;th&gt;Charge/Discharge SOC&lt;/th&gt;
 &lt;th&gt;Charge/Discharge Rate&lt;/th&gt;
 &lt;th&gt;AntiBackflow Enable&lt;/th&gt;
 &lt;th&gt;AntiBackflow Limit Rate&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Normal&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Self-consumption&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;100%&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Charge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Time period control&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;SOC%&lt;/td&gt;
 &lt;td&gt;= ChargeLimit / (MaxInverterChargeDC_kW or MaxBatteryChargeDC_kW) * 100%&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Discharge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Time period control&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;SOC%&lt;/td&gt;
 &lt;td&gt;= -abs(DischargeLimit) / (MaxInverterChargeDC_kW or MaxBatteryChargeDC_kW) * 100%. DischargeLimit = Max GridSetpoint / Discharge (W). If discharge must be slower — the program calculates the value.&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;same as Charge/Discharge Rate but &amp;gt; 0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;DisableCharge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Time period control&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;current SOC&lt;/td&gt;
 &lt;td&gt;1%&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="notes"&gt;Notes&lt;a class="anchor" href="#notes"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Rate&lt;/strong&gt; is expressed as a percentage of the maximum inverter (or battery) power, not in watts&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Normal&lt;/strong&gt; mode the system returns to Self-consumption mode with SOC = 100% and Charge/Discharge disabled&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;DisableCharge&lt;/strong&gt; mode SOC is set to the current level and Rate to a minimum of 1%&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Tuya</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/tuya/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/tuya/</guid><description>&lt;h1 id="integration-with-tuya"&gt;Integration with Tuya&lt;a class="anchor" href="#integration-with-tuya"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;GbbOptimizer can control Tuya devices (e.g. smart sockets) via the Tuya Cloud API. This requires creating a developer project on the Tuya platform and obtaining API keys.&lt;/p&gt;
&lt;h2 id="obtaining-access-id-and-access-secret"&gt;Obtaining Access ID and Access Secret&lt;a class="anchor" href="#obtaining-access-id-and-access-secret"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="1-create-a-developer-account"&gt;1. Create a developer account&lt;a class="anchor" href="#1-create-a-developer-account"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Register at &lt;a href="https://platform.tuya.com/"&gt;platform.tuya.com&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="2-create-a-cloud-project"&gt;2. Create a Cloud Project&lt;a class="anchor" href="#2-create-a-cloud-project"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Cloud&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Development&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create Cloud Project&lt;/strong&gt; (top right corner)&lt;/li&gt;
&lt;li&gt;Fill in the form:
&lt;ul&gt;
&lt;li&gt;Project name — any name&lt;/li&gt;
&lt;li&gt;Industry — select the appropriate industry&lt;/li&gt;
&lt;li&gt;Development Method — &lt;strong&gt;Smart Home&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Data Center — select the one closest to your location&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;On the next screen click &lt;strong&gt;Authorize&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="3-connect-the-mobile-app"&gt;3. Connect the mobile app&lt;a class="anchor" href="#3-connect-the-mobile-app"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Devices&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Link App Account&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add App Account&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;A QR code will appear&lt;/li&gt;
&lt;li&gt;In the Tuya/Smart Life mobile app: &lt;strong&gt;Me&lt;/strong&gt; (bottom menu) -&amp;gt; scan icon (top right corner)&lt;/li&gt;
&lt;li&gt;Scan the QR code&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After connecting, a list of your devices will appear in the &lt;strong&gt;All Devices&lt;/strong&gt; tab.&lt;/p&gt;</description></item><item><title>Afore</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/inverters/afore/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/inverters/afore/</guid><description>&lt;h1 id="afore"&gt;Afore&lt;a class="anchor" href="#afore"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Configuring an Afore inverter with GbbOptimizer. GbbOptimizer controls the Afore inverter via the &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#modbus" class="glossary-term" title="Serial communication protocol for industrial devices"&gt;Modbus&lt;/a&gt; protocol.&lt;/p&gt;
&lt;h2 id="gbboptimizer-mode-mapping-to-afore-settings"&gt;GbbOptimizer mode mapping to Afore settings&lt;a class="anchor" href="#gbboptimizer-mode-mapping-to-afore-settings"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Operation&lt;/th&gt;
 &lt;th&gt;Register&lt;/th&gt;
 &lt;th&gt;Value&lt;/th&gt;
 &lt;th&gt;After completion&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;AC charging maximum SOC&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Charging: target &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#maxsoc" class="glossary-term" title="Maximum target state of charge"&gt;MaxSOC&lt;/a&gt;&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;ACCharging start/end time (1-4)&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Charging: array of next 4 periods&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Forced charging start/end time (1-4)&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Charging: array of next 4 periods&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;ACCharging power percentage&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Charging: Input Limit&lt;/td&gt;
 &lt;td&gt;% of MaxBuyPower or MaxBatteryChargeDC&lt;/td&gt;
 &lt;td&gt;Restore original value&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Forced charging power percentage&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Charging: Charge Limit&lt;/td&gt;
 &lt;td&gt;% of MaxBatteryChargeDC&lt;/td&gt;
 &lt;td&gt;Restore original value&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Minimum SOC for forced discharge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Discharge: target &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#minsoc" class="glossary-term" title="Minimum state of charge threshold"&gt;MinSOC&lt;/a&gt;&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Forced discharge start time (1-4)&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Discharge: array of next 4 periods&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Power grid power limit percentage&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Discharge: &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#gridsetpoint" class="glossary-term" title="Target grid power exchange value in watts"&gt;GridSetpoint&lt;/a&gt;&lt;/td&gt;
 &lt;td&gt;% of MaxSellPower or MaxBatteryDischargeDC&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Maximum charging current&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Charge block: sets &lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;Restore original value&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="checklist"&gt;Checklist&lt;a class="anchor" href="#checklist"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Timing DChg ON/OFF&lt;/strong&gt; = &lt;code&gt;Enable&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PDisChgMax&lt;/strong&gt; (Forced discharge power percentage) = &lt;code&gt;100%&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Charts</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/home-assistant/charts/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/home-assistant/charts/</guid><description>&lt;h1 id="charts-in-home-assistant"&gt;Charts in Home Assistant&lt;a class="anchor" href="#charts-in-home-assistant"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;GbbOptimizer provides interactive charts (PV production, consumption, SOC, energy prices, etc.) via its web interface. These can be embedded in a Home Assistant dashboard.&lt;/p&gt;
&lt;h2 id="embedding-charts"&gt;Embedding Charts&lt;a class="anchor" href="#embedding-charts"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Use the &lt;strong&gt;Webpage&lt;/strong&gt; (or &lt;strong&gt;iFrame&lt;/strong&gt;) card in the HA dashboard:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to the HA dashboard -&amp;gt; &lt;strong&gt;Edit&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Add card&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;Webpage&lt;/strong&gt; card (or a manual card of type &lt;code&gt;iframe&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;In the URL field paste the chart address from GbbOptimizer&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;div style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;"&gt;&lt;tr&gt;&lt;td style="vertical-align:top;padding:0;margin:0;border:0;"&gt;
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;1
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;2
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%"&gt;
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;type&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;iframe&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;url&lt;/span&gt;: &lt;span style="color:#e6db74"&gt;&amp;#34;https://&amp;lt;server&amp;gt;.gbbsoft.pl/Charts?PlantId=&amp;lt;PlantId&amp;gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;aspect_ratio&lt;/span&gt;: &lt;span style="color:#e6db74"&gt;&amp;#34;16:9&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Replace &lt;code&gt;&amp;lt;server&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;PlantId&amp;gt;&lt;/code&gt; with the appropriate values for your installation.&lt;/p&gt;</description></item><item><title>DongleDirect</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/connection-methods/dongle-direct/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/connection-methods/dongle-direct/</guid><description>&lt;h1 id="dongledirect"&gt;DongleDirect&lt;a class="anchor" href="#dongledirect"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#dongledirect" class="glossary-term" title="Connection method via dongle redirection"&gt;DongleDirect&lt;/a&gt; works similarly to &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#gbbconnect2" class="glossary-term" title="Local software for direct inverter connection"&gt;GbbConnect2&lt;/a&gt; — it connects the inverter to GbbOptimizer, but &lt;strong&gt;without installing additional software&lt;/strong&gt; on the local network. The dongle (WiFi logger) is redirected directly to the GbbOptimizer server.&lt;/p&gt;
&lt;blockquote class='book-hint warning'&gt;
&lt;p&gt;From 2026-03-09 changing Dongle settings may not be possible on some models. In that case, a Dongle reset and restoration of original settings is required.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2 id="step-by-step-configuration"&gt;Step-by-step configuration&lt;a class="anchor" href="#step-by-step-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Note the GbbOptimizer server name from the browser address (e.g. &lt;code&gt;gbboptimizer5.gbbsoft.pl&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Log in to the Dongle — you must know its IP address on the local network (login: &lt;code&gt;admin&lt;/code&gt;, password: &lt;code&gt;admin&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Go to the page &lt;code&gt;http://&amp;lt;dongle_ip&amp;gt;/config_hide.html&lt;/code&gt; (manually change the address in the browser)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Take screenshots&lt;/strong&gt; of all current settings (in case you need to restore them!)&lt;/li&gt;
&lt;li&gt;Change the &lt;strong&gt;Server A Setting&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;Remove the IP address&lt;/li&gt;
&lt;li&gt;Note the original Server A domain name&lt;/li&gt;
&lt;li&gt;Change the domain to the GbbOptimizer server name (e.g. &lt;code&gt;gbboptimizer10.gbbsoft.pl&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Port: &lt;code&gt;10000&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Connection: &lt;code&gt;TCP&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Save + Restart&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Change the &lt;strong&gt;Optional Server Setting&lt;/strong&gt; to the same data — &lt;strong&gt;Save + Restart&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;In GbbOptimizer, change the installation type to &lt;strong&gt;DongleDirect&lt;/strong&gt; (or create a new one)&lt;/li&gt;
&lt;li&gt;In the installation settings, enter:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Inverter serial number&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dongle serial number&lt;/strong&gt; (digits only)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Original Server A domain name&lt;/strong&gt; — if this field is empty, GbbOptimizer will not copy data to Solarman and Solarman/DeyeCloud will stop working&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Save and wait &lt;strong&gt;2-5 minutes&lt;/strong&gt; (the Dongle connects to the GbbOptimizer server after a few minutes)&lt;/li&gt;
&lt;li&gt;The log should show entries such as:
&lt;div class="highlight"&gt;&lt;div style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;"&gt;&lt;tr&gt;&lt;td style="vertical-align:top;padding:0;margin:0;border:0;"&gt;
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;1
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%"&gt;
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2025-06-21 11:00:27: From Dongle: A501001047F585579AF6A5005E15
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2025-06-21 11:00:28: From Server: A50A001017F685579AF6A50001AB745668780000008E15&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="dongle-reset"&gt;Dongle reset&lt;a class="anchor" href="#dongle-reset"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If original Dongle settings need to be restored:&lt;/p&gt;</description></item><item><title>Home Assistant Topics</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/mqtt-api/ha-topics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/mqtt-api/ha-topics/</guid><description>&lt;h1 id="mqtt-topics-for-home-assistant"&gt;MQTT Topics for Home Assistant&lt;a class="anchor" href="#mqtt-topics-for-home-assistant"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Topics used for communication between GbbOptimizer and Home Assistant / GbbConnect.&lt;/p&gt;
&lt;h2 id="data-from-home-assistant-to-gbboptimizer"&gt;Data from Home Assistant to GbbOptimizer&lt;a class="anchor" href="#data-from-home-assistant-to-gbboptimizer"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class="mqtt-topic-card mqtt-direction--subscribe"&gt;
 &lt;div class="mqtt-topic-header"&gt;
 &lt;span class="mqtt-badge mqtt-direction--subscribe"&gt;SUB&lt;/span&gt;
 &lt;code class="mqtt-topic-path"&gt;{PlantId}/ha_gbb/sensor&lt;/code&gt;&lt;span class="mqtt-badge mqtt-qos"&gt;QoS 0&lt;/span&gt;&lt;/div&gt;
 &lt;p class="mqtt-topic-description"&gt;HA sensor data — cumulative counters&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Required fields:&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Field&lt;/th&gt;
 &lt;th&gt;Type&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;soc_perc&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;decimal&lt;/td&gt;
 &lt;td&gt;Battery SOC (%). Use &lt;code&gt;V&lt;/code&gt; if &amp;ldquo;Control via V&amp;rdquo; is checked&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;loads_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;decimal&lt;/td&gt;
 &lt;td&gt;Consumption — cumulative counter&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;fromgrid_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;decimal&lt;/td&gt;
 &lt;td&gt;Grid import — cumulative counter&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;togrid_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;decimal&lt;/td&gt;
 &lt;td&gt;Grid export — cumulative counter&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;pv_total_kWh&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;decimal&lt;/td&gt;
 &lt;td&gt;PV production — cumulative counter&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Optional fields:&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Prices</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/prices/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/prices/</guid><description>&lt;h1 id="prices"&gt;Prices&lt;a class="anchor" href="#prices"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The energy purchase and sale price configuration module. Price data sources are set in &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/installation-parameters/"&gt;installation parameters&lt;/a&gt;; the remaining parameters are configured here.&lt;/p&gt;
&lt;h2 id="purchase-price"&gt;Purchase Price&lt;a class="anchor" href="#purchase-price"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Formula:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;"&gt;&lt;tr&gt;&lt;td style="vertical-align:top;padding:0;margin:0;border:0;"&gt;
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;1
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%"&gt;
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Purchase Price = (Imported Price × Multiplier + Transmission Price + Transport Cost) × VAT/100
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; + (Monthly Costs / number of hours in the month)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Component&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Imported Price&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;Fixed&lt;/strong&gt; → 0. &lt;strong&gt;Dependent on imported prices and transport costs&lt;/strong&gt; → price from the source specified in installation parameters. &lt;strong&gt;Dependent on sale prices&lt;/strong&gt; → Sale Price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Multiplier&lt;/td&gt;
 &lt;td&gt;&amp;ldquo;Multiply imported Purchase Prices by&amp;rdquo;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Transmission Price&lt;/td&gt;
 &lt;td&gt;Price from the source specified in installation parameters (item &amp;ldquo;Transmission: Tariff for transmission prices&amp;rdquo;). 0 if none specified&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Transport Cost&lt;/td&gt;
 &lt;td&gt;Price from the table under the &amp;ldquo;Change Transport Costs / fixed Purchase Prices&amp;rdquo; button&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Monthly Costs&lt;/td&gt;
 &lt;td&gt;Sum of fixed purchase costs — spread evenly across all hours in the month&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="sale-price"&gt;Sale Price&lt;a class="anchor" href="#sale-price"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Formula:&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Sofar</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mode-mappings/sofar/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mode-mappings/sofar/</guid><description>&lt;h1 id="mode-mapping--sofar"&gt;Mode Mapping — Sofar&lt;a class="anchor" href="#mode-mapping--sofar"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;How GbbOptimizer modes translate to Sofar inverter settings in Passive Mode.&lt;/p&gt;
&lt;h2 id="passive-mode"&gt;Passive Mode&lt;a class="anchor" href="#passive-mode"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Operation&lt;/th&gt;
 &lt;th&gt;Gdes (Grid setpoint)&lt;/th&gt;
 &lt;th&gt;Blo (Battery high)&lt;/th&gt;
 &lt;th&gt;Bup (Battery low)&lt;/th&gt;
 &lt;th&gt;Gdzup (Grid high)&lt;/th&gt;
 &lt;th&gt;Gdzlo (Grid low)&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Normal&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Default &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#gridsetpoint" class="glossary-term" title="Target grid power exchange value in watts"&gt;GridSetpoint&lt;/a&gt; (Discharge menu)&lt;/td&gt;
 &lt;td&gt;ChargeLimit or MaxBatteryChargePower or MaxInverterChargePower&lt;/td&gt;
 &lt;td&gt;-(DischargeLimit or MaxBatteryDischargePower or MaxInverterDischargeLimit)&lt;/td&gt;
 &lt;td&gt;MaxBuyPower or MaxInverterChargePower&lt;/td&gt;
 &lt;td&gt;-(MaxSellPower or MaxInverterDischargePower)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Charge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;= Gdzup&lt;/td&gt;
 &lt;td&gt;ChargeLimit or MaxBatteryChargePower or MaxInverterChargePower (adjusted to reach target SOC in the full hour)&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;InputLimit or MaxBuyPower or MaxInverterChargePower&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Discharge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;= Gdzlo&lt;/td&gt;
 &lt;td&gt;= Bup&lt;/td&gt;
 &lt;td&gt;-(DischargeLimit or MaxBatteryDischargePower or MaxInverterDischargeLimit) (adjusted to reach target SOC in the full hour)&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;-(MaxSellPower or MaxInverterDischargePower)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;DisableCharge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;MaxBuyPower or MaxInverterChargePower&lt;/td&gt;
 &lt;td&gt;-(MaxSellPower or MaxInverterDischargePower)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="parameters"&gt;Parameters&lt;a class="anchor" href="#parameters"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Gdes&lt;/strong&gt; — Grid setpoint: target grid energy exchange value&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Blo&lt;/strong&gt; — Battery high: maximum battery charging power&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bup&lt;/strong&gt; — Battery low: maximum battery discharge power (negative value)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gdzup&lt;/strong&gt; — Grid high: maximum grid import power&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gdzlo&lt;/strong&gt; — Grid low: maximum grid export power (negative value)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="notes"&gt;Notes&lt;a class="anchor" href="#notes"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;blockquote class='book-hint note'&gt;
&lt;p&gt;If the option &lt;strong&gt;&amp;ldquo;SofarSolar: Support for 5 parameters (not 3) in PassiveMode&amp;rdquo;&lt;/strong&gt; is unchecked, the Gdzup and Gdzlo parameters are not changed (because they are not available in 3-parameter mode).&lt;/p&gt;</description></item><item><title>Supla</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/supla/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/integrations/supla/</guid><description>&lt;h1 id="integration-with-supla"&gt;Integration with Supla&lt;a class="anchor" href="#integration-with-supla"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;GbbOptimizer can control &lt;a href="https://www.supla.org/"&gt;Supla&lt;/a&gt; devices (e.g. relays, smart sockets) via Direct Links.&lt;/p&gt;
&lt;h2 id="configuration"&gt;Configuration&lt;a class="anchor" href="#configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To connect a Supla device to GbbOptimizer, create a &lt;strong&gt;Direct Link&lt;/strong&gt; in the Supla Cloud panel:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Log in to &lt;a href="https://cloud.supla.org/"&gt;cloud.supla.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Go to the device you want to control&lt;/li&gt;
&lt;li&gt;Create a Direct Link with the appropriate permissions (on/off)&lt;/li&gt;
&lt;li&gt;Copy the generated URL&lt;/li&gt;
&lt;li&gt;Paste the URL in the GbbOptimizer configuration under &lt;strong&gt;IoT&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Supla&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote class='book-hint note'&gt;
&lt;p&gt;A detailed description of creating Direct Links can be found in the &lt;a href="https://gui-generic-builder.supla.io/guide/funkcjonalno%C5%9Bci%20supla/sterowanie-linki-bezposrednie"&gt;Supla documentation&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Consumption Profiles</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/consumption-profiles/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/consumption-profiles/</guid><description>&lt;h1 id="consumption-profiles"&gt;Consumption Profiles&lt;a class="anchor" href="#consumption-profiles"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The module for forecasting home energy consumption. Consumption is divided by hour and day of the week.&lt;/p&gt;
&lt;h2 id="manual-entry"&gt;Manual Entry&lt;a class="anchor" href="#manual-entry"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Enter kWh for each hour and day of the week directly in the table.&lt;/p&gt;
&lt;h2 id="importing-data-from-installation"&gt;Importing Data from Installation&lt;a class="anchor" href="#importing-data-from-installation"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Set the import period and press &lt;strong&gt;Import from Installation&lt;/strong&gt;. The program calculates the average consumption for each hour and day of the week based on data from the inverter.&lt;/p&gt;
&lt;h3 id="automatic-import"&gt;Automatic Import&lt;a class="anchor" href="#automatic-import"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Check &lt;strong&gt;Automatically import data at night&lt;/strong&gt; — the program imports data from the last 28 days every night.&lt;/p&gt;</description></item><item><title>Hinen</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/inverters/hinen/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/inverters/hinen/</guid><description>&lt;h1 id="hinen"&gt;Hinen&lt;a class="anchor" href="#hinen"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Configuring a Hinen inverter with GbbOptimizer.&lt;/p&gt;
&lt;h2 id="gbboptimizer-mode-mapping-to-hinen-settings"&gt;GbbOptimizer mode mapping to Hinen settings&lt;a class="anchor" href="#gbboptimizer-mode-mapping-to-hinen-settings"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;GbbOptimizer controls the Hinen inverter by setting the appropriate &lt;strong&gt;Work Mode&lt;/strong&gt; and charge/discharge parameters.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;GbbOptimizer operation&lt;/th&gt;
 &lt;th&gt;Work Mode&lt;/th&gt;
 &lt;th&gt;Charge/Discharge Enable&lt;/th&gt;
 &lt;th&gt;Start/End&lt;/th&gt;
 &lt;th&gt;SOC&lt;/th&gt;
 &lt;th&gt;Rate&lt;/th&gt;
 &lt;th&gt;AntiBackflow Enable&lt;/th&gt;
 &lt;th&gt;AntiBackflow Limit Rate&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Normal&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Self-consumption&lt;/td&gt;
 &lt;td&gt;No&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;100%&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Charge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Time period control&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;Target SOC%&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;ChargeLimit / (MaxInverterChargeDC or MaxBatteryChargeDC) * 100%&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;No&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Discharge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Time period control&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;Target SOC%&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;DischargeLimit / (MaxInverterChargeDC or MaxBatteryChargeDC) * 100%&lt;/code&gt; (negative value)&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;Same as Rate, but &amp;gt; 0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;DisableCharge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Time period control&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;Current SOC&lt;/td&gt;
 &lt;td&gt;1%&lt;/td&gt;
 &lt;td&gt;No&lt;/td&gt;
 &lt;td&gt;—&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id="notes-on-the-discharge-operation"&gt;Notes on the Discharge operation&lt;a class="anchor" href="#notes-on-the-discharge-operation"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;DischargeLimit&lt;/code&gt; value corresponds to the &amp;ldquo;Max &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#gridsetpoint" class="glossary-term" title="Target grid power exchange value in watts"&gt;GridSetpoint&lt;/a&gt; / Discharge (W)&amp;rdquo; parameter&lt;/li&gt;
&lt;li&gt;If the discharge must be slower to last the full hour, the program automatically corrects this value&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AntiBackflow&lt;/strong&gt; is enabled during discharge to control grid export&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>ModbusInMqtt</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/mqtt-api/modbus-in-mqtt/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/mqtt-api/modbus-in-mqtt/</guid><description>&lt;h1 id="modbusinmqtt-protocol"&gt;ModbusInMqtt Protocol&lt;a class="anchor" href="#modbusinmqtt-protocol"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Communication protocol between GbbOptimizer and &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#gbbconnect2" class="glossary-term" title="Local software for direct inverter connection"&gt;GbbConnect2&lt;/a&gt; — transferring Modbus commands over MQTT.&lt;/p&gt;
&lt;h2 id="gbboptimizer--gbbconnect2"&gt;GbbOptimizer → GbbConnect2&lt;a class="anchor" href="#gbboptimizer--gbbconnect2"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class="mqtt-topic-card mqtt-direction--publish"&gt;
 &lt;div class="mqtt-topic-header"&gt;
 &lt;span class="mqtt-badge mqtt-direction--publish"&gt;PUB&lt;/span&gt;
 &lt;code class="mqtt-topic-path"&gt;{PlantId}/ModbusInMqtt/toDevice&lt;/code&gt;&lt;/div&gt;
 &lt;p class="mqtt-topic-description"&gt;Modbus commands sent to GbbConnect2&lt;/p&gt;&lt;/div&gt;

&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Field&lt;/th&gt;
 &lt;th&gt;&lt;/th&gt;
 &lt;th&gt;Type&lt;/th&gt;
 &lt;th&gt;Required&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;OrderId&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;string&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;Text copied to the response&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Lines&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;array&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;LineNo&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;int&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;Line number&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;Tag&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;string&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;Arbitrary text copied to the response&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;Timestamp&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;int&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;Unix UTC time (seconds)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;Modbus&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;string&lt;/td&gt;
 &lt;td&gt;yes&lt;/td&gt;
 &lt;td&gt;Modbus command to be sent to the inverter&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;LogLevel&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;string&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;Change log level: &lt;code&gt;OnlyErrors&lt;/code&gt;, &lt;code&gt;Min&lt;/code&gt;, &lt;code&gt;Max&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;SendLastLog&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;/td&gt;
 &lt;td&gt;int&lt;/td&gt;
 &lt;td&gt;no&lt;/td&gt;
 &lt;td&gt;1 = attach logs to response (incrementally)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>MQTT Servers</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mqtt-servers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mqtt-servers/</guid><description>&lt;h1 id="mqtt-servers"&gt;MQTT Servers&lt;a class="anchor" href="#mqtt-servers"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;GbbOptimizer uses multiple MQTT servers to communicate with inverters and integrations. The server assigned to your installation depends on the &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#plantid" class="glossary-term" title="Unique identifier for a PV installation"&gt;PlantId&lt;/a&gt; prefix.&lt;/p&gt;
&lt;h2 id="server-table"&gt;Server Table&lt;a class="anchor" href="#server-table"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Application Server&lt;/th&gt;
 &lt;th&gt;MQTT Server&lt;/th&gt;
 &lt;th&gt;PlantId Prefix&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;(none)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer2.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer2-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;B&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer3.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer3-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;C&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer4.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer4-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;D&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer5.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer5-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;E&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer6.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer6-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;F&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer7.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer7-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;G&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer8.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer8-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;H&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer9.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer9-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;I&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer10.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer10-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;J&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer11.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer11-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;K&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer12.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer12-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;L&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer13.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer13-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;M&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer14.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer14-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;N&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer15.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer15-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;O&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer16.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer16-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;P&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer17.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer17-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;Q&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer18.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer18-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;R&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer19.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer19-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;S&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;gbboptimizer20.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;gbboptimizer20-mqtt.gbbsoft.pl&lt;/td&gt;
 &lt;td&gt;T&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="how-to-determine-your-server-from-plantid"&gt;How to Determine Your Server from PlantId&lt;a class="anchor" href="#how-to-determine-your-server-from-plantid"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#plantid" class="glossary-term" title="Unique identifier for a PV installation"&gt;PlantId&lt;/a&gt; prefix (first letter) indicates which server your installation uses:&lt;/p&gt;</description></item><item><title>Victron</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mode-mappings/victron-passive/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mode-mappings/victron-passive/</guid><description>&lt;h1 id="mode-mapping--victron"&gt;Mode Mapping — Victron&lt;a class="anchor" href="#mode-mapping--victron"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;span class="badge" style="background-color: #3498db; color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.75em; font-weight: 600; text-transform: uppercase; vertical-align: middle;"&gt;victron-only&lt;/span&gt;

&lt;p&gt;Victron inverters are controlled through &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#ess" class="glossary-term" title="Energy Storage System"&gt;ESS&lt;/a&gt; (Energy Storage System) via &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#vrm" class="glossary-term" title="Victron Remote Management portal"&gt;VRM&lt;/a&gt; and MQTT.&lt;/p&gt;
&lt;h2 id="ess-mode"&gt;ESS Mode&lt;a class="anchor" href="#ess-mode"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;GbbOptimizer controls the Victron system through ESS Schedules on the Cerbo GX. Schedules define:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Operating mode&lt;/strong&gt; — charging, discharging, normal operation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Target SOC&lt;/strong&gt; — the level to charge/discharge to&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Power limit&lt;/strong&gt; — maximum charging/discharging power&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Time window&lt;/strong&gt; — hours during which the schedule is active&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="prerequisites"&gt;Prerequisites&lt;a class="anchor" href="#prerequisites"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;In the &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#vrm" class="glossary-term" title="Victron Remote Management portal"&gt;VRM&lt;/a&gt; portal, enable remote access to Cerbo&lt;/li&gt;
&lt;li&gt;In &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#ess" class="glossary-term" title="Energy Storage System"&gt;ESS&lt;/a&gt;, set the mode to &lt;strong&gt;&amp;ldquo;Optimized (without BatteryLife)&amp;rdquo;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Ensure GbbOptimizer has correct VRM data (&lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#plantid" class="glossary-term" title="Unique identifier for a PV installation"&gt;PlantId&lt;/a&gt;, &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#planttoken" class="glossary-term" title="Authentication token for MQTT and API"&gt;PlantToken&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote class='book-hint note'&gt;
&lt;p&gt;If &lt;strong&gt;Battery Life&lt;/strong&gt; is enabled in ESS, GbbOptimizer will not be able to fully control the battery. Disable it and set to &lt;strong&gt;&amp;ldquo;Optimized (without BatteryLife)&amp;rdquo;&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Common Errors</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/common-errors/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/common-errors/</guid><description>&lt;h1 id="common-errors"&gt;Common Errors&lt;a class="anchor" href="#common-errors"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A list of the most frequently encountered error messages in GbbOptimizer, their causes, and possible solutions.&lt;/p&gt;
&lt;h2 id="solarman"&gt;Solarman&lt;a class="anchor" href="#solarman"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Message&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;SolarmanError: Solarman timeout!&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Solarman cannot send data to the inverter. Check the local network.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Solarman error: 2101040-device not found&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;The inverter is not sending data to Solarman. Check the inverter&amp;rsquo;s network connection.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Response status code: 503 / 500 / 504&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;The Solarman API is not working correctly. Problem on Solarman&amp;rsquo;s side — wait and try again.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="deyecloud"&gt;DeyeCloud&lt;a class="anchor" href="#deyecloud"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Message&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;DeyeCloud error: timeout&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;DeyeCloud cannot send data to the inverter. Check the local network.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;DeyeCloud error: 2104006-device offline&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;The inverter is not sending data to DeyeCloud. Check the inverter&amp;rsquo;s network connection.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;DeyeCloud error: 2101042-auth no operation permission&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Insufficient permissions for the DeyeCloud account (e.g. account granted by an installer). Contact the installer to obtain full permissions.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="gbbconnect2"&gt;GbbConnect2&lt;a class="anchor" href="#gbbconnect2"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Message&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Mqtt to GbbConnect2: timeout!&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;GbbOptimizer cannot connect to the local &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#gbbconnect2" class="glossary-term" title="Local software for direct inverter connection"&gt;GbbConnect2&lt;/a&gt;. Check whether GbbConnect2 is running.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;GbbConnect2Error: Connection timed out 192.168.x.xx:8899&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#gbbconnect2" class="glossary-term" title="Local software for direct inverter connection"&gt;GbbConnect2&lt;/a&gt; cannot connect to the Deye dongle. Check whether the dongle is on the network.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="victron"&gt;Victron&lt;a class="anchor" href="#victron"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Message&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Victron Mqtt: timeout! (15 sec)&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;GbbOptimizer cannot connect to Cerbo through Victron&amp;rsquo;s MQTT servers. Check the local network and remote access in &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#vrm" class="glossary-term" title="Victron Remote Management portal"&gt;VRM&lt;/a&gt;.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Error during checking whether Schedules reached Cerbo successfully&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;ESS schedules did not reach Cerbo. Check Cerbo&amp;rsquo;s internet connection.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="energy-prices"&gt;Energy Prices&lt;a class="anchor" href="#energy-prices"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Message&lt;/th&gt;
 &lt;th&gt;Source&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Get Prices: The SSL connection could not be established&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;ENTSO-E&lt;/td&gt;
 &lt;td&gt;The ENTSO-E price API is not working. Problem on the provider&amp;rsquo;s side.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Get Prices: Proba polaczenia nie powiodla sie&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;ENTSO-E&lt;/td&gt;
 &lt;td&gt;ENTSO-E API unavailable.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Get Prices: HTTP POST ... Gateway timeout / 502 Bad Gateway&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Tibber&lt;/td&gt;
 &lt;td&gt;The Tibber price API is not working.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Get Prices: Response status code: 502 (Bad Gateway)&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;AU Amber&lt;/td&gt;
 &lt;td&gt;The Amber price API is not working.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="other"&gt;Other&lt;a class="anchor" href="#other"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Message&lt;/th&gt;
 &lt;th&gt;Source&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;Solcast.com: Too many requests&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Solcast&lt;/td&gt;
 &lt;td&gt;The 10 daily request limit for Solcast.com has been reached. Wait until midnight.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;ERROR from Cache: Response status code: 500&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Pstryk&lt;/td&gt;
 &lt;td&gt;Error on the Pstryk API side.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;code&gt;B0220-System function downgrade&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Hinen&lt;/td&gt;
 &lt;td&gt;The Hinen API is being updated. Wait for the update to finish.&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote class='book-hint note'&gt;
&lt;p&gt;Error messages are sent by email from the program. Most &amp;ldquo;timeout&amp;rdquo; and &amp;ldquo;device offline&amp;rdquo; errors are related to local network issues — check the inverter and router connection.&lt;/p&gt;</description></item><item><title>EVCC Topics</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/mqtt-api/evcc-topics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/mqtt-api/evcc-topics/</guid><description>&lt;h1 id="mqtt-topics-for-evcc"&gt;MQTT Topics for EVCC&lt;a class="anchor" href="#mqtt-topics-for-evcc"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;GbbOptimizer integration with &lt;a href="https://evcc.io/"&gt;evcc.io&lt;/a&gt; via MQTT.&lt;/p&gt;
&lt;h2 id="configuration"&gt;Configuration&lt;a class="anchor" href="#configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In the Mosquitto (or HA) broker, create a bridge configuration file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;"&gt;&lt;tr&gt;&lt;td style="vertical-align:top;padding:0;margin:0;border:0;"&gt;
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;1
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;2
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;3
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;4
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;5
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%"&gt;
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;connection GbbOptimizer_&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;PlantId&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;remote_username &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;PlantId&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;remote_password &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;PlantToken&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;address &lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;MQTT address&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;:&lt;span style="color:#ae81ff"&gt;8883&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;bridge_capath &lt;span style="color:#f92672"&gt;/&lt;/span&gt;etc&lt;span style="color:#f92672"&gt;/&lt;/span&gt;ssl&lt;span style="color:#f92672"&gt;/&lt;/span&gt;certs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;topic &lt;span style="color:#75715e"&gt;# both 2 evcc/loadpoints/ &amp;lt;PlantId&amp;gt;/evcc/site/loadpoints/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;MQTT server addresses — see &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/mqtt-servers/"&gt;MQTT servers&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="data-from-evcc-to-gbboptimizer"&gt;Data from EVCC to GbbOptimizer&lt;a class="anchor" href="#data-from-evcc-to-gbboptimizer"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class="mqtt-topic-card mqtt-direction--subscribe"&gt;
 &lt;div class="mqtt-topic-header"&gt;
 &lt;span class="mqtt-badge mqtt-direction--subscribe"&gt;SUB&lt;/span&gt;
 &lt;code class="mqtt-topic-path"&gt;{PlantId}/evcc/site/statistic/total/chargedKWh&lt;/code&gt;&lt;/div&gt;
 &lt;p class="mqtt-topic-description"&gt;Total energy consumed by the charger (kWh)&lt;/p&gt;</description></item><item><title>Extra Consumption / EV</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/additional-loads-ev/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/additional-loads-ev/</guid><description>&lt;h1 id="extra-consumption--ev"&gt;Extra Consumption / EV&lt;a class="anchor" href="#extra-consumption--ev"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Extra Consumption is the portion of energy consumption that &lt;strong&gt;does not enter the home average&lt;/strong&gt; — for example, charging an electric vehicle or a heat pump. The goal is to separate the unpredictable, variable part from standard consumption.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Data flow:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;IoT meters → Extra Consumption → &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/gains/"&gt;Gains&lt;/a&gt; → &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/battery-forecast/"&gt;Battery Forecast&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;EV chargers → Extra Consumption → Gains → Battery Forecast&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="autoconverter"&gt;AutoConverter&lt;a class="anchor" href="#autoconverter"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;AutoConverter detects peaks in consumption and automatically converts them into vehicle charging (or another type of Extra Consumption).&lt;/p&gt;</description></item><item><title>Sofar</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/inverters/sofar/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/inverters/sofar/</guid><description>&lt;h1 id="sofar"&gt;Sofar&lt;a class="anchor" href="#sofar"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Configuring a Sofar inverter with GbbOptimizer. The Sofar inverter is controlled in &lt;strong&gt;Passive Mode&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="gbboptimizer-mode-mapping-to-sofar-settings-passive-mode"&gt;GbbOptimizer mode mapping to Sofar settings (Passive Mode)&lt;a class="anchor" href="#gbboptimizer-mode-mapping-to-sofar-settings-passive-mode"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The program sets &lt;code&gt;StorageMode = 3&lt;/code&gt; (Passive Mode) and (when supporting 5 parameters) &lt;code&gt;ManagementMode = 1&lt;/code&gt; (Manual).&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Operation&lt;/th&gt;
 &lt;th&gt;Gdes (Grid setpoint)&lt;/th&gt;
 &lt;th&gt;Blo (battery high)&lt;/th&gt;
 &lt;th&gt;Bup (battery low)&lt;/th&gt;
 &lt;th&gt;Gdzup (grid high)&lt;/th&gt;
 &lt;th&gt;Gdzlo (grid low)&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Normal&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Default &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#gridsetpoint" class="glossary-term" title="Target grid power exchange value in watts"&gt;GridSetpoint&lt;/a&gt; (from Discharge menu)&lt;/td&gt;
 &lt;td&gt;ChargeLimit or MaxBatteryChargePower or MaxInverterChargePower&lt;/td&gt;
 &lt;td&gt;-(DischargeLimit or MaxBatteryDischargePower or MaxInverterDischargeLimit)&lt;/td&gt;
 &lt;td&gt;MaxBuyPower or MaxInverterChargePower&lt;/td&gt;
 &lt;td&gt;-(MaxSellPower or MaxInverterDischargePower)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Charge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;= Gdzup&lt;/td&gt;
 &lt;td&gt;ChargeLimit (adjusted to reach TargetSOC in the full hour)&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;InputLimit or MaxBuyPower or MaxInverterChargePower&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Discharge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;= Gdzlo&lt;/td&gt;
 &lt;td&gt;= Bup&lt;/td&gt;
 &lt;td&gt;-(DischargeLimit, adjusted to reach TargetSOC in the full hour)&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;-(MaxSellPower or MaxInverterDischargePower)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;DisableCharge&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;0&lt;/td&gt;
 &lt;td&gt;MaxBuyPower or MaxInverterChargePower&lt;/td&gt;
 &lt;td&gt;-(MaxSellPower or MaxInverterDischargePower)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote class='book-hint note'&gt;
&lt;p&gt;If the option &amp;ldquo;SofarSolar: Support for 5 parameters (not 3) in PassiveMode&amp;rdquo; is unchecked, the &lt;strong&gt;Gdzup&lt;/strong&gt; and &lt;strong&gt;Gdzlo&lt;/strong&gt; parameters are not changed (because they are not available in 3-parameter mode).&lt;/p&gt;</description></item><item><title>Heat Pump / Air Conditioning</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/heat-pump/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/heat-pump/</guid><description>&lt;h1 id="heat-pump--air-conditioning-forecast"&gt;Heat Pump / Air Conditioning Forecast&lt;a class="anchor" href="#heat-pump--air-conditioning-forecast"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The module for forecasting heat pump (HP) or air conditioning consumption based on outdoor temperature.&lt;/p&gt;
&lt;h2 id="why-a-separate-module"&gt;Why a Separate Module?&lt;a class="anchor" href="#why-a-separate-module"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Heat pumps and air conditioning (like EV chargers) do not operate according to the rhythm of the day — they depend on temperature. It is therefore better to &lt;strong&gt;exclude them from the average&lt;/strong&gt; in the &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/consumption-profiles/"&gt;Consumption Profiles&lt;/a&gt; module and place them in &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/additional-loads-ev/"&gt;Extra Consumption&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="step-by-step-configuration"&gt;Step-by-Step Configuration&lt;a class="anchor" href="#step-by-step-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Enter &lt;strong&gt;latitude and longitude&lt;/strong&gt; in &lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/installation/installation-parameters/"&gt;installation parameters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Import the weather forecast&lt;/li&gt;
&lt;li&gt;Press &lt;strong&gt;HP Parameters&lt;/strong&gt; and enter the kWh consumption of the pump/AC for each hour (minimum 2 values for different temperatures)&lt;/li&gt;
&lt;li&gt;Press &lt;strong&gt;Calculate HP forecast&lt;/strong&gt; and check the results&lt;/li&gt;
&lt;li&gt;Press &lt;strong&gt;Export HP forecast to Extra Consumption module&lt;/strong&gt; (menu: Consumption Profiles → Extra Consumption → Filter: &amp;ldquo;Type&amp;rdquo; = &amp;ldquo;Heat Pump&amp;rdquo;)&lt;/li&gt;
&lt;li&gt;Enable hourly tasks: &lt;strong&gt;Import weather forecast&lt;/strong&gt;, &lt;strong&gt;Calculate HP forecast&lt;/strong&gt;, &lt;strong&gt;Export HP forecast to Extra Consumption module&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="hp-parameters--temperature-vs-consumption-table"&gt;HP Parameters — Temperature vs. Consumption Table&lt;a class="anchor" href="#hp-parameters--temperature-vs-consumption-table"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For each hour, enter how many kWh the HP/AC consumes at a given outdoor temperature.&lt;/p&gt;</description></item><item><title>Gains</title><link>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/gains/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/configuration/gains/</guid><description>&lt;h1 id="gains"&gt;Gains&lt;a class="anchor" href="#gains"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The module collects data from the installation and calculates photovoltaic gains. Import data manually at least once a day or check &lt;strong&gt;Automatically import data from Installation&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Data is displayed by hour, day, or month:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hourly data — stored for &lt;strong&gt;2 months&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Daily data — stored for &lt;strong&gt;2 years&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Monthly data — stored &lt;strong&gt;permanently&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="columns--profit"&gt;Columns — Profit&lt;a class="anchor" href="#columns--profit"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Column&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Day / Hour&lt;/td&gt;
 &lt;td&gt;Day and hour&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Profit value&lt;/td&gt;
 &lt;td&gt;&lt;strong&gt;= Consumption Value - Inverter Value - (Purchase Value - Battery Value Change) + Sale Value&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Profit / Consumption&lt;/td&gt;
 &lt;td&gt;KPI: Profit value / Consumption kWh&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Profit / Solar&lt;/td&gt;
 &lt;td&gt;KPI: Profit value / PV kWh&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Energy cost&lt;/td&gt;
 &lt;td&gt;Purchase Value - Sale Value&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;From grid (kWh)&lt;/td&gt;
 &lt;td&gt;How much drawn from the grid&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;From grid balanced (kWh)&lt;/td&gt;
 &lt;td&gt;Drawn after hourly balancing (for Poland)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Purchase Price&lt;/td&gt;
 &lt;td&gt;Energy purchase price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Purchase Value&lt;/td&gt;
 &lt;td&gt;From grid [balanced] × Purchase Price + Monthly Cost&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Purchase / Production&lt;/td&gt;
 &lt;td&gt;KPI: Purchase Value / Consumption Value&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;(Purchase - Sale) / Production&lt;/td&gt;
 &lt;td&gt;KPI: what percentage of the energy bill you will pay&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;To grid (kWh)&lt;/td&gt;
 &lt;td&gt;How much sent to the grid&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;To grid balanced (kWh)&lt;/td&gt;
 &lt;td&gt;Sent after hourly balancing (for Poland)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Sale Price&lt;/td&gt;
 &lt;td&gt;Energy sale price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Sale Value&lt;/td&gt;
 &lt;td&gt;To grid [balanced] × Sale Price − Value of energy sent to grid&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Consumption (kWh)&lt;/td&gt;
 &lt;td&gt;Home electricity consumption&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Consumption Price&lt;/td&gt;
 &lt;td&gt;Price of energy consumed by the home (including inverter)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Consumption Value&lt;/td&gt;
 &lt;td&gt;Consumption kWh × Consumption Price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Inverter Consumption (kWh)&lt;/td&gt;
 &lt;td&gt;Electricity consumption by the inverter&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Inverter Value&lt;/td&gt;
 &lt;td&gt;Inverter Consumption kWh × Consumption Price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Self-consumption&lt;/td&gt;
 &lt;td&gt;KPI: 1 - (To grid kWh / PV kWh) — how much PV energy does not go to the grid&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Self-sufficiency&lt;/td&gt;
 &lt;td&gt;KPI: PV / Consumption — what % of energy from PV covers consumption&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;a href="https://krzysztofhajdamowicz.github.io/rewrite-GbbOptimizer-manual/en/references/glossary/#rte" class="glossary-term" title="Round-trip efficiency of charge/discharge cycle"&gt;RTE&lt;/a&gt;&lt;/td&gt;
 &lt;td&gt;KPI: To grid kWh / (From grid kWh + PV kWh - Consumption kWh)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;PV (kWh)&lt;/td&gt;
 &lt;td&gt;PV production&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;To battery (kWh)&lt;/td&gt;
 &lt;td&gt;Energy sent to the battery (before DC conversion)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;min/max/avg SOC (%)&lt;/td&gt;
 &lt;td&gt;Minimum, maximum, and average battery SOC&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="columns--battery-energy-value"&gt;Columns — Battery Energy Value&lt;a class="anchor" href="#columns--battery-energy-value"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Column&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Start SOC (%)&lt;/td&gt;
 &lt;td&gt;Starting SOC (calculated from MinSOC and MaxSOC if not provided by the installation)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;End SOC (%)&lt;/td&gt;
 &lt;td&gt;Ending SOC&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Battery Change (kWh)&lt;/td&gt;
 &lt;td&gt;&amp;gt;0 charging, &amp;lt;0 discharging — calculated from EndSOC - StartSOC&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Grid charging (kWh)&lt;/td&gt;
 &lt;td&gt;Energy used to charge from the grid (AC side)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;PV charging (kWh)&lt;/td&gt;
 &lt;td&gt;Energy used to charge from PV (AC side)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Charging losses (kWh)&lt;/td&gt;
 &lt;td&gt;Difference between DC and AC during charging&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Charging efficiency (%)&lt;/td&gt;
 &lt;td&gt;1 - Losses / (Grid charging + PV charging)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Discharge to grid (kWh)&lt;/td&gt;
 &lt;td&gt;Battery energy to grid (AC)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Discharge to consumption (kWh)&lt;/td&gt;
 &lt;td&gt;Battery energy to home (AC)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Discharge losses (kWh)&lt;/td&gt;
 &lt;td&gt;DC/AC difference during discharging&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Discharge efficiency (%)&lt;/td&gt;
 &lt;td&gt;1 - Losses / (Discharge to grid + to consumption)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Start / End kWh in battery&lt;/td&gt;
 &lt;td&gt;Energy in battery above MinSOC&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Start / End Value&lt;/td&gt;
 &lt;td&gt;Value of energy in the battery&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Battery Value Change&lt;/td&gt;
 &lt;td&gt;Discharging: kWh × Average price (previous hour). Charging: kWh × Purchase Price&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Average end price&lt;/td&gt;
 &lt;td&gt;End Value / End kWh in battery&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;MinSOC (%)&lt;/td&gt;
 &lt;td&gt;Stored value of &amp;ldquo;Minimum battery SOC %&amp;rdquo; from installation parameters&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="columns--extra-consumption"&gt;Columns — Extra Consumption&lt;a class="anchor" href="#columns--extra-consumption"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Column&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Extra Consumption Price&lt;/td&gt;
 &lt;td&gt;Average kWh price: average of 0 (PV), Average battery price and Purchase Price (in usage proportions)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Electric vehicle (kWh / value)&lt;/td&gt;
 &lt;td&gt;Energy and value of EV charging&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Heat pump (kWh / value)&lt;/td&gt;
 &lt;td&gt;Energy and value of heat pump&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Other1 (kWh / value)&lt;/td&gt;
 &lt;td&gt;Energy and value of &amp;ldquo;Other1&amp;rdquo;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Other2 (kWh / value)&lt;/td&gt;
 &lt;td&gt;Energy and value of &amp;ldquo;Other2&amp;rdquo;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;</description></item></channel></rss>