Skip to main content

Batteries /api/batteries

P1 Meter
Requires Firmware 6.0200 or later (in beta)
Energy Socket
Not supported
Energy Display
Not supported
kWh Meter
Requires Firmware 5.0000 or later (in beta)
Water Meter
Not supported
Plug-In Battery
Not supported

See Supported Devices for more information.

The /api/batteries endpoint can be used to retrieve information about the control system of the Plug-In Battery/batteries and allows you to change the control mode.

Parameters

DataTypeAccessDescription
modeStringRead/WriteControl mode of the Plug-In Battery. Can be either zero, to_full, or standby.
power_wNumberRead-onlyCurrent combined power consumption/production of the controlled Plug-In Batteries.
target_power_wNumberRead-onlyTarget power consumption/production of the controlled Plug-In Batteries.
max_consumption_wNumberRead-onlyMaximum allowed consumption power of the controlled Plug-In Batteries.
max_production_wNumberRead-onlyMaximum allowed production power of the controlled Plug-In Batteries.

Mode

The group of connected batteries can be controlled in three different modes:

  • zero - The Plug-In Battery will try to keep the power consumption/production of your home at zero. This means that the Plug-In Battery will charge or discharge to maintain a net-zero power balance. This is the default mode.
  • to_full - All connected Plug-In Batteries will be charged to 100%, regardless of the power consumption/production of your home. When all batteries are fully charged, the Plug-In Battery will switch to the zero mode.
  • standby - Batteries will enter standby mode. This means that the Plug-In Battery will neither charge nor discharge.

Examples

Get Battery Group Information

Request
curl https://<IP ADDRESS>/api/batteries \
--insecure \
-H "Authorization: Bearer <TOKEN>" \
-H "X-Api-Version: 2"
Response
https/1.1 200 OK
Content-Type: application/json

{
"mode": "zero",
"power_w": -404,
"target_power_w": -400,
"max_consumption_w": 1600,
"max_production_w": 800
}

Change Control Mode

Request
curl https://<IP ADDRESS>/api/batteries \
--insecure \
-X PUT \
-H "Authorization: Bearer <TOKEN>" \
-H "X-Api-Version: 2" \
-d '{"mode": "to_full"}'
Response
https/1.1 200 OK
Content-Type: application/json

{
"mode": "to_full",
"power_w": 1599,
"target_power_w": 1600,
"max_consumption_w": 1600,
"max_production_w": 800
}