Skip to main content

Solakon ONE smart home integration, free and open source

Solakon ONE integration for Gladys Assistant

Solakon ONE plug-in battery over local Modbus TCP: solar, battery, output, energy; optional control.

This integration shows a Solakon ONE plug-in (balcony) battery in Gladys, read on your local network through Modbus TCP (port 502), without any cloud. It can also control it, only if you allow it.

Never tested with a real device. It was built from the register map the manufacturer publishes in its own Home Assistant integration (solakon-one-homeassistant 1.7.0) and tested against a simulated device. Unofficial, not affiliated with Solakon.

Before you start​

  1. Enable Modbus TCP on the Solakon ONE (Solakon app or the device's settings) and give it a fixed IP address on your router.
  2. Modbus TCP has no password: anyone on your network can read and control the device. Keep it on a trusted network (no port forwarding to the internet).

Configuration​

FieldMeaning
IP addressThe address of the Solakon ONE, port 502 unless you add one (192.168.1.70:502).
Modbus unit idUsually 1.
Allow the controlOff by default: see "Control" below.
Duration of a forced mode1 to 60 minutes (15 by default), written to the timer of the device before every forced charge or discharge.
Refresh intervalSeconds between two reads (30 by default, 10 at least).
LanguageNames of the device and features added from now on, status and errors.

Save, then add the device from the Discovery tab. The device is keyed on its serial number (read at every read): if another Solakon ONE answers at the address one day, it shows as another device, and the commands sent to the first one are refused. Without a readable serial number nothing is published (the status says so).

The Test the connection button reads the device once, never sooner than the refresh interval after the last read (it then shows the last result).

What you get​

FeatureGladys categoryNote
Battery levelbattery storage, %
Battery charge / discharge powerbattery storage, Wboth >= 0 (the device gives one signed value: > 0 discharges)
Solar powerenergy production, W
Solar energyenergy production, index (kWh)lifetime counter
Battery charged / discharged energybattery storage, index (kWh)lifetime counters, battery side
Energy delivered on AChome output, index (kWh)lifetime counter
AC power at the plugenergy sensor, W, signedthe manufacturer does not document its sign: shown as the device gives it
AC voltage, EPS output power, device temperaturewhen the device gives them
Control modeselectionautomatic, forced charge, forced discharge, other (set by another tool)
Forced charge/discharge power (W)numberthe power of a forced mode
Forced mode time leftduration, minutesthe timer of the device
Minimum / maximum state of charge (%)number
EPS outputselectiondisabled, EPS, UPS

A value that is implausible or not read is left unknown, never published as 0 or as an old value. If the energy counters or the settings do not answer, the other values are published all the same (the status lists what was not read); after 3 failures in a row such a block is skipped for 10 reads.

Energy counters​

Gladys counts every rise of an index as energy. So the counters are never published at 0 (a counter that does not count), and a drop (reset, device replaced) or a jump larger than the device can move is held back: nothing is published for that counter, the status says which one and its values, whatever the time. If it is real, press Accept the held counters: the first press lists them, a second press within 2 minutes accepts exactly the values listed (a counter that moved in between is not accepted). The other counters go on.

Control​

Off by default. With Allow the control on, Gladys may:

  • force a charge or a discharge (control mode). Before the mode, it always writes the timer of the device (the duration of the configuration): at its end the device goes back to automatic mode by itself, even if Gladys is down. Clicking the same forced mode again writes the timer again. A forced power above 800 W is lowered to 800 W before a discharge;
  • set the forced power (whole watts): 800 W at most while a discharge is forced or may be (another remote mode set elsewhere, mode unknown), 1200 W at most otherwise. These are the limits of the manufacturer; the forced power is written to both power setpoints of the device, as the manufacturer's integration does;
  • set the minimum and maximum state of charge, 10 to 100 %, the minimum never above the maximum read just before;
  • set the EPS output (disabled, EPS, UPS).

Every command is checked on its arrival and again right before each write (the option, the configuration, a return to automatic mode clicked meanwhile), decided on the values read just before from the device clicked (its serial number), and confirmed only by a read back showing the values asked. Otherwise Gladys says "sent, without confirmation" (check in a few seconds) or "not sent". Commands go one at a time, in their order; a scene setting several values sets them all.

Back to automatic mode (the stop)​

Choosing Automatic in the control mode stops a forced charge or discharge. It does not depend on the option, nor on 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, the bounds, nor a configuration Gladys cannot read yet (it then goes to the device of the last read).

It is refused only when Gladys knows no address at all (none in the configuration, or the configuration cannot be read and no device was ever read). It can fail when the device cannot be reached: the connection is tried again for 3 s, then Gladys answers "not sent yet" and keeps it.

A stop not seen applied is kept (also across a restart: it is written again at the start, before anything else) and checked every 15 s: written again while the device shows the forced mode it replaced, an unknown mode or nothing. It is let go only when the device shows automatic mode, when another forced mode set elsewhere is read twice in a row after the stop was written (a newer choice is respected; a stop not written yet is never let go this way: it is written first, whatever mode the device shows), when you click a forced mode in Gladys (with the option), or when a stop is clicked for another address (after a change of the configuration). It never ends by time; the status says it is held. While a stop is being sent, a forced mode clicked in Gladys is refused.

Not done in this version​

  • The grid export limit, the battery currents, the alarms and the BMS details the device also gives.
  • The energy drawn on AC (charging from the home): not published, its kind of counter is to be confirmed.
  • A real device: the AC power sign, the countdown of the timer, and whether the device keeps the forced power in both setpoints are to be confirmed.

Configuration settings​

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

SettingTypeRequiredDescription
Your Solakon ONEsectionNoShows your Solakon ONE plug-in battery in Gladys through Modbus TCP (port 502) on your local network, without any cloud: battery level, charge and discharge power, solar power, AC power, EPS output, energy counters, control mode. Enable Modbus TCP on the device, enter its IP address, save, then add it from the Discovery tab. Forced charge or discharge, the forced power, the state of charge limits and the EPS output change only if you allow the control below; a forced mode always comes with the timer of the device (it goes back to automatic mode by itself), and Gladys never writes more than 800 W of discharge nor 1200 W of charge. Going back to automatic mode never depends on that option. Modbus TCP has no password: keep the device on a trusted network. Never tested with a real device. Not affiliated with Solakon.
IP address of the Solakon ONEstringYesAn IPv4 address or a host name (port 502 unless you add one, for example 192.168.1.70:502).
Modbus unit idnumberNoThe Modbus device id of the Solakon ONE: usually 1.
Allow the controlbooleanNoOff by default. On: Gladys may force a charge or a discharge, set the forced power (800 W of discharge, 1200 W of charge at most), the minimum and maximum state of charge (10 to 100 %) and the EPS output. Off: these commands are refused. Going back to automatic mode never depends on this option.
Duration of a forced mode (min)numberNoWritten to the timer of the device before every forced charge or discharge, 1 to 60 minutes (15 by default): at its end, the device goes back to automatic mode by itself, even if Gladys is gone.
Refresh interval (s)numberNoHow often the Solakon ONE is read, in seconds.
Language of the feature namesselectNoUsed for the names of the device and features added from now on, the status and the command errors.

How to install Solakon ONE in Gladys​

  1. In Gladys, open Integrations: Solakon ONE appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/lm1lc3n7/gladys-solakon:0.1.1), 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/LM1LC3N7/gladys-solakon.

Solakon ONE 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​

Solakon ONE 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.

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 🙂