Skip to content

PHOL-LABS/diginext_utils

Repository files navigation

DigiNext-Utils — Utilities for Digifiz Next Units

Real-time PC connection to a Digifiz Next cluster. Streams live data over WebSocket and renders a desktop dashboard with smooth, high‑contrast gauges.

Overview

DigiNext-Utils is a small, focused toolkit that lets you:

  • Connect a PC to a Digifiz Next unit over Wi‑Fi
  • Read cluster telemetry in real time (RPM, speed, temperatures, fuel, etc.)
  • Visualize data on your computer using a responsive Pygame dashboard

Under the hood, the app opens a WebSocket connection to the cluster (default ws://192.168.4.1/ws) and continuously draws the latest values on a pixel‑perfect layout.

Features

  • Real-time data streaming via WebSocket
  • Clean dashboard UI rendered with Pygame
  • Windowed or fullscreen display modes
  • Simple, dependency‑light Python codebase

Requirements

  • Python 3.8+ (Windows, macOS, or Linux)
  • Python packages: pygame, websocket-client
  • A Digifiz Next unit reachable at 192.168.4.1 (default AP) or a reachable IP of your choice

Optional (Linux): SDL libraries for Pygame. On Debian/Ubuntu, if you run into build issues:

sudo apt-get update
sudo apt-get install -y python3-dev libsdl2-dev libsdl2-image-dev \
    libsdl2-ttf-dev libsdl2-mixer-dev libportmidi-dev libfreetype6-dev

Quick Start

  1. Clone and enter the repo
git clone https://github.com/PHOL-LABS/diginext_utils
cd diginext_utils
  1. Create a virtual environment and install deps
  • Windows (PowerShell)
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -r requirements.txt
  • macOS/Linux (bash)
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
  1. Connect your PC to the Digifiz Next Wi‑Fi AP (or ensure the device is reachable on your network) and verify you can ping 192.168.4.1.

  2. Run the dashboard

# Windowed mode (example width)
python main.py --width 1280

# Fullscreen mode
python main.py --fullscreen

The app will attempt to connect to ws://192.168.4.1/ws and begin rendering once data flows.

Configuration

  • WebSocket endpoint: To use a different IP or path, edit main.py:101 and replace ws://192.168.4.1/ws with your endpoint. Example:
ws = websocket.WebSocketApp(
    "ws://10.0.0.42/ws",  # your device IP
    on_open=on_open,
    on_message=on_message,
    on_error=on_error,
    on_close=on_close
)
  • Display size: Use --width <pixels> for a scaled window or --fullscreen to fill the current display.

Repository Layout

  • main.py — Application entry point, CLI, and WebSocket client
  • constants.py — UI constants (colors, font sizes, image paths, layout positions)
  • gauges.py, rpm/, aux_gauge/ — Gauge rendering primitives
  • images/, fonts/ — Assets used by the dashboard
  • variables.py, draw.py — Auxiliary drawing and runtime values

Run the app from the repo root so asset relative paths resolve correctly.

Troubleshooting

  • WebSocket error / no data on screen

    • Ensure your PC is connected to the Digifiz Next AP or the device is reachable on the network
    • Confirm you can ping 192.168.4.1 (or your configured IP)
    • Check firewalls or antivirus that may block WebSocket connections
  • Missing fonts/images

    • Run from the repository root (assets are loaded via relative paths in constants.py)
  • Pygame installation issues

    • Upgrade pip and install system SDL packages (see Requirements) on Linux

Notes

  • Tested with Python 3.8+; other versions may work but are not guaranteed
  • This project is not affiliated with Volkswagen or any other brand
  • Use responsibly and at your own risk, especially while operating a vehicle

Credits

This repository adapts the concept for Digifiz Next units, focusing on a streamlined PC dashboard and real-time data connection.

About

Digifiz Next utils

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors