Skip to content

andreizet66/sentient

Repository files navigation

Sentient Logo

Sentient

Sentient is a lightweight web interface that visualizes data exported from HDD Sentinel.
It's built with FastAPI + React (Vite) and themed to look like a classic green-phosphor CRT terminal.


πŸ–₯️ Desktop Preview

Sentient WebUI - Desktop View

πŸ“± Tablet and Mobile Preview

Sentient WebUI - Tablet View Sentient WebUI - Mobile View


🧩 Features

β€’ Real-time drive usage, status, health, and temperature.
β€’ SMART data reports and historical temperature and health charts.
β€’ Real time storage availability updates, no page refresh needed.
β€’ Color-coded animated warnings for health, temperature, and storage usage.
β€’ Persistent renaming and hiding of drives.
β€’ Full Windows Storage Spaces support (used and available pool space and drives included).
β€’ Self-contained backend + frontend β€” installs dependencies and runs with two Python scripts.
β€’ Supports HDDs and SSDs.
β€’ Displays last WebUI update and last HDD Sentinel data export.
β€’ Smooth animations and transitions.


πŸ’Ύ Drive Cards

Sentient displays drives in the form of Drive Cards. There are four types of cards, each showing custom information depending on their role:

(1) System Drive Card – Displays a badge and is always first. Two buttons expand a SMART report and/or a 24-hour temperature and health history graph with an animated tooltip.
(2) Simple Cards – Show standard information. Two buttons expand a SMART report and/or a temperature and health 24-hour history graph with an animated tooltip.
(3) Storage Pool Drives – Include a custom badge and show space usage. A button at the bottom of the card reveals a list of drives inside the pool (a storage pool does not have health or temperature history).
(4) Pooled Drive Cards – Same as the Simple Cards, minus the drive letter (pooled drives do not get drive letters allocated by Windows).

System Drive and Simple Cards

Sentient WebUI - System Drive Card Sentient WebUI - Simple Drive Card

Storage Pool and Pooled Drive Cards

Sentient WebUI - Storage Pool Card Sentient WebUI - Pooled Drive Card


🎨 Color-Coded Warnings

πŸ’š Health Thresholds

Condition Health % Color Behavior
🟩 Good β‰₯ 100% Green #00ff80 Static
🟨 Warning 80%–99% Yellow #ffff66 Soft yellow pulsing glow
πŸŸ₯ Critical < 80% Red #ff4040 Soft red pulsing glow

🌑️ Temperature Thresholds

Condition Temp Β°C Color Behavior
🟩 Normal ≀ 40Β°C Green #00ff80 Static
🟨 Warm > 40Β°C & ≀ 55Β°C Yellow #ffff66 Soft yellow pulsing glow
πŸŸ₯ Hot > 55Β°C Red #ff4040 Soft red pulsing glow

πŸ’Ύ Usage Bar Thresholds

Condition Used % Color Behavior
🟩 Healthy Capacity < 70% Green #00ff80 Static
🟨 Moderate 70%–89% Yellow #ffff66 Static
πŸŸ₯ Full / Risk β‰₯ 90% Red #ff4040 Static

πŸ™‹β€β™‚οΈ What Is Sentient and Why Does It Exist?

Short Backstory

A few years ago, I got into self-hosting by building a media server. On Ubuntu, I used smartctl to monitor drives, and later discovered Scrutiny β€” an amazing Docker-based SMART monitoring tool with a beautiful WebUI (kudos to the developer!).

Unfortunately, Scrutiny (and smartctl) can’t access drives pooled under Windows Storage Spaces.

That’s where Sentient comes in: not as a replacement for Scrutiny (which in no way could it be, by design), but as a simple XML-driven telemetry dashboard that lets me check drive health and temperature changes β€” even for drives inside a Windows Storage Spaces pool.

What Does It Do?

Sentient ingests data exported on a schedule by the drive health and temperature monitoring tool HDD Sentinel, extracts telemetry data, and displays it in the WebUI.

How Does It Work?

The structure is simple. HDD Sentinel can be configured to export an .xml file at set intervals containing detailed information about all connected storage devices.

That .xml file is then picked up by Sentient, parsed by a Python script, and exposed through a FastAPI backend.
The frontend β€” built with React β€” consumes these API endpoints to generate an interactive dashboard where the data is presented clearly and visually.

So, in short:

Layer Technology Purpose Key File(s)
Backend (API) FastAPI (Python) Reads HDD Sentinel XML β†’ parses data β†’ exposes it via endpoints (e.g., /drives, /history) main.py
Frontend (WebUI) React (JavaScript/JSX) Fetches data from FastAPI β†’ displays cards, graphs, buttons, animations, etc. App.jsx, App.css, plus components in /src/

With one exception πŸ‘‡

Since most of the users will set HDD Sentinel export intervals to 1h and since all of us want to know what used and available space is on our drives now, not one hour ago, Sentient leverages shutil to provide real time updates (no page refresh needed) on storage space availability.

def _bytes_from_drive(drive_letter: str) -> Tuple[Optional[int], Optional[int]]:
    try:
        import shutil
        root = drive_letter
        if not drive_letter.endswith("\\"):
            root = drive_letter + "\\"
        usage = shutil.disk_usage(root)
        return usage.total, usage.free
    except Exception:
        return None, None

Who Is It For?

Mostly for myself.

Very few people self-host services on Windows, and even fewer use Windows Storage Spaces for drive pooling (for good reasons).
That said, plenty of people use HDD Sentinel β€” and some of them might wish it had a better web interface.
It actually does have one, which I was surprised to discover, but it’s unfortunately almost unusable due to its complete lack of design.


βš™οΈ Installation

0️⃣ Prerequisites

  1. HDD Sentinel Pro or Enterprise – required to schedule XML export. Trial and Standard versions do not allow XML export.
  2. Python β‰₯ 3.10 – needed to run the FastAPI backend. Download from python.org or your OS package manager.
  3. pip – usually comes bundled with Python. If missing, run python -m ensurepip in PowerShell.
  4. Git – for cloning or updating the project repo. Get it from git-scm.com.
  5. Node.js β‰₯ 18 – required for building and running the React frontend. Download from nodejs.org.
  6. npm – used to install frontend dependencies (npm install). Installed automatically with Node.js.
  7. Other dependencies are listed in requirements.txt and will be installed automatically (see below).

1️⃣ Clone and Enter the Project

git clone https://github.com/andreizet66/sentient
cd sentient

2️⃣ Ensure the latest_xml Folder Exists

If it’s missing, create it:

mkdir latest_xml

3️⃣ Schedule HDD Sentinel XML Export

  1. In HDD Sentinel, open Configuration β†’ Advanced Options

  2. In the Configuration window:

    • Set Detection frequency to the desired refresh interval. Sentient updates every 30 seconds, so anything higher works.
    • Check Generate and update XML file.
    • Click Select.

  3. In the Save As window, navigate to your cloned sentient folder, choose the latest_xml directory, and save the file as latest.xml.

    • You must name the file latest.xml, or it will be ignored.
    • You must include the .xml extension β€” sometimes HDD Sentinel omits it.
    • You must place the file in the latest_xml folder β€” any other location will be ignored.

4️⃣ Run the Setup Script

python setup.py

This script checks that Python β‰₯ 3.10 is installed and installs all dependencies.

Expected successful output:

=== Sentient Setup ===
Installing dependencies from requirements.txt ...
Collecting fastapi<1.0.0,>=0.120.0
Collecting uvicorn<1.0.0,>=0.38.0
Collecting nodeenv>=1.9.0
...
Successfully installed click-8.1.7 fastapi-0.120.0 h11-0.14.0 nodeenv-1.9.0 starlette-0.37.2 uvicorn-0.38.0

Setup complete! You can now start Sentient with:
   python start.py

▢️ Usage

  1. Start the app:
python start.py

Expected output:

Starting Sentient WebUI ...

INFO:     Started server process [12148]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8332 (Press CTRL+C to quit)
  1. The WebUI is now available at http://127.0.0.1:8332. Keep the terminal window open while Sentient is running.

  2. If port 8332 is already in use, edit start.py and change the port value:

try:
    subprocess.check_call([sys.executable, "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8332"])
except KeyboardInterrupt:
    print("\nStopped.")
  1. To stop Sentient, press CTRL + C.

🍫 Planned Features

I don't have a fixed timeline for these, but they will likely arrive in the coming months:

  • Themes
  • Settings page
  • Custom Drive Card order
  • Option to disable color-coded warnings and/or animations
  • Support for multiple Windows Storage Spaces pools (if requested)

β€οΈβ€πŸ©Ή Known Limitations

Given that we’re working within Windows and relying solely on the data HDD Sentinel provides, there are a few limitations that currently cannot be overcome.

These do not affect typical users with a single storage pool.

  • A drive is listed as a System Drive only if its letter is C:.
  • A drive is listed as a Windows Storage Spaces Pool only if that pool’s letter is P:.
  • Only one Windows Storage Spaces Pool can exist; only the P: pool will be recognized.
  • A drive is listed as part of a Windows Storage Pool only if it has no drive letter.
  • Consequently, the pool card lists all drives without a letter, regardless of which pool they belong to β€” since HDD Sentinel does not expose that relationship.

🧠 Project Structure

sentient/
β”œβ”€β”€ frontend/          # React UI (Vite)
β”‚   └── dist/          # Built frontend served by FastAPI
β”œβ”€β”€ latest_xml/        # HDD Sentinel XML export folder
β”œβ”€β”€ main.py            # FastAPI backend
β”œβ”€β”€ requirements.txt
└── README.md

❌ Disclaimer

I am not a software engineer by trade. This is my first app. Chat GPT was heavily used.


🧩 License

MIT License Β© 2025 Andrei Zamfir

---

About

An XML-driven telemetry web UI dashboard powered by HDD Sentinel, FastAPI and React.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published