Skip to main content
Preview: not available yet. The battery and household endpoints are documented ahead of their release. They currently answer 501 Not Implemented, and their contract may still change before release.

Overview

A home battery is rarely alone: it shares a grid connection with pv panels and sometimes a heat pump. That is why the battery API has two levels:
  • Households: a house and all the NOX-connected devices in it, behind its grid connection. It is read-only.
  • Batteries: the individual devices, with their capabilities, schedules and settings.
A household adds no identity to its devices: the device_ids it lists are the same ones the heat pump, pv and battery endpoints return. The NOX Control Package lets NOX Energy optimize your users’ batteries and provides access to:
  • Battery information: capacity, maximum charge and discharge power, discharge limit and supported modes
  • Battery data
    • Current telemetry: state of charge, power and current mode
    • Measured charge and discharge (15 min)
    • Typical charge and discharge: how the battery would have behaved without steering
    • Forecasted charge and discharge planned by NOX Energy, to use in your nominations
  • Household data: current house load and grid power, and the house load forecast
  • Changing battery settings
The Partner Control Package lets you steer the batteries yourself. It provides access to the same battery information, battery data (except the NOX forecast, as NOX Energy does not plan these batteries) and household data, and additionally to:
  • Steering batteries by submitting battery schedules

Getting Started

Prerequisites

  • Valid NOX API key with access to the battery features (see Authentication)

Base URL

All endpoints use the base URL:
  • Sandbox: https://api.sandbox.nox.energy
  • Production: https://api.nox.energy

Core Workflows

All our collection api endpoints use a next_token to paginate through results if the size limit of the response has been reached. To paginate through a response, you can use the next_token received in the response as a query parameter and call the same endpoint with the same parameters again. You can repeat this process until you have received the last page of the response, which is signified by the next_token field becoming null. Pass the next_token back exactly as you received it. A token that was altered or not issued by the API returns a 400. These endpoints also accept an offset query parameter to fetch a page directly: limit=100&offset=200 returns items 201 to 300. Use either offset or next_token in a request, not both. Sending both returns a 400.

1. Getting households and batteries

Fetch the household of a user, then their batteries:
cURL
How the devices are wired (for example whether a pv installation and a battery share one inverter) is handled by NOX Energy and is not exposed. It is reflected in each battery’s allowed_modes, together with the battery model.

Power sign convention

All power values follow one rule: positive means power consumed, negative means power delivered.

2. Battery modes

You steer a battery by asking it to follow a battery mode during a time window: Only modes listed in the battery’s allowed_modes are accepted. The forced modes have state of charge limits. When a limit is reached, NOX Energy takes control and puts the battery in auto for the rest of the schedule entry. The limits do not apply to auto itself.

3. Planning your own battery schedule (Partner Control Package)

To steer a battery yourself, you first need to know what the household will need. Two forecasts give you that, both per 15 minutes in kWh: Subtract the pv production from the house load, quarter by quarter, to get the household’s net load:
  • Net load positive: the household needs energy. The battery can cover it (auto) or keep its energy for a more expensive moment (pause_discharge).
  • Net load negative: the household has a pv surplus. The battery can store it (auto) or leave room for a cheaper moment later (pause_charge).
Combine the net load with your price signals (day-ahead prices, your tariffs, imbalance prices) and the battery’s limits to run your own optimization: The result is a list of time windows with the best mode for each, which you send in the next step.
Python

4. Submitting schedules (Partner Control Package)

Make sure flex_trading is enabled for the battery (see Settings), then send one schedule per battery with POST /devices/battery/schedules. A new schedule for a battery replaces everything previously sent for it. Outside your time windows the battery falls back to auto, and every start_time must be at least 1 minute in the future.
cURL
A 200 means every schedule was accepted. A 207 lists the rejected batteries with a reason and reason_code, for example when the mode is not in allowed_modes or flex_trading is not enabled for the battery.

5. Nominating NOX-optimized batteries (NOX Control Package)

For batteries NOX Energy optimizes, fetch the planned 15 minute charge and discharge with GET /devices/battery/forecast/historical and include it in your nominations, just as you do with the heat pump consumption forecast. The forecast is made every day at a fixed time depending on supplier. Add the house load forecast to nominate the rest of the household’s consumption.

6. Measuring the value of steering

GET /devices/battery/typical-charge-discharge/historical returns a simulated baseline: how each battery would have behaved in auto (pure self-consumption), using the realised pv production and house load. Compare it per 15 minutes with the measured values from GET /devices/battery/charge-discharge/historical to calculate what steering earned.

7. Settings

Battery settings are read with GET /devices/battery/settings and changed with PATCH /devices/battery/settings. Provide a device_id to change one battery, or a user_id to change all batteries of a user. Each battery has four on/off switches in optimization_settings. Together they decide who steers the battery:
  • You steer (Partner Control Package): turn on flex_trading. NOX Energy then follows the schedules you send (step 4).
  • NOX Energy steers (NOX Control Package): turn on one or more of these, they can be combined:
    • dynamic_tariff: NOX Energy charges the battery when day-ahead prices in the user’s country are low and uses the energy when they are high.
    • pv_self_consumption: NOX Energy stores surplus solar energy to use it in the house later, instead of exporting it.
    • imbalance_optimization: NOX Energy also reacts to the imbalance prices of the user’s country.
  • Nobody steers: turn everything off. NOX Energy leaves the battery alone and it stays in auto.
You cannot mix both: turning on flex_trading turns the three NOX switches off, and turning on any NOX switch turns flex_trading off. If you have the NOX Control Package, use the NOX switches and leave flex_trading off.
cURL