Skip to content

LibreHardwareMonitor integration for Windows platform #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
38e6ca6
Begin split of sensors code into sensors/ folder
mathoudebine Nov 14, 2022
501121d
WIP refactor sensors
mathoudebine Nov 17, 2022
2d2a294
Finalize net class for sensors
mathoudebine Nov 27, 2022
4c8610c
Merge remote-tracking branch 'origin/main' into feature/52-openhardwa…
mathoudebine Nov 27, 2022
865bf36
Merge remote-tracking branch 'origin/main' into feature/52-openhardwa…
mathoudebine Nov 27, 2022
d5ea94b
Fix network statistics
mathoudebine Nov 27, 2022
586f016
Fix compatibility for python < 3.8
mathoudebine Nov 27, 2022
a1cd136
Fix empty dictionnary 'key error'
mathoudebine Nov 27, 2022
10000b4
Fix network sensors, add skeleton for simulated sensors
mathoudebine Dec 2, 2022
a2371ee
Move lcd communication classes, rework GPU sensors detection
mathoudebine Dec 4, 2022
fe061d7
Update config.yaml with new HW_SENSORS settings
mathoudebine Dec 4, 2022
6d3f4e5
Add LibreHardwareMonitor sensors, fix date format to use locale, fix …
mathoudebine Dec 9, 2022
497d25e
Detect if not run as admin, minor fixes
mathoudebine Dec 9, 2022
a67b154
Add HidSharp.dll, add test program for LibreHardwareMonitor
mathoudebine Dec 9, 2022
a074cb9
Minor fix in simple-program.py
mathoudebine Dec 10, 2022
3c6494f
Reformat code, fix CPU clock (use max of core clocks, ignore effectiv…
mathoudebine Dec 12, 2022
cedd9c2
Fix comment in simple-program.py
mathoudebine Dec 12, 2022
6aea9ef
Reverse orientation are now managed in config.yaml by the user.
mathoudebine Dec 12, 2022
76180c0
Remove interfaces name by default in the file
mathoudebine Dec 12, 2022
91bc879
Revert cpu clock to mean of all core clocks, fix warning message for …
mathoudebine Dec 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/system-monitor-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
echo "Using theme ${{ matrix.theme }}"
(Get-Content config.yaml) -replace "^ THEME.*$"," THEME: ${{ matrix.theme }}" | Set-Content config.yaml

# For tests do not use LibreHardwareMonitor as it needs admin rights
(Get-Content config.yaml) -replace "^ HW_SENSORS.*$"," HW_SENSORS: PYTHON" | Set-Content config.yaml

- name: Run system monitor for 20 seconds
run: |
Start-Process -NoNewWindow python3 main.py -RedirectStandardOutput output.log -RedirectStandardError error.log
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,6 @@ dmypy.json

# Simulated display capture
screencap.png
tmp

external/LibreHardwareMonitor/LibreHardwareMonitorLib.sys
50 changes: 34 additions & 16 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,53 @@
config:
# Configuration values to set up basic communication
# Set your COM port e.g. COM3 for Windows, /dev/ttyACM0 for Linux...
# Use AUTO for COM port auto-discovery (may not work on every setup)
# COM_PORT: "/dev/ttyACM0"
# COM_PORT: "COM3"
COM_PORT: "AUTO"

# Theme to use (located in res/themes)
# THEME: Terminal
# THEME: Landscape6Grid
# THEME: Cyberpunk
# THEME: bash-dark-green
# Available themes:
# - 3.5inchTheme2
# - Terminal
# - Landscape6Grid
# - Cyberpunk
# - bash-dark-green
THEME: 3.5inchTheme2

# Network metrics
# Put the interface name or let it blank if the card does not exist
# Hardware sensors reading
# Choose the appropriate method for reading your hardware sensors:
# - PYTHON use Python libraries (psutils, GPUtil...) to read hardware sensors (supports all OS but not all HW)
# - LHM use LibreHardwareMonitor library to read hardware sensors (Windows only - NEEDS ADMIN RIGHTS)
# - STUB use fake random data instead of real hardware sensors
# - AUTO use the best method based on your OS: Windows OS will use LHM, other OS will use Python libraries
HW_SENSORS: AUTO

# Network interfaces
# Linux/MacOS interfaces are named "eth0", "wlan0", "wlp1s0", "enp2s0"...
# For Windows use the interfaces pretty name: "Ethernet 2", "Wi-Fi", ...
ETH: "eth0" # Ethernet Card
WLO: "wlan0" # Wi-Fi Card
# Leave the fields empty if the card does not exist on your setup
ETH: "" # Ethernet Card
WLO: "" # Wi-Fi Card

display:
# Display resolution in portrait orientation
# Do not use this setting to rotate display! Display orientation is managed by themes
DISPLAY_WIDTH: 320
DISPLAY_HEIGHT: 480
# Display revision: A or B (for "flagship" version, use B) or SIMU for simulated LCD (image written in screencap.png)
# To identify your revision: https://github.com/mathoudebine/turing-smart-screen-python/wiki/Hardware-revisions
REVISION: A

# Display Brightness
# Set this as the desired %, 0 being completely dark and 100 being max brightness
# Warning: screen can get very hot at high brightness!
# Warning: revision A display can get hot at high brightness!
BRIGHTNESS: 20

# Display revision: A or B (for "flagship" version, use B) or SIMU for simulated LCD (image written in screencap.png)
# To identify your revision: https://github.com/mathoudebine/turing-smart-screen-python/wiki/Hardware-revisions
REVISION: A
# Display reverse: true/false
# Set to true to reverse display orientation (landscape <-> reverse landscape, portrait <-> reverse portrait)
# Note: Display basic orientation (portrait or landscape) is defined by the theme you have selected
DISPLAY_REVERSE: false

# Display resolution in portrait orientation
# Do not use this setting to rotate display! Use DISPLAY_REVERSE
DISPLAY_WIDTH: 320 # Do not change unless you have a good reason
DISPLAY_HEIGHT: 480 # Do not change unless you have a good reason


Binary file added external/LibreHardwareMonitor/HidSharp.dll
Binary file not shown.
Loading