https://github.com/moteus/lua-openhardwaremonitor
Access to OpenHardwareMonitor WMI interface
https://github.com/moteus/lua-openhardwaremonitor
hardware-monitoring lua openhardwaremonitor windows
Last synced: 11 months ago
JSON representation
Access to OpenHardwareMonitor WMI interface
- Host: GitHub
- URL: https://github.com/moteus/lua-openhardwaremonitor
- Owner: moteus
- License: mit
- Created: 2017-06-30T10:25:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-04T11:31:17.000Z (over 8 years ago)
- Last Synced: 2025-02-02T00:27:24.580Z (about 1 year ago)
- Topics: hardware-monitoring, lua, openhardwaremonitor, windows
- Language: Lua
- Size: 8.79 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lua-OpenHardwareMonitor
[](LICENSE)
Access to [OpenHardwareMonitor](https://github.com/openhardwaremonitor/openhardwaremonitor) WMI interface
# Usage
```Lua
local monitor = OpenHardwareMonitor.new()
-- Connect to OpenHardwareMonitor MWI source
monitor:open()
-- get all information as 2 arrays
local hardware, sensors = monitor:fetchAll()
-- get information as tree (similar as in GUI)
local tree = monitor:buildTree()
-- select specific sensors/hardware by names
local rs = monitor:select{
{'/intelcpu/0', 'Temperature'};
{'/intelcpu/0', 'Voltage'};
}
local Temperatures = rs[1]
if Temperatures then
for _, v in ipairs(Temperatures) do
print(v.name, v.value)
end
end
```