Engineering#Enertex#EibPC#Logic#Programming#Automation

Enertex EibPC KNX Logic Server: Advanced Automation Beyond ETS6

SmartMāja Engineering Team·2027-06-25·8 min read

The Enertex EibPC is a DIN-rail mounted Linux server designed exclusively for KNX building automation scripting. Where ETS6 logic blocks cover simple AND/OR/threshold conditions, the EibPC handles complex multi-device automation: polling Modbus TCP registers from solar inverters and heat pumps, running state machines for building operating modes, and executing time-triggered scripts with conditional logic. This article covers the EibScript language fundamentals, practical PV self-consumption scripting, building mode state machines, and a comparison with alternative KNX logic platforms.

EibPC Hardware and Connectivity

The EibPC (current generation: EibPC-26) occupies 3 DIN rail modules (approximately 54 mm width). Interfaces: KNXnet/IP built-in with four simultaneous tunnelling connections plus KNX IP routing (multicast), two RJ45 Ethernet ports (one LAN, one optionally isolated), four RS-232/RS-485 serial ports (configurable per port), USB for configuration backup, and a microSD slot for extended logging storage. The EibPC runs a real-time Linux kernel and the EibServer process, which executes compiled EibScript programmes. No PC is required during normal operation — the EibPC runs autonomously and persists its programme in flash storage through power cycles.

The Modbus TCP master function supports polling up to 64 Modbus TCP devices simultaneously, with individual poll intervals per device (minimum 1 second). This is sufficient for polling a solar inverter, heat pump gateway, and weather station in a single EibPC installation.

EibStudio IDE and EibScript Language

EibStudio is a Windows application (free download from Enertex) that connects to the EibPC over the network. EibScript is a Pascal-like compiled language with built-in KNX and Modbus functions. The programme structure is: VARIABLE declarations, INITIALISATION block (runs once on start), and EVENT blocks (run on GA change or on timer tick).

Reading a KNX GA value uses the KNX_Read function: the expression KNX_Read(GA(8,1,0)) returns the current cached value of group address 8/1/0. The EibPC maintains a local cache of all GA values received on the KNX bus, so this call is non-blocking.

Writing to a KNX GA uses KNX_Write: the statement KNX_Write(GA(11,0,0), 1, DPT1) sends the value 1 to GA 11/0/0 as DPT 1.001 (1-bit boolean). DPT specifiers available: DPT1 (1-bit), DPT5 (1-byte unsigned), DPT9 (2-byte float), DPT14 (4-byte float), DPT13 (4-byte signed int).

Reading a Modbus TCP register uses MODBUS_READ_TCP: MODBUS_READ_TCP(IP('192.168.1.50'), 502, 3, 40083, 1) reads function code 3 (read holding registers), starting at register 40083, reading 1 register, from device at 192.168.1.50 port 502. The return value is the 16-bit register content as an integer.

Practical Example: PV Self-Consumption Script

The following script runs every 10 seconds via a TIMER(10) event block. It reads the SMA Sunny Tripower AC power from Modbus register 40083, reads the house base load from a KNX GA (connected to a smart meter), computes surplus, and controls the heat pump SG Ready relay.

VARIABLE: PV_power: INTEGER; House_load: INTEGER; PV_surplus: INTEGER; SG_Ready_S2_GA: GA := GA(8,4,2).

In the TIMER(10) EVENT block: PV_power := MODBUS_READ_TCP(IP('192.168.1.50'), 502, 3, 40083, 1); House_load := KNX_Read(GA(9,0,4)); PV_surplus := PV_power - House_load; IF PV_surplus > 3000 THEN KNX_Write(SG_Ready_S2_GA, 1, DPT1); ELSE KNX_Write(SG_Ready_S2_GA, 0, DPT1); END_IF.

This script executes entirely on the EibPC without requiring any intermediate gateway, and handles the complete logic including the Modbus poll, arithmetic, and KNX write in a single coherent programme.

Building Mode State Machine

The EibPC excels at state machine logic. A building can be in one of four modes: Home, Away, Night, Vacation. Transitions are driven by KNX events: key switch GA (GA 0/1/0, DPT 5.010), presence detection override (GA 0/1/1), time-of-day timer, and mobile app write (via KNXnet/IP from an IP-Symcon rule).

In EibScript, a state variable (BUILDING_MODE: INTEGER, range 0-3) is evaluated in GA_CHANGE and TIMER EVENT blocks. When BUILDING_MODE changes to value 1 (Away), the script writes a block of KNX GAs in sequence: HVAC away setpoints (GA 5/1/3, scene 2), all lighting scenes off (GA 4/0/0 through GA 4/0/7, value 0), blinds fully closed (GA 3/0/0 through GA 3/0/5, value 255), and presence simulation timer (GA 0/2/0, enable). This atomic multi-GA write is more reliable than an ETS6 scene, which sends sequential KNX telegrams with no error handling if one GA fails to acknowledge.

Enertex KNX IP Router 4.0

Large installations with multiple KNX software tools (ETS6, ARISTO BewO, IP-Symcon, remote monitoring) require a KNX IP router that supports more than the standard 1-2 simultaneous tunnelling connections. The Enertex KNX IP Router 4.0 provides 4 simultaneous tunnelling connections on a single DIN-rail device, plus IP routing (multicast). For installations where EibPC, BewO, and a commissioning engineer's ETS6 need to connect simultaneously, this router eliminates the conflict that arises with standard single-tunnel routers.

Platform Comparison: EibPC vs IP-Symcon vs Home Assistant

EibPC costs approximately €650 and offers purpose-built KNX integration, 4-tunnel router, Modbus TCP master for 64 devices, high reliability (no general-purpose OS overhead), and professional programming via EibScript. Weakness: Windows-only IDE, no cloud integration, small community. IP-Symcon costs €200 (software licence) plus a Windows server or NUC (€300-500 hardware), supports KNX, Modbus, MQTT, and over 200 other protocols, has a larger community, and features a web-based UI builder. Weakness: general-purpose OS, higher maintenance, less deterministic timing. Home Assistant is free software (runs on Raspberry Pi 4, ~€80), has a huge community and vast integrations, supports KNX via knxd, and offers a polished UI. Weakness: not suitable for commercial installations requiring guaranteed uptime; KNX integration less mature than EibPC; no native Modbus TCP master polling.

Commissioning EibPC

Upload the compiled EibScript programme from EibStudio via the network. Use the EibPC web interface (port 80) to monitor GA traffic in real time — this shows all KNX telegrams received and sent by the EibPC. Test Modbus polling by checking the EibPC web interface variable monitor: PV_power should update every 10 seconds with the current inverter output. Common pitfalls: wrong Modbus unit ID (SMA default is 3, not 1), two Modbus TCP masters on the same network polling the same device with conflicting timing causing TCP connection errors (solved by increasing poll interval or using a Modbus TCP proxy), and EibScript integer overflow on energy accumulation counters (use LONGINT type for counters that will exceed 32767 within the installation lifetime).

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