Skip to content

Add automatic temperature sensor selection for daemon#90

Open
leonardoman9 wants to merge 1 commit into
strodgers:mainfrom
leonardoman9:auto-temp-daemon
Open

Add automatic temperature sensor selection for daemon#90
leonardoman9 wants to merge 1 commit into
strodgers:mainfrom
leonardoman9:auto-temp-daemon

Conversation

@leonardoman9

Copy link
Copy Markdown

Summary

Adds an optional automatic temperature sensor selection mode for the daemon:

epomakercontroller start-daemon --auto-temp

When enabled, the daemon chooses a temperature sensor automatically instead of requiring users to
manually inspect list-temp-devices and pass a key such as coretemp-0.

The selection policy is conservative:

  • prefer CPU/SoC sensors such as coretemp, k10temp, zenpower, cpu_thermal, soc_thermal, acpitz
  • then fall back to other non-GPU sensors
  • use GPU sensors only if no better sensor is available

This avoids choosing NVIDIA/AMD GPU sensors by default, since repeated GPU sensor polling can be more
disruptive on some systems.

Changes

  • Add --auto-temp to start-daemon
  • Add select_temp_device() in utils/sensors.py
  • Mark the automatically selected sensor with * in list-temp-devices
  • Add tests for automatic sensor selection
  • Update README with the new usage
  • Fix formatting in list-temp-devices
  • Resolve default config paths independent of the current working directory
  • Include configs/default.json in package metadata
  • Avoid requiring Pillow unless GIF upload is actually used
  • Prefer the RT100 screen/control HID endpoint when opening devices, with fallback to the previous
    behavior

Example

$ epomakercontroller list-temp-devices
DEVICE KEY CURRENT TEMPERATURE AUTO
coretemp-0 52.0°C *
coretemp-1 48.0°C
coretemp-2 49.0°C

$ epomakercontroller start-daemon --auto-temp

Testing

Tested locally on Arch Linux with an Epomaker RT100 Wired.

MPLBACKEND=Agg python -m pytest

Result:

26 passed, 2 warnings in 10.51s

Warnings observed:

  • python-dateutil deprecation warning for utcfromtimestamp
  • Matplotlib FigureCanvasAgg is non-interactive warning in tests/
    test_main.py::test_read_and_decode_bytes

Manual checks:

epomakercontroller send-time
epomakercontroller list-temp-devices
epomakercontroller start-daemon coretemp-0

@kbrddestroyer kbrddestroyer self-requested a review June 24, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant