ITADN

Problems getting ttlcd to run

#12OpenJAQuent 创建于 2025-07-12
J
JAQuentcommented
Hello Benjamin, We're super stoked to have stumbled over this project because we're mainly running Linux (Ubuntu) and have a Thermaltake LCD that we barely see working because of that. That being said, we've been struggling to get `ttlcd` to work even with heavy use of Copilot and co. We've tried to be as detailed as possible below but please let me know if you're missing any information or have any idea what is going one. The first error that we encountered is `IndexError: Invalid interface index 1`. Also, what is the usage of `layouts.py` after installing the missing package it does run without errors but I am not sure what it does. Best, Alex # Installation ```{bash} git clone https://github.com/bekindpleaserewind/ttlcd.git cd ttlcd python3 -m venv ~/python_environments/ttlcd source ~/python_environments/ttlcd/bin/activate python -m pip install --upgrade pip pip install -r requirements.txt ``` Problem when we run functions a lot packages are missing despite having run `pip install -r requirements.txt`. So we further installed: ```{bash} pip install uptime kubernetes prometheus_api_client ``` We also copy these rules ``` # Thermaltake LCD Panel Kit udev rules # This allows non-root users to access the Thermaltake LCD device SUBSYSTEM=="usb", ATTR{idVendor}=="264a", ATTR{idProduct}=="232a", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTR{idVendor}=="264a", ATTR{idProduct}=="233d", MODE="0666", GROUP="plugdev" ``` via `sudo cp /home/alex/software/ttlcd/99-thermaltake-lcd.rules /etc/udev/rules.d/` # Trying to run it Then we tried running `python ttlcd.py -c our_configs/test-config.yaml` and encountered this error ``` Streaming to stdout 2025-07-12 16:40:52,214 INFO Loaded LcdController Traceback (most recent call last): File "/home/alex/software/ttlcd/ttlcd.py", line 615, in <module> lcd.setup() File "/home/alex/software/ttlcd/ttlcd.py", line 487, in setup self.interfaces.append(self.configuration[(1, 0)]) File "/home/alex/python_environments/ttlcd/lib/python3.10/site-packages/usb/core.py", line 662, in __getitem__ return Interface(self.device, index[0], index[1], self.index) File "/home/alex/python_environments/ttlcd/lib/python3.10/site-packages/usb/core.py", line 477, in __init__ desc = backend.get_interface_descriptor( File "/home/alex/python_environments/ttlcd/lib/python3.10/site-packages/usb/backend/libusb1.py", line 785, in get_interface_descriptor raise IndexError('Invalid interface index ' + str(intf)) IndexError: Invalid interface index 1 ``` # System information ## Operating system and versions Our system `lsb_release -a`: ``` No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.5 LTS Release: 22.04 Codename: jammy ``` `python --version`: ``` Python 3.10.12 ``` ## Our screen We checked our screen's infomatioon using `lsusb -v -d 264a:232a | head -20` ``` Bus 001 Device 004: ID 264a:232a Thermaltake RC Pro Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x264a Thermaltake idProduct 0x232a bcdDevice 2.00 iManufacturer 1 Thermaltake iProduct 2 RC Pro iSerial 3 A247321PK000167 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 ``` # The .yaml file ``` ################################################################################## # Start by specifying a General configuration with sane defaults for your theme. # # # # You can define widgets individually (all optional). # # Each widget will require the x and y coordinates, if it is enabled or disabled # # and any optional overrides (i.e. font to use, font size, color). # ################################################################################## # Layout to utilize use: Kubernetes # Device idVendor: 0x264a idProduct: 0x232a # System daemon: False #log_file: "/tmp/ttlcd.log" # optional parameter, defaults to stdout if missing # General background: "contrib/background.jpg" orientation: "top" # top, left, bottom, right font_file: "fonts/DejaVuSans.ttf" font_size: 10 font_color: '#ffffff' line_length: 64 line_space: 8 # Prometheus Global prometheus_url: "http://localhost:9090" prometheus_url_disable_ssl: True # Generic Text Strings text: - string: "NETWORK OUT" enabled: True x: 302 y: 47 font_file: "fonts/DejaVuSans.ttf" font_size: 8 font_color: "#000000" - string: "NETWORK IN" enabled: True x: 109 y: 47 font_file: "fonts/DejaVuSans.ttf" font_size: 8 font_color: "#000000" - string: "PODS" enabled: True x: 228 y: 64 font_file: "fonts/DejaVuSans.ttf" font_size: 8 font_color: "#ffffff" - string: "OOM" enabled: True x: 437 y: 90 font_file: "fonts/DejaVuSans.ttf" font_size: 8 font_color: "#000000" - string: "FREE" enabled: True x: 434 y: 25 font_file: "fonts/DejaVuSans.ttf" font_size: 8 font_color: "#000000" - string: "MEM" enabled: True x: 434 y: 35 font_file: "fonts/DejaVuSans.ttf" font_size: 8 font_color: "#000000" - string: "FREE" enabled: True x: 22 y: 25 font_file: "fonts/DejaVuSans.ttf" font_size: 8 font_color: "#000000" - string: "CPU" enabled: True x: 22 y: 35 font_file: "fonts/DejaVuSans.ttf" font_size: 8 font_color: "#000000" - string: "DISK" enabled: True x: 22 y: 85 font_file: "fonts/DejaVuSans.ttf" font_size: 8 font_color: "#000000" - string: "I/O" enabled: True x: 22 y: 95 font_file: "fonts/DejaVuSans.ttf" font_size: 8 font_color: "#000000" # Date enable_date: True date_x: 117 date_y: 14 date_font_size: 10 date_font_color: "#ffffff" # Time enable_time: True time_x: 308 time_y: 14 time_font_size: 10 time_font_color: "#ffffff" # Pods enable_kubernetes_pod_count: True kubernetes_pod_count_x: 228 kubernetes_pod_count_y: 50 kubernetes_pod_count_font_size: 12 # Prometheus Network Receive Rate enable_prometheus_network_throughput_recv: True prometheus_network_throughput_recv_x: 114 prometheus_network_throughput_recv_y: 37 prometheus_network_throughput_recv_font_size: 8 # Prometheus Network Send Rate enable_prometheus_network_throughput_send: True prometheus_network_throughput_send_x: 301 prometheus_network_throughput_send_y: 37 prometheus_network_throughput_send_font_size: 8 # Prometheus Out of Memory Events enable_prometheus_oom: True prometheus_oom_x: 396 prometheus_oom_y: 88 # Prometheus Free Node Memory enable_prometheus_free_node_memory: True prometheus_free_node_memory_x: 396 prometheus_free_node_memory_y: 29 # Prometheus Free Cpu Percent enable_prometheus_free_cpu_percent: True prometheus_free_cpu_percent_x: 56 prometheus_free_cpu_percent_y: 29 # Prometheus Cluster Disk Throughput enable_prometheus_cluster_disk_throughput: True prometheus_cluster_disk_throughput_x: 56 prometheus_cluster_disk_throughput_y: 88 ```
1 条评论