Skip to main content

REST/JSON - Read/Write Access

Query values via HTTP

With the REST/JSON interface you query your SOLIO's values with simple HTTP requests, for example from a smart home hub, your own script or a spreadsheet. With write access you can also set the power of your battery.

For professionals

This page is intended for technically experienced users, installers and developers. You do not need this interface for normal use of your SOLIO.

What do I need this for?​

REST/JSON is the usual way for web services and programs to exchange data. The responses come in the JSON text format and can easily be processed in almost any programming language. Typical uses:

  • A smart home hub displays the battery's state of charge or switches devices depending on the solar surplus.
  • Your own script regularly writes readings to a database or spreadsheet.
  • An external system sets the charging or discharging power of the battery (write access).

The interface only works in the local network. For access via the internet there is the Customer API.

Requirements​

  • The querying device is in the same network as the SOLIO and can reach its IP address directly.
  • You know the IP address of the SOLIO, for example from your router's device list.
  • You know the password for logging in to the SOLIO. By default this is user for guest access and owner for owner access. If you have changed the passwords, your own ones apply. See Changing the password on the SOLIO.

Read access​

Read access is included as standard. The REST/JSON reading app is installed in the App Center for this.

Address and login​

Every value has an address made up of component and channel, for example _sum/EssSoc for the state of charge. It is queried like this:

http://<IP>/rest/channel/<component>/<channel>

For a SOLIO with the address 192.168.178.30, the request for the state of charge is therefore:

http://192.168.178.30/rest/channel/_sum/EssSoc
  • Method: GET
  • Login: HTTP Basic Authentication. As user name you can use guest or owner, or any placeholder such as x; what counts is the password.
  • Port: 80, you do not need to specify it.
It usually does not work in the browser

Browsers usually do not send credentials from the address bar, so you will normally get an error message there. For tests, use a tool such as curl, Python or an API client that sends the credentials as an Authorization header.

The response​

{"address":"_sum/EssSoc","type":"INTEGER","accessMode":"RO","text":"","unit":"%","value":99}
FieldMeaning
addressAddress of the value
typeData type, e.g. INTEGER
accessModeRO read only, RW read and write, WO write only
unitUnit
valueThe current value, here 99 %

You can also use search patterns (regular expressions) for component and channel. For example, _sum/.* returns all sum values at once; the response is then a list.

Important values​

In principle you can read all channels of your SOLIO. The most important sum values:

AddressDescriptionUnit
_sum/StateSystem state (0: Ok, 1: Info, 2: Warning, 3: Fault)
_sum/EssSocBattery state of charge%
_sum/EssActivePowerBattery power, negative = charging, positive = dischargingW
_sum/GridActivePowerGrid power, negative = feed-in, positive = purchaseW
_sum/ProductionActivePowerTotal generationW
_sum/ProductionAcActivePowerGeneration ACW
_sum/ProductionDcActualPowerGeneration DCW
_sum/ConsumptionActivePowerConsumptionW
_sum/EssActiveChargeEnergyBattery charge energyWh
_sum/EssActiveDischargeEnergyBattery discharge energyWh
_sum/GridBuyActiveEnergyGrid purchase energyWh
_sum/GridSellActiveEnergyGrid feed-in energyWh
_sum/ProductionActiveEnergyGeneration energyWh
_sum/ConsumptionActiveEnergyConsumption energyWh
_sum/EssActivePowerL1 … L3Battery power per phaseW
_sum/GridActivePowerL1 … L3Grid power per phaseW
_sum/ProductionAcActivePowerL1 … L3Generation AC per phaseW
_sum/ConsumptionActivePowerL1 … L3Consumption per phaseW

Example with curl​

curl is already installed on Windows 10 and 11, macOS and Linux. The command is the same everywhere:

curl -u x:user http://192.168.178.30/rest/channel/_sum/EssSoc

The response appears directly in the window. The state of charge is in the value field.

Example with Python​

Using the requests library:

import requests

url = "http://192.168.178.30/rest/channel/_sum/EssSoc"

response = requests.get(url, auth=("x", "user"))
response.raise_for_status()

print(response.json()["value"]) # e.g. 99

Example with an API client​

In an API client such as the Chrome plug-in Talend API Tester, enter the address and add an Authorization header with Basic Authentication.

API client with GET request and JSON response containing the state of charge
GET request with Authorization header. The value field contains the state of charge.

Write access​

With write access you set the active and reactive power of the battery. It is not included as standard but can be enabled at any time with the REST/JSON write access app. Please contact us.

  • Method: POST to the same address as for reading, for example http://<IP>/rest/channel/ess0/SetActivePowerEquals
  • Body: JSON with the field value, for example {"value": 5000}
  • Login: at least with the owner password (owner by default). Writing is not possible with guest access.
  • Sign: negative values charge the battery, positive values discharge it.

Timeout​

A setpoint only applies for the duration of the timeout, 60 seconds by default. A new value replaces the old one. If no new setpoint arrives within this time, your SOLIO's normal control takes over again, for example self-consumption optimisation. So send the value again regularly.

Writable channels​

AddressMeaningUnit
ess0/SetActivePowerEqualsActive power setpointW
ess0/SetReactivePowerEqualsReactive power setpointvar
ess0/SetActivePowerLessOrEqualsMaximum discharge power setpointW
ess0/SetReactivePowerLessOrEqualsMaximum reactive power setpointvar
ess0/SetActivePowerGreaterOrEqualsMaximum charge power setpointW
ess0/SetReactivePowerGreaterOrEqualsMinimum reactive power setpointvar

ess0 stands for the battery or battery cluster of your system. The battery's limits still apply, so the actual power may differ from the setpoint.

Example: discharging at 5 kW with Python​

import requests

url = "http://192.168.178.30/rest/channel/ess0/SetActivePowerEquals"

response = requests.post(url, json={"value": 5000}, auth=("x", "owner"))
response.raise_for_status()

The same with curl:

curl -u x:owner -H "Content-Type: application/json" -d "{\"value\": 5000}" http://192.168.178.30/rest/channel/ess0/SetActivePowerEquals

You can check whether the setpoint takes effect in the portal under Storage system or with a GET request on _sum/EssActivePower.

API client with POST request to SetActivePowerEquals and response 200 OK
POST request in the API client. The response 200 OK confirms that the value was accepted.
Protect your credentials

Anyone who knows the owner password and can reach your home network can control the battery. Change the default password and never open the interface to the internet.