EDGE AICustom MLTF Lite · ONNX RuntimeDistributionMulti-process · EventBusEdge DevicesCharger · Inverter · ESSOCPP 1.6 / 2.1 · SLCP · Modbus · CANQt 6.5+C++17

Edge Framework

AI at the edge, on every device

Plugin-based edge framework with on-device inference. Any hardware that connects to the grid runs Electra — chargers, inverters, ESS, meters.

Core Stack

LanguageC++17 · QML · Python
FrameworkQt 6.5+ LTS
AI RuntimeTF Lite · ONNX
ProtocolOCPP 1.6 / 2.1

Layers

UIQt Quick · Voice
CoreState Machine
ServiceOCPP · V2G
HALRFID · PLC · CAN

Architecture

6-Layer Architecture

UI → Core → Service → Protocol → Edge AI → HAL. Upper layers call lower layers; lower layers notify upper layers via events/signals only.

UI
gui-app

Qt Quick/QML touch UI. Voice input, audio controller, and AI agent are optionally activated. Charging sessions survive GUI crashes.

Qt QuickVoice InputAudio ControllerUI ComposerAI Agent
Core
app-core

State machine-based charging session management. ProcessManager and DeviceHalManager orchestrate lower layers. Communicates with UI via QLocalSocket IPC.

AppCoreState MachineProcessManagerDeviceHalManagerSouthBoundInterface
Service
on-demand

Local load balancer as on-demand process. Activated only when needed. Distributes charging sessions across multiple connectors.

LocalLoadBalancer
Protocol
mixed

OCPP 1.6/2.1 client (always-on). DR Handler and V2G Agent are on-demand processes for DR events and ISO 15118 V2G sessions.

OCPP ClientDR Handler (on-demand)V2G Agent (on-demand)
Edge AI
on-demand

EdgeAIBrain — on-device ML inference and anomaly detection. Real-time analysis with TF Lite & ONNX Runtime, no server required. Activated on demand.

EdgeAIBrainTF LiteONNX RuntimeAnomaly Detection
HAL
separate

Hardware Abstraction Layer. RFID, PLC, CAN, Payment controllers are isolated as separate processes. GPIO/Power are internal to app-core. Supports all hardware platforms.

RFID ControllerPLC ControllerCAN ControllerPayment ControllerGPIOPower Controller

Process Model

10 Always-On + 4 On-Demand Processes

Charging sessions survive GUI crashes. Independent per-process updates supported.

10
always-on
4
on-demand

Design Principles

Architecture Principles

Plugin-First Design

All major features implemented as plugins. Selective activation via config change only. Create product variants without code modification.

Process Isolation

Major features run as isolated processes. Failure in one process doesn't affect the whole system. OCPP communication survives GUI crashes.

Qt6 Pure

Minimal external dependencies. Qt6-native features first. QLocalSocket IPC for UI-Core separation. No Boost or Poco.

Hardware Abstraction

HAL layer fully abstracts hardware. Supports RFID, PLC, CAN, IC-card, and more with a unified interface across all hardware platforms.

Tech Spec

Full Technology Stack

LanguageC++17 · QML · Python
UI FrameworkQt 6.5+ LTS
AI RuntimeTF Lite · ONNX Runtime
OCPP1.6-J · 2.1 (WebSocket/JSON)
V2GISO 15118 · Bidirectional
DatabaseSQLite · SQLCipher (Encrypted)
IPCQLocalSocket (Primary) · Shared Memory
CommunicationCAN · Modbus · RFID · PLC

UI Isolation

gui-app has zero dependency on electra-* libraries

All UI ↔ Core communication goes through a single QLocalSocket channel (/var/run/electra/ui.sock). Supports both request/response and event push. UI uses pure Qt only.

/var/run/electra/ui.sockQLocalSocketBidirectionalZero framework deps