Skip to content
← All projects

Anomaly detection · Streaming

Smart Environmental Monitor

Live anomaly detection on simulated sensor readings with an Isolation Forest, streamed over WebSocket.

Status
Prototype
Role
Personal project
Year
2026

Overview

A streaming prototype: simulated readings are scored by an Isolation Forest as they arrive and broadcast to every open dashboard.

Problem

A monitor has to flag unusual readings as they arrive, without labelled examples of every failure.

Objectives

  • Unsupervised anomaly detection.
  • Live streaming to dashboards.

My role and contributions

Personal project

  • Built the simulator, model, API and dashboard.

Technical architecture

Drawn from the project's real components, in the order data moves through them.

  1. Simulated sensor

    temperature · humidity · AQI

  2. Isolation Forest

    120 trees · 2,000 samples

  3. FastAPI

    WebSocket /ws · REST

  4. Dashboard

    canvas chart

Technology stack

PythonFastAPIscikit-learnNumPyWebSocketsJavaScript

Implementation details

Model
scikit-learn IsolationForest (n_estimators=120, contamination=0.05) trained on 2,000 normal readings.
Streaming
Readings broadcast over WebSocket at /ws, with /api/readings and /api/health.

Screenshots and demonstrations

Screenshots for this project are being prepared.

Results and evaluation

  • Working prototype on simulated data.

Limitations

  • Simulated sensor data only.

Future improvements

  • Connect a real sensor.

Next project

Tassili.ai