Skip to main content

openWB smart home integration, free and open source

openWB integration for Gladys Assistant

The openWB 2 wallbox in local MQTT: charging state, power, modes, solar, grid and battery.

The integration brings an openWB 2.x wallbox into Gladys, locally, through the MQTT broker that runs on the openWB. It follows every chargepoint live (plugged in, charging, power, energy), the grid, solar and battery meters openWB knows, fires scene triggers when a vehicle is plugged in or a charge ends, and can change the charging mode and the instant charging current.

Developed without the hardware, from the source code of openWB 2 (openWB/core) and tested against a real Mosquitto broker replaying its topics: feedback welcome.

Requirements​

  • An openWB running the 2.x software (series 2, Pro, or any openWB updated to 2.x). The 1.9 software uses other topics and is not supported.
  • Gladys 5.1 or later, on the same network as the openWB.
  • Access to the broker of the openWB:
    • port 1883 (unencrypted): in openWB, under System → Sicherheit, turn on Unverschlüsselten Zugang erlauben;
    • or port 8883 with TLS, open by default: tick TLS in the integration. openWB uses a self-signed certificate, which the integration accepts.
  • If the user management of openWB (Benutzerverwaltung) is on: port 8883 with TLS (openWB then closes port 1883), an openWB user and its password. To change modes, this user needs write access to its chargepoints.

Configuration​

FieldWhat to enter
openWB addressIP address or host name of the openWB, e.g. 192.168.1.30
MQTT port1883 (unencrypted) or 8883 (TLS)
TLSTicked for port 8883
MQTT user and passwordOnly with the user management of openWB
Allow controlOff by default: lets Gladys change the mode and the current
Language of the feature namesUsed once, when the devices are created; French by default

Then use Test the connection: it lists the chargepoints openWB reports. The devices appear in the Discovery tab of the integration: add those you want.

Stop is always allowed, even with control off: stopping a charge is never dangerous. The other modes and the current need Allow control.

The devices​

Chargepoint​

One device per chargepoint of openWB, named as in openWB:

  • Charging mode (controllable): Instant, Solar, Eco, Target, Stop. openWB's Min + PV is the Solar mode with a minimum current set in its charging profile;
  • Vehicle plugged in, Charging state (charging, plugged in, paused by the car, waiting for openWB, free);
  • Charging power (kW), Charging current (A, highest phase);
  • Instant charging current (controllable, 6 to 32 A): the current of the Instant mode;
  • Session energy (kWh): the energy of the current session, kept after unplugging;
  • Charger meter (kWh): the meter of the chargepoint, which the Gladys energy module can use;
  • Vehicle battery (%), only when openWB knows it (a SoC module for the vehicle, or a charger that reads it).

openWB site​

Created when openWB measures any of it:

  • Grid (W, import positive, export negative), Grid import and Grid export (kWh meters);
  • Home consumption (W);
  • Solar production (W) and Solar yield (kWh meter);
  • Home battery (%), Battery charging and Battery discharging (W).

Dashboard widget​

The openWB widget shows solar, home and grid as tiles, one line per chargepoint (state, power, battery level, mode) and the home battery, and mode buttons for one chargepoint (chosen in the widget settings, the first one otherwise): Instant, Solar, Eco and Stop with control allowed, Stop alone otherwise. The current mode carries a check mark. Three settings hide the tiles, the chargepoint lines and the buttons.

Scene triggers​

TriggerWhenVariables
Vehicle plugged inA vehicle is plugged into a chargepointchargepoint, vehicle
Vehicle unpluggedA vehicle is unpluggedchargepoint, vehicle, energy (kWh)
Charging startedA charge starts (a short pause is not a new charge)chargepoint, vehicle
Charging finishedA charge stopped for 10 minutes, or the vehicle was unpluggedchargepoint, vehicle, energy, battery

Each trigger can be limited to one chargepoint; Charging started also to one mode. The vehicle is the one openWB assigned to the chargepoint. The battery level is -1 when openWB does not know it.

Scene actions​

  • Set the charging mode of a chargepoint. Stop is always allowed, the other modes need control.
  • Set the instant charging current (6 to 32 A), with control allowed.

The integration waits until openWB has applied the change (15 seconds at most); otherwise the action fails with a message.

Scene examples​

  • At 22:00, set the mode to Instant (off-peak hours), and back to Solar at 6:00.
  • When a charge is finished, send a message with the energy charged.
  • When the grid price is high (another integration), set the chargepoint to Stop.

Troubleshooting​

  • "The MQTT broker of openWB does not answer": check the address, and that the unencrypted access is allowed in openWB for port 1883 (or use 8883 with TLS).
  • "refused the user name or the password": the user management of openWB is on; use port 8883 with TLS and an openWB user.
  • "no openWB 2.x data": the broker answers but publishes no openWB/... topic. Is it an openWB 2? A 1.9 software is not supported.
  • "openWB did not apply the change": openWB is not running its control loop, or the MQTT user may not write to this chargepoint.

Limitations​

  • openWB 2.x only, through its MQTT broker; no cloud.
  • Changing the mode or the current edits the charging profile active on the chargepoint, as openWB's own simple API does. If several chargepoints or vehicles share this profile, openWB applies the change to them too (unless its "temporary charging profiles" are on).
  • Stop needs no control, and lasts: without temporary charging profiles, it is saved in the profile of the vehicle; leave it from openWB, or allow control in Gladys. With temporary charging profiles, openWB goes back to the vehicle's profile when the vehicle is unplugged: a mode set from Gladys ends with the session.
  • Target charging plans, time charging and battery settings are not edited from Gladys.
  • Developed without the hardware: feedback welcome on the forum.

Configuration settings​

These are the settings openWB asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Connect your openWBsectionNoThe integration reads openWB 2.x through its MQTT broker, on your network. In openWB, under System → Sicherheit, allow unencrypted access (port 1883), or use port 8883 with TLS (required with user management). Changing modes and currents is off by default: Stop is always allowed.
openWB addressstringYesIP address or host name of the openWB (its broker runs on it).
MQTT portnumberNo1883 unencrypted, 8883 with TLS.
TLS (port 8883)booleanNoThe self-signed certificate of openWB is accepted.
MQTT user (optional)stringNoOnly if the user management of openWB is on.
MQTT password (optional)secretNo
Allow controlbooleanNoLets Gladys change the charging mode and the instant charging current. Stop is always allowed.
Language of the feature namesselectNo

How to install openWB in Gladys​

  1. In Gladys, open Integrations: openWB appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-openwb:1.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/guim31/gladys-openwb.

openWB requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

openWB is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂