Skip to content

Software Architecture

GiZano edited this page Jan 22, 2026 · 1 revision

Software Architecture

This project integrates Java and Python to create a seamless control and analysis interface.

☕ Java Desktop Application

The User Interface is built with Java 23.

  • WebViewer Component: Connects to ThingsBoard (port 8080) via HTTP. It renders the dashboard exactly like a standard browser.
  • Console Component: Acts as a bridge to the "Python AI Analyzer".
  • Features:
    • Direct browser access button.
    • Theme switcher (Light/Dark).
    • Console toggle (Hide/Show).

🐍 Python AI Analyzer

The intelligence of the system is powered by a local Large Language Model.

Workflow

  1. Data Retrieval: The script asks for the Device ID and fetches historical data from the ThingsBoard database.
  2. User Input: The user selects metrics and time lapse for analysis.
  3. AI Processing:
    • The script connects to the local Ollama instance.
    • It sends a prompt containing the data to Mistral:7b.
    • It asks for specific key aspects (efficiency trends, anomalies).
  4. Output: The LLM's analysis is returned and displayed on the Java Console.

Clone this wiki locally