Replies: 4 comments 1 reply
-
Here is an example of how my performance dashboard "script" is now working... System Stats Dashboard for Turing Smart ScreenA modular, highly-configurable dashboard for displaying real-time system statistics on Turing Smart Screen devices. Table of Contents
Features
Statistics Displayed
Directory Structure
ArchitectureThe dashboard follows a component-based architecture with clear separation of concerns: Key Components:
Data Flow:
Configuration SystemThe dashboard uses a YAML-based configuration system with fallback defaults. The Configuration File Structurepreferences:
refreshInterval: 0.1 # Screen refresh rate in seconds
brightness: 50 # Display brightness (0-100)
orientation: 'landscape' # Screen orientation
fullRefreshInterval: 5000 # Full screen refresh interval to prevent ghosting
update_intervals:
cpu: 0.2 # CPU stats update interval in seconds
ram: 0.2 # RAM stats update interval in seconds
gpu: 2.0 # GPU stats update interval in seconds
# Hardware monitoring configuration
hardware:
cpu:
enabled: true # Enable CPU monitoring
show_cores: true # Show individual core loads
max_cores_displayed: 16 # Max number of cores to display
gpu:
enabled: true # Enable GPU monitoring
auto_detect: true # Automatically detect GPU devices
# Display and rendering configuration
layout:
font:
path: UPSTREAM_FONT # Font path (special value for JetBrains Mono)
size_normal: 18 # Normal text size
size_small: 16 # Small text size
size_large: 24 # Large text size for headers
char_width: 9 # Approximate character width for positioning
# Comprehensive color customization system
colors:
# Background colors
background: [0, 0, 0] # Black background for all sections
heading_background: [0, 0, 0] # Background for section headers
# CPU section colors
cpu:
header: [255, 255, 255] # CPU STATS header (white)
name: [255, 0, 0] # CPU model name (red)
label: [255, 0, 0] # Labels for CPU stats (red)
value: [255, 255, 255] # Values for CPU stats (white)
bar:
fill: [255, 0, 0] # CPU progress bar fill (red)
outline: [255, 128, 128] # CPU progress bar outline (light red)
# GPU section colors
gpu:
header: [255, 255, 255] # GPU STATS header (white)
name: [0, 255, 0] # GPU model name (green)
label: [0, 255, 0] # Labels for GPU stats (green)
value: [255, 255, 255] # Values for GPU stats (white)
bar:
fill: [0, 255, 0] # GPU progress bar fill (green)
outline: [128, 255, 128] # GPU progress bar outline (light green)
# Similar structure for RAM and system sections
color: [0, 128, 0] # RGB color for GPU elements
auto_detect: true # Automatically detect GPU models
devices: # Manual GPU configuration if auto_detect is false
- {filter: '4090', enabled: true}
- {filter: '4080', enabled: true}
ram:
enabled: true # Enable RAM monitoring
color: [255, 0, 0] # RGB color for RAM elements
system:
show_uptime: true # Show system uptime
show_clock: true # Show system clock
color: [255, 255, 255] # RGB color for system info elements
layout:
background_image: 'background.png' # Background image path
bg_color: [0, 0, 0] # Background color (RGB)
font:
path: '/path/to/font.ttf' # Font file path
size_title: 22 # Title font size
size_normal: 20 # Normal text font size
size_small: 16 # Small text font size
# Progress bar styling
progress_bar:
height: 12 # Bar height in pixels
width: 320 # Standard bar width in pixels
# Section definitions
sections:
- {name: 'cpu_header', position: [10, 10], static: true}
- {name: 'cpu_stats', position: [10, 70]}
- {name: 'ram_stats', position: [10, 0]} # Dynamic position
- {name: 'gpu_stats', position: [420, 40]}
- {name: 'system_info', position: [400, 440]} Configuration Resolution Process
Module Structure
|
Beta Was this translation helpful? Give feedback.
-
20250510_160303.mp4Here is how threading changes the game for performance of the Smart screen! |
Beta Was this translation helpful? Give feedback.
-
I mean come-on. When I configure output level to NONE, even the console is sexy!
|
Beta Was this translation helpful? Give feedback.
-
Making quite a bit of progress to getting this closer to release. Currently, the plan is to create a new GitHub repo for managing Python based Turing screen management leveraging @mathoudebine 's work. I have a config YAML file that you would update with the path to the a cloned version of this repository. I also have created a virtual device leveraging some of @mathoudebine 's virtual screen idea so that you can either run the dashboards on your smart screens or develop/run dashboards against virtual screens. At some point, you will just be able to pick the screen you have, and the dashboard you want to run, and it just works. I have an abstraction layer between the device, the fonts/backgrounds, some canned common utilities to do things like refresh screens, use fixed-length labels, and centering/columns, etc. It is getting fun, folks! Anyway, I'll keep posted and let you know when I release to GitHub. Just be aware that none of it works without this repo! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on a few different dashboards driven by Python scripts. I have created and shared some performance dashboards, and even an Outlook calendar dashboard (recently lost access to my work Outlook on my personal device, so I'm no longer updating that).
Over the last week, I have been developing some dashboards that can be configured with YAML files for preferences. I'm also created some standard python functions that can leverage YAML files for the configuration of the Turing screen. For example, this is possible!
Using python is super powerful for these USB screens, and I am grateful to @mathoudebine for his work in enabling the APIs to use them!
Consider this:
This is a dashboard I created that will check latency and response status of systems I care about in my home lab. I have three pages of applications/hosts that it needs to track, so it will rotate to the next page every 15 seconds. The number of pages is programmatically determined based on all the hosts I have in my YAML config. I also have the key things to look at when you are having connectivity issues, like... is my DNS working? How about my router? My fiber gateway? How about Google? By looking at that chain, I can quickly determine why my World of Warcraft is lagging or disconnecting! I also have a focus app that can be defined in YAML that will make sure that a single app or host that I need to track is visible all the time. That could be your remote Minecraft server, or even OpenAI's website when they are overloaded and you realize you don't really know anything without AI anymore!
I'm trying to find good ways to contribute these back to the community to build off the framework. I have my own git server I have my scripts versioned to, but the result is that it is targeting this repo for its libraries. I might need to create a YAML file where I can just enter the location of the cloned repo so all scripts know to use that as a relative path for all the libraries.
One other thing I was able to do thanks to leveraging Python over the themes and the original Turing software is that I can go multithreaded for my information. That means, I could have CPU data loading in one thread, GPU data in another (GPU calls are really slow!), then just refresh super quick, and just check for updates from the threads. The upshot of that is 3 to 6 fps refreshes for large dashboards instead of 2 or 3 second refreshes.
As I said, I'm working on a framework that I hope to be able to share soon. This has been a game-changer, however, on how I am using my little USB screens!
I'll update this thread when I have more to share!
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions