Battery Storage#SENEC#Battery Storage#JSON API#Node-RED

SENEC.Home G3 Local API: Connecting Battery Storage to KNX

SmartMāja Engineering Team·2028-01-08·8 min read

SENEC.Home G3 and V3 Hybrid expose a local JSON API at 'http://[senec-ip]:7001/lala.cgi' — unauthenticated, no cloud dependency, no third-party service required. This guide covers polling that API from Node-RED and mapping the results to KNX group addresses for self-consumption automation.

API Request Structure

The endpoint uses HTTP POST with a JSON body listing the fields you want populated. Send an empty string value for each field to request its current reading:

POST to 'http://192.168.1.200:7001/lala.cgi', Content-Type application/json. Body: '{"ENERGY":{"GUI_BAT_DATA_POWER":"","GUI_BAT_DATA_FUEL_CHARGE":"","GUI_HOUSE_POW":"","GUI_GRID_POW":"","GUI_INVERTER_POWER":""}}'. The response returns the same structure with current float values for each field.

Key fields returned: - GUI_BAT_DATA_POWER: battery charge/discharge power in W (positive = charging, negative = discharging) - GUI_BAT_DATA_FUEL_CHARGE: battery State of Charge 0.0-100.0% - GUI_HOUSE_POW: total house consumption W - GUI_GRID_POW: grid power W (positive = import from grid, negative = export to grid) - GUI_INVERTER_POWER: PV DC power W (V3 Hybrid and V4 only — not available on G3 AC-coupled)

SENEC State Codes

STAT_STATE field: 0=standby, 1=charging, 2=fully charged, 3=discharging, 5=grid charge, 14=calibration, 255=offline/firmware update. Monitor this alongside power values to detect abnormal states.

Node-RED Flow

Inject node (30 second interval) sets msg.payload to the JSON request body string. HTTP Request node: method POST, URL 'http://192.168.1.200:7001/lala.cgi'. JSON parse node converts response. Function node extracts values and outputs to KNX:

Function body (no backticks — use single quotes): 'const e = msg.payload.ENERGY; const soc = parseFloat(e.GUI_BAT_DATA_FUEL_CHARGE); const bat = parseFloat(e.GUI_BAT_DATA_POWER); const grid = parseFloat(e.GUI_GRID_POW); node.send([{payload: soc, topic:"6/4/3"},{payload: bat/1000, topic:"6/4/4"},{payload: grid/1000, topic:"6/4/5"}]);'

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 means exporting).

Self-Consumption Logic

MDT Logic Controller rule: when GA 6/4/3 (SOC %) > 85 AND GA 6/4/5 (grid kW) < -0.5 (exporting more than 500 W): activate GA 3/2/1 (dishwasher KNX socket, DPT 1.001 = 1). When SOC < 20: deactivate all flexible loads (GA 3/2/0, 3/2/1 = 0). Add 30-minute minimum on-time to prevent short cycling.

ioBroker Alternative

ioBroker SENEC adapter: install via adapter manager, enter SENEC.Home IP. Adapter polls port 7001 every 10s. Bind 'senec.0.ENERGY.GUI_BAT_DATA_FUEL_CHARGE' to KNX GA 6/4/3 (DPT 5.001) via ioBroker KNX adapter. No Node-RED required.

Need help with your KNX or DALI project?

Our certified engineers can discuss panel design, commissioning, integrations and project-specific edge cases. Free initial consultation.

Contact our engineers →
Ielādējas...
Uz augšu