Changed fan temperature thresholds

This commit is contained in:
Thord Johansson 2024-03-23 17:38:04 +01:00
parent d87ce8001f
commit 7d73529502
2 changed files with 22 additions and 4 deletions

18
downloads/ytdl-music.ps1 Normal file
View file

@ -0,0 +1,18 @@
# Requires yt-dlp; install with winget
param (
[string]$PLAYLISTURL,
[string]$LIBRARY_NAME = "Soundtracks",
[string]$TARGETPATH = "/mnt/data/media/"
)
$DEFAULT_TARGET_PATH = "/mnt/data/media/"
# Check if $PLAYLISTURL is empty
if (-not $PLAYLISTURL) {
Write-Output "Need to specify a playlist URL"
exit 1
}
# Use double quotes for variables within the yt-dlp command
yt-dlp -f 'ba' -x --audio-format mp3 $PLAYLISTURL -o "$TARGETPATH/$LIBRARY_NAME/%(playlist)s/%(title)s.%(ext)s"

View file

@ -33,13 +33,13 @@ def set_speed(fan, speed):
while 1:
temp = get_temp() # Get the current CPU temperature
if temp > 70: # Check temperature threshhold, in degrees celcius
if temp > 60: # Check temperature threshhold, in degrees celcius
set_speed(fan, 100) # Set fan duty based on temperature, 100 is max speed and 0 is min speed or off.
elif temp > 60:
set_speed(fan, 85)
elif temp > 50:
set_speed(fan, 60)
set_speed(fan, 85)
elif temp > 40:
set_speed(fan, 60)
elif temp > 35:
set_speed(fan, 50)
elif temp > 32:
set_speed(fan, 45)