Configuration HT32 Panel

The daemon reads its configuration from a TOML file. The default path is /etc/ht32-panel/config.toml. You can specify an alternative path as a command-line argument:

ht32paneld /path/to/config.toml

Default Configuration

The full default configuration file:

# HT32 Panel Daemon Configuration

# Web Server Configuration
[web]
# Enable the web server (disabled by default)
enable = false
# Server listen address
listen = "[::1]:8686"

# Display refresh interval (milliseconds, 500-10000)
refresh_interval = 2500

# Heartbeat interval (milliseconds)
heartbeat = 1000

# Device Configuration
[devices]
# LCD device path or "auto" for auto-detection by VID:PID
lcd = "auto"
# Serial port path for LED controller (CH340)
led = "/dev/ttyUSB0"
# Note: LED theme, intensity, and speed are stored in the state directory.
# Use `ht32panelctl led set <theme>` to change them.

# Canvas Configuration
[canvas]
width = 320
height = 170

Configuration Sections

[web] — Web Server

KeyTypeDefaultDescription
enableboolfalseEnable the HTMX web UI for monitoring and controlling the panel
listenstring"[::1]:8686"Address and port the web server listens on

refresh_interval — Display Refresh

KeyTypeDefaultDescription
refresh_intervalinteger2500Display refresh interval in milliseconds. Valid range: 500–10000

heartbeat — Heartbeat Interval

KeyTypeDefaultDescription
heartbeatinteger1000Heartbeat interval in milliseconds

[devices] — Hardware Devices

KeyTypeDefaultDescription
lcdstring"auto"LCD device path, or "auto" to auto-detect by USB VID:PID (04D9:FD01)
ledstring"/dev/ttyUSB0"Serial port path for the CH340 LED controller

LED theme, intensity, and speed are stored in the daemon state directory, not in the config file. Use ht32panelctl led set <theme> to change them at runtime.

[canvas] — Display Canvas

KeyTypeDefaultDescription
widthinteger320Canvas width in pixels
heightinteger170Canvas height in pixels

D-Bus Configuration

The daemon exposes the org.ht32panel.Daemon1 D-Bus interface for inter-process communication. The CLI tool ht32panelctl uses this interface to control the daemon.

Configure the bus type with services.ht32-panel.dbus.bus in your Nix configuration. Valid values are "system", "session", or "auto".

Udev Rules

The daemon needs access to two USB devices:

The installed packages (.deb, .rpm) include udev rules that grant access to these devices. On NixOS, enable udev rules in your configuration:

{ inputs, ... }:
{
  imports = [ inputs.ht32-panel.nixosModules.udevRules ];

  services.ht32-panel.udevRules = {
    enable = true;
    group = "users";  # group that gets device access
  };
}

The group option controls which Unix group receives read/write permissions on the hardware devices. Users must be members of this group to run the daemon without root privileges.