Skip to content

Commit

Permalink
Experimental (#19)
Browse files Browse the repository at this point in the history
- Provide cpu temperature in systeminfo
  • Loading branch information
schech1 authored Oct 24, 2024
1 parent 7d0c8fd commit b3f3e90
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ Uptime Mate, requires a lightweight docker backend to run.

### Changes **App Version 1.1.3**

With version 1.1.3 of backend and app, the InfoView got reworked.

With version 1.1.4 of backend and app, the InfoView got reworked.

It will now show some system information about the backend host system.
It will also show and warn if backendversion and appversion are not in sync.

Expand All @@ -53,7 +55,9 @@ It will also show and warn if backendversion and appversion are not in sync.
## Backend Compatibility
**Be sure to pull the latest docker image**

The current version (1.1.3) in the App Store is compatible with `schech1/uptime-buddy-api:latest`

The current version (1.1.4) in the App Store is compatible with `schech1/uptime-buddy-api:latest`



## Prerequisites in the Uptime Mate iOS-App
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.1.3
v1.1.4
12 changes: 12 additions & 0 deletions backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,18 @@ def getSystemInfo():
systemInfo["diskFree"] = round(disk.free / 1024**3, 2)
systemInfo["diskPercent"] = round((disk.total - disk.free) / disk.total * 100, 2)


try:
temps = psutil.sensors_temperatures()
if "cpu_thermal" in temps:
cpu_temp = temps["cpu_thermal"][0].current
systemInfo["cputemp"] = cpu_temp
else:
self.logger.info("CPU temperature sensor not found.")
except:
self.logger.info("CPU temperature not supported")


# Backend version
version_file_path = '/app/VERSION'

Expand Down

0 comments on commit b3f3e90

Please sign in to comment.