MQTT Signals#

GbbOptimizer sends signals to external programs (e.g. Home Assistant) every hour, based on the forecast for the current hour.

MQTT connection parameters (address, port, TLS, ClientID) — see Request / Response.

  • Signals must first be enabled in the Discharge module
  • A given signal is not sent if the “X” parameter is not defined (field empty)

Binary Signals#

External programs can subscribe to the following topics:

PUB {PlantId}/signals/SOCHigherEqThanXQoS 0

"1" if SOC ≥ X, otherwise "0"

PUB {PlantId}/signals/SOCLowerEqThanXQoS 0

"1" if SOC ≤ X, otherwise "0"

PUB {PlantId}/signals/SellingPriceHigherEqThanXQoS 0

"1" if Selling Price ≥ X, otherwise "0"

PUB {PlantId}/signals/SellingPriceLowerEqThanXQoS 0

"1" if Selling Price ≤ X, otherwise "0"

PUB {PlantId}/signals/FromGridHigherEqThanXQoS 0

"1" if grid import ≥ X, otherwise "0"

PUB {PlantId}/signals/ToGridHigherEqThanXQoS 0

"1" if grid export ≥ X, otherwise "0"

JSON Data#

PUB {PlantId}/signals/dataQoS 0

Forecast data in JSON format

FieldTypeDescription
SOCintSOC (%) at the start of the hour
SellingPricedecimalCurrent selling price (absent if no price)
PurchasePricedecimalCurrent purchase price (absent if no price)
FromGrid_kWhdecimalForecast grid import
ToGrid_kWhdecimalForecast grid export

EV Charger Signals#

Signals sent by the EV module. External programs (e.g. Home Assistant) can subscribe to these topics to switch EV charging on or off.

  • A “HomeAssistant EV Car” must be added in the program first
  • See also SetCar for setting EV car parameters
PUBEVCharger_On Switch on EV charger
PUB{PlantId}/signals/EVCharger_On

Payload — JSON:

FieldTypeDescription
NamestringName of the HomeAssistant EV Car
ChargeSpeedAdecimalCharge speed (A)
PUBEVCharger_Off Switch off EV charger
PUB{PlantId}/signals/EVCharger_Off

Payload — JSON:

FieldTypeDescription
NamestringName of the HomeAssistant EV Car