Battery Storage · SENEC.Home · JSON API · Node-RED · KNX · 8 min read

SENEC.Home G3 Local JSON API: Battery SOC and Grid Power to KNX

Polling SENEC.Home G3 and V3 Hybrid via the unauthenticated local JSON API on port 7001 — extracting SOC, battery power, house consumption, and grid import/export. Node-RED flow, ioBroker SENEC adapter, and KNX DPT group address mapping for self-consumption automation.

SENEC.Home Local API Overview

SENEC.Home G3 (5/10/15 kWh), V3 Hybrid (5-15 kWh), and V4 all expose a local JSON API at 'http://[senec-ip]:7001/lala.cgi'. This API is unauthenticated and accessible on the local LAN — no cloud dependency. It uses HTTP POST with a JSON body that specifies which data fields to return.

The API predates modern REST conventions: you POST a JSON object with empty string values for the fields you want, and the response returns those fields populated with current sensor readings.

Polling the API: Request Structure

SENEC local API — HTTP POST request and response fields

POST http://192.168.1.200:7001/lala.cgi
Content-Type: application/json

Request body:
{
  "ENERGY": {
    "GUI_BAT_DATA_POWER": "",
    "GUI_BAT_DATA_FUEL_CHARGE": "",
    "GUI_HOUSE_POW": "",
    "GUI_GRID_POW": "",
    "GUI_INVERTER_POWER": "",
    "STAT_STATE": ""
  }
}

Response fields:
  GUI_BAT_DATA_POWER     — battery power (W, float; positive=charging, negative=discharging)
  GUI_BAT_DATA_FUEL_CHARGE — battery SOC (%, float 0.0-100.0)
  GUI_HOUSE_POW          — house consumption (W, float)
  GUI_GRID_POW           — grid power (W, float; positive=import, negative=export)
  GUI_INVERTER_POWER     — PV inverter DC output (W, float; V3 Hybrid and V4 only)
  STAT_STATE             — operating state number (see table below)
STAT_STATEMeaning
0Standby
1Charging
2Fully charged
3Discharging
5Grid charge
14Calibration
16Reserve charge
255Update / offline

Node-RED Integration Flow

Prerequisite: install 'node-red-node-http-request' (built-in) and 'node-red-contrib-knx-ultimate' or standard KNX Classic nodes.

Flow: Inject (30s interval) → HTTP Request node (method POST, URL http://192.168.1.200:7001/lala.cgi, body set from msg.payload — inject sets payload to the JSON string above) → JSON parse → Function node (extract values and route to KNX) → KNX Out nodes.

Node-RED function node — extract SENEC values and send to KNX

const energy = msg.payload.ENERGY;
const soc = parseFloat(energy.GUI_BAT_DATA_FUEL_CHARGE);
const batPower = parseFloat(energy.GUI_BAT_DATA_POWER);
const gridPower = parseFloat(energy.GUI_GRID_POW);
node.send([
    { payload: soc,               topic: "6/4/3" },  // SOC DPT 5.001
    { payload: batPower / 1000,   topic: "6/4/4" },  // Battery kW DPT 9.001
    { payload: gridPower / 1000,  topic: "6/4/5" }   // Grid kW DPT 9.001
]);

KNX group addresses: 6/4/3 (battery SOC DPT 5.001), 6/4/4 (battery power kW DPT 9.001), 6/4/5 (grid power kW DPT 9.001 — negative value indicates export to grid).

ioBroker SENEC Adapter

Install ioBroker adapter 'senec' (iobroker.senec). Configuration: enter SENEC IP address in adapter settings. Adapter polls port 7001 every 10s. Object tree: senec.0.ENERGY.GUI_BAT_DATA_FUEL_CHARGE (number, 0-100), senec.0.ENERGY.GUI_BAT_DATA_POWER (number, W).

KNX binding (ioBroker KNX adapter): bind senec.0.ENERGY.GUI_BAT_DATA_FUEL_CHARGE to GA 6/4/3, DPT 5.001 (write on change, tolerance 1%). Bind GUI_BAT_DATA_POWER / 1000 to GA 6/4/4 DPT 9.001. ETS6 reads KNX group addresses normally — SENEC data appears as standard KNX values.

Self-Consumption Automation Logic

ETS6 logic (MDT Logic Controller): Rule 1 — When SOC (GA 6/4/3) rises above 85%, send '1' to GA 3/2/0 (washing machine KNX socket enable). Rule 2 — When grid export (GA 6/4/5 below -0.5 kW, i.e. exporting more than 500W): send '1' to GA 3/2/1 (dishwasher enable), send 32 to GA 6/0/8 (EV charger current GA, DPT 5.010). Rule 3 — When SOC drops below 20%: send '0' to GA 3/2/0 and GA 3/2/1 (disable flex loads). Reset timer: 30-minute minimum on-time per cycle to prevent short cycling.

V3 Hybrid vs G3 Differences

SENEC.Home V3 Hybrid integrates a hybrid inverter — GUI_INVERTER_POWER is available (PV DC power). G3 is AC-coupled and does not have this field; poll the PV inverter separately (e.g. SMA Sunny Boy Modbus TCP port 502 unit 3 AC power register 30775). V4 hybrid: same API endpoint, additional fields for multistring inverter. All SENEC generations use identical HTTP POST endpoint and JSON field names.

SENEC.Home firmware note: from firmware 3.11 onwards, SENEC introduced encrypted field values in some API responses (values returned as hex strings). The GUI_BAT_DATA_FUEL_CHARGE and GUI_BAT_DATA_POWER fields typically remain unencrypted. If you encounter non-numeric values in the response, check the SENEC community decoder library (senec-lala-cgi-decoder on GitHub) for the current encryption handling.

Need a KNX panel with SENEC battery integration built to spec?

We configure Node-RED and ioBroker SENEC adapters, design KNX group address schemes for self-consumption automation, and deliver fully tested panels with documentation for your site.

Request a quote →
Loading...
Back to top