Blogs

illustrations illustrations illustrations illustrations illustrations illustrations illustrations

ENEA: IoT Telemetry and Reinforcement Learning for Decision Optimization

Published on Nov 23, 2026 by Samer Kharboush on IoT ReinforcementLearning

ENEA: IoT Telemetry and Reinforcement Learning for Decision Optimization

At ENEA I built an end-to-end asynchronous IoT acquisition and telemetry pipeline, then layered prediction and optimization on top of it so the data could drive action rather than just sit in storage.

Overview

The project retrieves, analyses and predicts telemetry data from a fleet of IoT devices, with the goal of using that data to make smart decisions, optimise device performance and provide valuable insights — including energy and consumption control across a building. I owned the full pipeline, from acquisition through the machine-learning and reinforcement-learning layers that turn telemetry into decisions.

Goals

The goal is a closed loop: collect device telemetry reliably, predict future states, decide on actions that improve performance, and learn from the outcome so decisions get better over time. Concretely, the system should forecast future telemetry values, detect unusual consumption patterns and anomalies, and choose device actions (for example, adjusting temperature) that improve performance rather than reacting to a single observation.

My role

I designed and built the whole system end to end: the asynchronous acquisition layer, the data processing and caching, the prediction and analysis models, the reinforcement-learning decision model, and the scheduling and output generation that tie it together.

Architecture

The architecture is a pipeline with a feedback loop:

  1. Data retrieval — telemetry is pulled from IoT devices over HTTP with asynchronous requests, rate limiting, SSL handling and retries on failure, so bursts and slow devices do not block collection or lose samples.
  2. Data processing — retrieved data is filtered, structured and cached to avoid redundant requests, then stored for analysis.
  3. Machine-learning models — a neural-network regression model predicts telemetry values; a regression prediction model (random forest and gradient boosting) forecasts future telemetry from device and weather features; a consumption-analysis model uses K-means clustering to find consumption patterns, Isolation Forest for anomaly detection, and PCA for visualisation.
  4. Reinforcement learning — a DQN agent chooses device actions from the current telemetry and device state, with rewards based on how well actions improve performance; it balances exploration and exploitation and keeps learning from feedback.
  5. Decision output — predictions, decisions and feedback are emitted as structured JSON, and a scheduler runs retrieval and decision tasks periodically.

Tech stack

Python with aiohttp and a rate limiter for asynchronous acquisition, Pandas for processing, scikit-learn for regression, clustering and anomaly detection, TensorFlow/PyTorch for the neural network and DQN, and a scheduler for periodic runs. The exact client deployment details are private.

Results & achievements

No public metrics are published for this client system, so results are stated as delivered capabilities. The delivered system provides reliable asynchronous telemetry collection; regression and clustering models that understand normal behaviour and group similar devices; anomaly detection; and a DQN reinforcement-learning layer that improves decisions sequentially from feedback. It produces per-device predictions, decisions and feedback in a structured output, supports periodic automatic runs, and is designed to scale to more devices and to real-time and edge processing. The private repository is available on request.

No public repository; the ENEA code is private and available on request.

Similar Stories