forked from sixfab/sixfab-power-python-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathread_sensors.py
30 lines (23 loc) · 1.22 KB
/
read_sensors.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from power_api import SixfabPower, Definition
import time
api = SixfabPower()
print("************* Input Sensors **************")
print("Input Temp: " + str(api.get_input_temp()))
print("Input Voltage: " + str(api.get_input_voltage()))
print("Input Current: " + str(api.get_input_current()))
print("Input Power: " + str(api.get_input_power())) #Required delay #default 50
print("************* System Sensors **************")
print("System Temp: " + str(api.get_system_temp()))
print("System Voltage: " + str(api.get_system_voltage()))
print("System Current: " + str(api.get_system_current())) #Required delay #default 50
print("System Power: " + str(api.get_system_power())) #Required delay #default 50
print("************* Battery **************")
print("Battery Temp: " + str(api.get_battery_temp()))
print("Battery Voltage: " + str(api.get_battery_voltage()))
print("Battery Current: " + str(api.get_battery_current()))
print("Battery Power: " + str(api.get_battery_power()))
print("Battery Level: " + str(api.get_battery_level()))
print("Battery Health: " + str(api.get_battery_health()))
print("************* Fan **************")
print("Fan Health: " + str(api.get_fan_health()))
print("Fan Speed: " + str(api.get_fan_speed()))