Skip to content

Commit

Permalink
fix: T1 now 40 degrees & hysteresis now 3 degrees
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Christie committed Dec 22, 2023
1 parent 48dcd1b commit 6897e6a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions cm4-fan-controller.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Python CM4 Fan Controller
After=multi-user.target

[Service]
Type=simple
WorkingDirectory=/home/alan/python-cm4-fan-controller/
ExecStart=sudo python controller.py
KillSignal=SIGINT
Restart=on-failure

[Install]
WantedBy=multi-user.target
6 changes: 3 additions & 3 deletions controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
# the fan goes to 100% at 70 degrees or greater
# and remains at 100% until the temperature
# drops to 68 degrees (or less)
HYSTERESIS: int = int(os.environ.get("HYSTERESIS", "2"))
HYSTERESIS: int = int(os.environ.get("HYSTERESIS", "3"))

LOGGING_LEVEL: str = os.environ.get("LOGGING_LEVEL", "DEBUG")
LOGGING_LEVEL: str = os.environ.get("LOGGING_LEVEL", "INFO")

MEASUREMENT_INTERVAL_S: int = int(os.environ.get("MEASUREMENT_INTERVAL_S", "8"))

TEMPERATURE_POINT_1: int = int(os.environ.get("TEMPERATURE_POINT_1", "35"))
TEMPERATURE_POINT_1: int = int(os.environ.get("TEMPERATURE_POINT_1", "40"))
TEMPERATURE_POINT_2: int = int(os.environ.get("TEMPERATURE_POINT_1", "60"))
TEMPERATURE_POINT_3: int = int(os.environ.get("TEMPERATURE_POINT_1", "65"))
TEMPERATURE_POINT_4: int = int(os.environ.get("TEMPERATURE_POINT_1", "70"))
Expand Down

0 comments on commit 6897e6a

Please sign in to comment.