NexBlue smart home integration, free and open source

NexBlue charger over local Modbus TCP: state, power, energy, stop; optional start and current.
This integration shows a NexBlue EV charger in Gladys, read on your local network through Modbus TCP (port 502), without any cloud nor account. It can stop the charge, and, only if you allow it, start it and set the charging current.
Never tested with a real device. It was built from the page NexBlue publishes ("NexBlue Modbus Documentation", nexblue.com) and tested against a simulated charger only. Unofficial: not affiliated with NexBlue.
Models and minimum firmware given by NexBlue for this Modbus map:
| Model | Firmware |
|---|---|
| Edge 2, Edge Max, Point 2 | 03.09.88 |
| Delta, Delta Max | 03.08.59 |
An older firmware is named in the status: update the charger in the NexBlue app.
Before you start
- In the NexBlue app, open the charger settings and turn Modbus TCP on. Note the unit id (200 unless you changed it).
- Give the charger a fixed IP address on your router.
- Modbus TCP has no password: anyone on your network can read and control the charger. Keep it on a trusted network (no port forwarding to the internet).
- Use one way of control at a time: NexBlue warns that the app, its portal, its OpenAPI, OCPP and Modbus may conflict. Under OCPP control the charger refuses start and stop over Modbus: Gladys then shows the values only (its stop and start are refused by the charger, the status says so).
Configuration
| Field | Meaning |
|---|---|
| IP address of the charger | Modbus port 502 unless you add one (192.168.1.60:502). |
| Modbus unit id | 200 unless changed in the NexBlue app (1 to 247). |
| Allow start and current | Off by default: see "Start and current" below. |
| Highest charging current (A) | 6 to 32 A (16 by default): the most Gladys may set. |
| Refresh interval | Seconds between two reads (30 by default, 10 at least). |
| Language | Names of the device and features added from now on, status and errors. |
Save, then add the charger from the Discovery tab.
The device is keyed on the serial number the charger gives over Modbus, read first in every connection: another serial number at the address is another device (the old one shows unreachable), and its values never go to the first one. Until a serial number is read, nothing is published (the status says why).
The Test the connection button reads the charger once, never sooner than the refresh interval after the last read (it then shows the last result).
Order of the 32-bit values
NexBlue's page contradicts itself on the order of the 32-bit and 64-bit values. Gladys finds it on the charger itself, from its date register (only one order gives a real date), and keeps it with the serial number of that charger. When the date of the charger is not set, the order kept for that same serial number is used to show the values, but the charging current is never written: a current is written only in the order the date gave in the same Modbus connection. Another charger at the address (another serial) never takes it. While no order is known (the date not set, the charger never seen before), power, currents, voltages and energy are not read, the charging current cannot be set, and the status says so; the state and the stop work.
What you get
| Feature | Gladys category | Note |
|---|---|---|
| Charge point status | text | Available, Preparing, Charging, SuspendedEVSE, SuspendedEV… |
| Connector, charging state | charging station | from the status |
| Vehicle plugged in | EV charge | Preparing to Finishing: yes; Available: no; others: unknown |
| Error | binary sensor | 1 when a bit of the error register is set |
| Stopped over Modbus | binary sensor | IF_START reads 0 |
| Fallback limit applied | binary sensor | the charger applies its fallback limit (see below) |
| Charging power | energy sensor, W | |
| Current and voltage L1, L2, L3 | energy sensor, A and V | a phase at 0 V (not connected) is left unknown |
| Energy meter | energy sensor, index (kWh) | the lifetime energy of the charger, guarded (below) |
| Energy of the session | EV charge, kWh | |
| Current limit set | EV charge, A | register 1000 |
| Stop / Start charging | buttons | see below |
| Charging current | selection, 6 A to the ceiling | see below |
A value that is implausible or not read is left unknown, never published as 0 or as an old value. If the alarms block does not answer, the other values are published all the same (the status lists what was not read). A charger with two connectors (Delta) is one device: NexBlue's map gives values for the charger, not per connector.
Energy meter
Gladys counts every rise of an index as consumption. So the meter is never published at 0, and a drop (reset, charger replaced) or a jump larger than the charger can draw (25 kW) is held back: nothing is published for it, the status says so with its values, whatever the time. If it is real, press Accept the held index: the first press shows it, a second press 3 s to 5 minutes later accepts exactly that value.
Stop charging
Stop charging writes IF_START (register 1006) to 0. It does not depend on the option, nor on the value sent by the button, a read in progress (it ends it), a command waiting (it goes first; the commands clicked before it and not sent yet are dropped), a failed read, a backoff, an unknown order of the 32-bit values, nor a configuration Gladys cannot read yet (it then goes to the charger of the last read).
The stop answers an error only in these cases:
- no address is known (none in the configuration, or the configuration cannot be read and no charger was ever read);
- the charger cannot be reached for 3 s (connection tried again every 250 ms): "could not leave yet", the stop is kept and tried again every 15 s;
- the charger refuses the write (under OCPP control, for example): kept and written again every 15 s, the status says so;
- it was sent but the read back does not show it yet: "sent, without confirmation".
A stop not seen applied is kept in /data, one per charger (also across a
restart: it is written again at the start, before anything else, even when
/data is slow to read) and checked every 15 s: written again while the
charger shows IF_START 1, an unknown value or nothing (IF_START holds only 0
or 1: any other value read counts as unknown). It is let go only when
the charger it was sent to shows IF_START 0, or when a newer Start clicked
in Gladys left for that same charger. It is never let go by time, nor because
it could not leave (charger down, /data stuck).
NexBlue says the values of these registers are lost when the charger loses power: after a power cut, a stop already seen applied is not written again by Gladys.
Start and current
Off by default. With Allow start and current on, Gladys may:
- Start charging: writes IF_START to 1 (nothing is sent when it already reads 1 and no stop is held);
- set the charging current: 6 A up to the configured ceiling, never above 32 A nor above the Max Charging Current the charger gives (register 136), read in the same connection as the write. When 136 cannot be read, or reads under 6 A (0 included), nothing is written (never 32 A by default). Gladys never writes the current below 6 A: use Stop charging.
Before each command Gladys reads, in the same Modbus connection, the serial number (another charger, or one that cannot be read, refuses the command), IF_START and the current limit. It refuses while a stop is being sent, checks the option and the configuration again right before the write, and confirms only by a read back showing the value asked. Otherwise it says "sent, without confirmation" (check in a few seconds) or "nothing sent". Commands go one at a time, in their order of arrival; one waiting its turn starts within 15 s or not at all.
The current is written again: fallback limit
NexBlue's charger keeps a current set over Modbus only while it keeps receiving it: when no current limit is written within its fallback timeout (register 1004, 30 s to 30 minutes, 5 minutes by default), it applies its fallback limit (register 1002, set in the NexBlue app) until the next write. So once you set a current from Gladys, Gladys writes it again with every read, and reads the charger every third of that timeout, counted from the start of each read (every 10 s at the most often; 10 s while the timeout is unknown or outside 30 s - 30 min); a failed read is tried again within 5 s. Each rewrite is checked against the Max Charging Current (136) and the date read in the same connection: 136 not read that time, or the date not confirming the order, skips that write. While a stop is held for the charger, the current is not written again. The status shows it.
Gladys stops writing it again, and the charger then applies its fallback limit at the end of its timeout, when:
- "Allow start and current" is turned off, or the ceiling is lowered below that current;
- the Max Charging Current read (136) is below that current, or under 6 A;
- the address or the unit id changes;
- the charger shows another limit set elsewhere (the NexBlue app) while its fallback is not active;
- the integration or Gladys restarts (the current set is not kept: set it again).
While the charger cannot be reached, nothing reaches it either: it applies its fallback limit at the end of its timeout, and Gladys writes the current again at its first read that succeeds.
Set the fallback limit in the NexBlue app to the current you want when Gladys is not there. Gladys never writes the fallback limit nor the timeout. Phase switching is not handled.
Data kept
/data/nexblue-state.json (readable by the integration only): the time of the
last read, the charger of the last read, its serial number and model, the
order of its 32-bit values (with the serial number it was found on), the stops not seen applied and the guard of the
energy meter. No password, no personal data.
Configuration settings
These are the settings NexBlue asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Your NexBlue charger | section | No | Shows your NexBlue charger (Edge 2, Edge Max, Point 2 from firmware 03.09.88; Delta, Delta Max from 03.08.59) in Gladys over Modbus TCP on your local network, without any cloud: state, vehicle plugged in, power, current and voltage per phase, energy meter, energy of the session. In the NexBlue app, turn "Modbus TCP" on in the charger settings; give the charger a fixed address, enter it below, save, then add it from the Discovery tab. Stopping the charge is always possible; starting it and the charging current only if you allow them below. A current set from Gladys is written again regularly: if Gladys stops, the charger applies its fallback limit. Modbus TCP has no password: keep the charger on a trusted network. Under OCPP control the charger refuses start and stop over Modbus. Never tested with a real device. Not affiliated with NexBlue. |
| IP address of the charger | string | Yes | An IPv4 address or a host name (Modbus port 502 unless you add one, for example 192.168.1.60:502). |
| Modbus unit id | number | No | The unit id of the charger, 200 unless changed in the NexBlue app (1 to 247). |
| Allow start and current | boolean | No | Off by default. On: Gladys may start the charge and set the charging current (6 A up to the ceiling below), and then writes that current again regularly. Off: these commands are refused and nothing is written again (the charger then applies its own fallback limit at the end of its fallback timeout). Stopping the charge never depends on this option. |
| Highest charging current (A) | number | No | The highest current Gladys may set, 6 to 32 A (16 by default). The charger also applies its own maximum (read over Modbus) and the limit of its installation. |
| Refresh interval (s) | number | No | How often the charger is read, in seconds. While a current set from Gladys is kept, the charger is read and that current written again at least every third of its fallback timeout (10 s at the least). |
| Language of the feature names | select | No | Used for the names of the device and features added from now on, the status and the command errors. |
How to install NexBlue in Gladys
- In Gladys, open Integrations: NexBlue appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/lm1lc3n7/gladys-nexblue:0.1.1), 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/LM1LC3N7/gladys-nexblue.
NexBlue 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
NexBlue 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 LM1LC3N7, 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