diff --git a/server.log b/server.log
index 4018fa0..271f345 100644
--- a/server.log
+++ b/server.log
@@ -1,6 +1,195 @@
-INFO: Started server process [68799]
+INFO: Started server process [69621]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
-INFO: 127.0.0.1:48966 - "GET / HTTP/1.1" 200 OK
-INFO: 127.0.0.1:56088 - "GET / HTTP/1.1" 200 OK
+INFO: 192.168.5.30:63726 - "GET /api/status HTTP/1.1" 401 Unauthorized
+INFO: 192.168.5.30:63726 - "GET /login HTTP/1.1" 200 OK
+INFO: 192.168.5.30:63726 - "GET /icons/favicon.svg HTTP/1.1" 304 Not Modified
+/home/devmatrix/projects/fan-controller-v2/web_server.py:153: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ self._sessions[token] = (username, datetime.utcnow() + timedelta(days=7))
+INFO: 192.168.5.30:59632 - "POST /api/auth/login HTTP/1.1" 200 OK
+INFO: 192.168.5.30:59632 - "GET / HTTP/1.1" 200 OK
+INFO: 192.168.5.30:59632 - "GET /icons/sun.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:57438 - "GET /icons/lock-closed.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:49371 - "GET /icons/arrow-right-on-rectangle.svg HTTP/1.1" 304 Not Modified
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+2026-02-20 19:59:12,404 - fan_controller - INFO - Loaded config from /home/devmatrix/projects/fan-controller-v2/data/config.json
+INFO: 192.168.5.30:57438 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:59632 - "GET /icons/thermometer.svg HTTP/1.1" 200 OK
+INFO: 192.168.5.30:53397 - "GET /icons/list-bullet.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:60055 - "GET /icons/auto-mode.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:61231 - "GET /icons/server-stack.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:57438 - "GET /icons/document-text.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:49371 - "GET /icons/chart-bar.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:49371 - "GET /favicon.ico HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 127.0.0.1:57942 - "GET /icons/thermometer.svg HTTP/1.1" 200 OK
+2026-02-20 19:59:42,166 - fan_controller - INFO - Connected to IPMI at 192.168.5.191
+INFO: 192.168.5.30:49371 - "POST /api/test HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET / HTTP/1.1" 200 OK
+INFO: 192.168.5.30:49371 - "GET /icons/auto-mode.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:58740 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:61627 - "GET /icons/adjustments-horizontal.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:62162 - "GET /icons/thermometer.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:62162 - "GET /favicon.ico HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET / HTTP/1.1" 200 OK
+INFO: 192.168.5.30:64252 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /icons/thermometer.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:62162 - "GET /favicon.ico HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET / HTTP/1.1" 200 OK
+INFO: 192.168.5.30:64911 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62162 - "GET /icons/favicon.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:50760 - "GET /icons/auto-mode.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:60142 - "GET /icons/thermometer.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:50760 - "GET /favicon.ico HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET / HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /favicon.ico HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "POST /api/test HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+2026-02-20 20:01:35,820 - fan_controller - INFO - Saved config to /home/devmatrix/projects/fan-controller-v2/data/config.json
+2026-02-20 20:01:35,970 - fan_controller - INFO - Manual fan control enabled
+2026-02-20 20:01:36,121 - fan_controller - INFO - Connected to IPMI at 192.168.5.191
+2026-02-20 20:01:36,122 - fan_controller - INFO - HTTP sensor client initialized for http://192.168.5.200:8888
+2026-02-20 20:01:36,122 - fan_controller - INFO - IPMI Controller service started
+INFO: 192.168.5.30:50760 - "POST /api/control/auto HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+2026-02-20 20:01:36,290 - fan_controller - INFO - Manual fan control enabled
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+2026-02-20 20:01:41,821 - fan_controller - INFO - Fan 0xff speed set to 27%
+2026-02-20 20:01:41,822 - fan_controller - INFO - All fans set to 27% (Temp 36.0°C)
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET / HTTP/1.1" 200 OK
+INFO: 192.168.5.30:62312 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:54108 - "GET /icons/thermometer.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:50760 - "GET /icons/auto-mode.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:50760 - "GET /favicon.ico HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET / HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /favicon.ico HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:50760 - "GET /login HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:153: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ self._sessions[token] = (username, datetime.utcnow() + timedelta(days=7))
+INFO: 192.168.5.30:55526 - "POST /api/auth/login HTTP/1.1" 200 OK
+INFO: 192.168.5.30:55526 - "GET / HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:55526 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:55526 - "GET /favicon.ico HTTP/1.1" 200 OK
+INFO: 192.168.5.30:55526 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:55526 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:55526 - "GET /api/status HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:55526 - "GET /api/status HTTP/1.1" 200 OK
+2026-02-20 20:02:11,960 - fan_controller - INFO - Fan 0xff speed set to 29%
+2026-02-20 20:02:11,961 - fan_controller - INFO - All fans set to 29% (Temp 37.0°C)
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:55526 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:55526 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:55526 - "GET / HTTP/1.1" 200 OK
+INFO: 192.168.5.30:55175 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:55526 - "GET /icons/auto-mode.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:65016 - "GET /icons/thermometer.svg HTTP/1.1" 304 Not Modified
+INFO: 192.168.5.30:65016 - "GET /favicon.ico HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+2026-02-20 20:02:28,030 - fan_controller - INFO - Fan 0xff speed set to 27%
+2026-02-20 20:02:28,030 - fan_controller - INFO - All fans set to 27% (Temp 36.0°C)
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
+/home/devmatrix/projects/fan-controller-v2/web_server.py:160: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
+ if datetime.utcnow() > expiry:
+INFO: 192.168.5.30:65016 - "GET /api/status HTTP/1.1" 200 OK
diff --git a/static/icons/thermometer.png b/static/icons/thermometer.png
new file mode 100644
index 0000000..241f4f1
Binary files /dev/null and b/static/icons/thermometer.png differ
diff --git a/static/icons/thermometer.svg b/static/icons/thermometer.svg
index 8d48764..f511dcf 100644
--- a/static/icons/thermometer.svg
+++ b/static/icons/thermometer.svg
@@ -1,3 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/web_server.py b/web_server.py
index d17c920..a7282cc 100644
--- a/web_server.py
+++ b/web_server.py
@@ -1157,6 +1157,18 @@ with open('/home/devmatrix/.openclaw/workspace/setup_html.txt', 'r') as f:
@asynccontextmanager
async def lifespan(app: FastAPI):
DATA_DIR.mkdir(parents=True, exist_ok=True)
+
+ # Auto-start fan control if enabled in config and setup is complete
+ if user_manager.is_setup_complete():
+ try:
+ service = get_service(str(CONFIG_FILE))
+ if service.config.get('enabled', False):
+ logger.info("Auto-starting fan control (enabled in config)")
+ if not service.running:
+ service.start()
+ except Exception as e:
+ logger.error(f"Auto-start failed: {e}")
+
yield
app = FastAPI(