openWB smart home integration, free and open source

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
| Field | What to enter |
|---|---|
| openWB address | IP address or host name of the openWB, e.g. 192.168.1.30 |
| MQTT port | 1883 (unencrypted) or 8883 (TLS) |
| TLS | Ticked for port 8883 |
| MQTT user and password | Only with the user management of openWB |
| Allow control | Off by default: lets Gladys change the mode and the current |
| Language of the feature names | Used 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
| Trigger | When | Variables |
|---|---|---|
| Vehicle plugged in | A vehicle is plugged into a chargepoint | chargepoint, vehicle |
| Vehicle unplugged | A vehicle is unplugged | chargepoint, vehicle, energy (kWh) |
| Charging started | A charge starts (a short pause is not a new charge) | chargepoint, vehicle |
| Charging finished | A charge stopped for 10 minutes, or the vehicle was unplugged | chargepoint, 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.
| Setting | Type | Required | Description |
|---|---|---|---|
| Connect your openWB | section | No | The 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 address | string | Yes | IP address or host name of the openWB (its broker runs on it). |
| MQTT port | number | No | 1883 unencrypted, 8883 with TLS. |
| TLS (port 8883) | boolean | No | The self-signed certificate of openWB is accepted. |
| MQTT user (optional) | string | No | Only if the user management of openWB is on. |
| MQTT password (optional) | secret | No | |
| Allow control | boolean | No | Lets Gladys change the charging mode and the instant charging current. Stop is always allowed. |
| Language of the feature names | select | No |
How to install openWB in Gladys
- In Gladys, open Integrations: openWB appears in the catalog, next to the native integrations, with a community badge.
- 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). - Open the Configuration screen of the integration, fill in the settings, and save.
- 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.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation