{"id":18583408,"url":"https://github.com/epinter/librehardwareservice","last_synced_at":"2026-05-03T00:06:08.211Z","repository":{"id":146359878,"uuid":"502471710","full_name":"epinter/LibreHardwareService","owner":"epinter","description":"LibreHardwareService - A hardware sensors service using LibreHardwareMonitor library","archived":false,"fork":false,"pushed_at":"2025-03-18T17:54:56.000Z","size":110,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T00:34:23.884Z","etag":null,"topics":["csharp","hardware-sensors","json","librehardwaremonitor","messagepack","service","windows"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epinter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-11T22:48:05.000Z","updated_at":"2025-03-18T17:55:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"f415cacb-ee2f-4def-9be3-08b14615b122","html_url":"https://github.com/epinter/LibreHardwareService","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/epinter/LibreHardwareService","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epinter%2FLibreHardwareService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epinter%2FLibreHardwareService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epinter%2FLibreHardwareService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epinter%2FLibreHardwareService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epinter","download_url":"https://codeload.github.com/epinter/LibreHardwareService/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epinter%2FLibreHardwareService/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266276128,"owners_count":23903981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","hardware-sensors","json","librehardwaremonitor","messagepack","service","windows"],"created_at":"2024-11-07T00:22:30.419Z","updated_at":"2026-05-03T00:06:03.171Z","avatar_url":"https://github.com/epinter.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LibreHardwareService\n## A hardware sensors service using LibreHardwareMonitor library\n\n[![Latest Release](https://img.shields.io/github/release/epinter/LibreHardwareService.svg)](https://github.com/epinter/LibreHardwareService/releases/latest)\n[![Downloads](https://img.shields.io/github/downloads/epinter/LibreHardwareService/total.svg)](https://github.com/epinter/LibreHardwareService/releases/latest)\n[![Release Date](https://img.shields.io/github/release-date/epinter/LibreHardwareService.svg)](https://github.com/epinter/LibreHardwareService/releases/latest)\n[![License](https://img.shields.io/github/license/epinter/LibreHardwareService.svg)](https://github.com/epinter/LibreHardwareService/blob/main/LICENSE)\n\n## Introduction\n\nLibreHardwareService is a Windows service that writes all sensors data from [LibreHardwareMonitor](https://github.com/LibreHardwareMonitor/LibreHardwareMonitor) to shared memory, so libraries and programs like [LibHardwareService](https://github.com/epinter/lhwservice) can retrieve all the sensors values available without any knowledge or link to LibreHardwareMonitor dll or binary. The service is developed to run with administrative priviledges (LocalSystem), in a way that plugins like [Rainmeter-Lhws](https://github.com/epinter/rainmeter-lhws) can access all hardware sensors while running without administrative privileges. ***You don't need to run or install LibreHardwareMonitor!***\n\n## Security\n\nThis service writes sensors data to shared memory (see [models](https://github.com/epinter/LibreHardwareService/tree/main/service/src/models) to know what kind of data is written). The permissions of the shared-memory files ([Non-persisted Memory-Mapped files](https://docs.microsoft.com/en-us/dotnet/standard/io/memory-mapped-files)) are set to permit all local users to read all the data, this way programs like Rainmeter doesn't have to run with administrative privileges. The shared memory doesn't contain sensitive information, the data written is exclusively related to hardware sensors (like hardware name, brand, sensor name, type, values,etc...) and status like S.M.A.R.T. The shared-memory is never read by this service, this means the everyone-read permission on the memory-mapped files doesn't represent a security risk to your system because the service ignores and overwrites any data written in the shared memory. No data is exposed to network.\n\n## Requiremens\n\n.NET 8.0\n\n## Why another way to access LibreHardwareMonitor sensors ?\n\nWhile trying to use LibreHardwareMonitor with Rainmeter, I didn't find any way to make Rainmeter to access the sensor data without requiring administrative privileges and keeping low cpu usage (more than 30 sensors in the same skin). Running this service with a plugin in Rainmeter, I can keep the CPU usage lower than 0.5% versus 3% used by some other solutions. So I created this service and [LibHardwareService](https://github.com/epinter/lhwservice).\n\n## Usage\n\nAfter installation, you will need a software to read and parse the memory-mapped files. An example is the [Rainmeter-Lhws](https://github.com/epinter/rainmeter-lhws) plugin, that access all sensors data through [LibHardwareService](https://github.com/epinter/lhwservice). \n\n## List all available sensors from LibreHardwareMonitor\n\nIn the installation directory, execute ShowSensors.exe as administrator.\n\n## Configuration\n\nThe service can be configured using appsettings.json:\n\n```\n        /// indexFormat (default 2)\n        /// Format of the index that is written on the memory map\n        /// 1 = JSON (easier to parse and highly compatible)\n        /// 2 - MessagePack (best performance)\n        \n        /// memoryMapLimitLogIntervalMinutes (default 10 minutes)\n        /// Minimum interval (minutes) to log warning when data written is above limit. To avoid logspam.\n        \n        /// updateIntervalSeconds (default 1 second)\n        /// Time interval in seconds to collect the sensor data and write to memory map.\n        \n        /// hwStatusUpdateIntervalMinutes (default 60 minutes)\n        /// Time interval in minutes to collect the hardware status (like storage smart attributes) and write to memory map.\n        \n        /// sensorsTimeWindowSeconds (default 0)\n        /// Time window to keep sensor values. The number of values kept in memory will increase when the window is increased.\n        /// Increases CPU usage and memory usage. 0 disables the feature.\n        \n        /// memoryMapLimitKb (default 1MB)\n        /// Limit of the memory map.\n\n        /// featureEnableMemoryMapAllHardwareData (default false)\n        /// Enable/disable hardware tree data.\n```\n\n## Memory-Mapped files format\n\nThere are three memory-mapped files written by this service:\n - Sensors (an index that contains the offset, name and type of each sensor block is written, so when the client is reading the sensor, it will just need to parse the index, get the sensor offset and parse it, there's no need to parse all the sensors to get only one):\n```\n    Metadata Length (4-byte integer)\n    Metadata:\n        UpdateInerval (4-byte integer)\n        LastUpdate (8-byte long)\n    Header\n        Index Length (4-byte integer)\n        Index Offset (4-byte integer)\n        Index Format (4-byte integer)\n        Data Length (4-byte integer)\n        Data Offset (4-byte integer)\n        Reserved (16 bytes)\n    Index (an array of MessagePack or Json objects, see DataIndex.cs and IndexFormat config)\n    Padding (4-bytes filled with zeros)\n    Data (an array of json objects, see DataSensor.cs\n```          \n\n - HardwareTree (a tree representation of all hardware and sensors data LibreHardwareMonitor exposes)\n\n```\n    Metadata Length (4-byte integer)\n    Metadata:\n        UpdateInerval (4-byte integer)\n        LastUpdate (8-byte long)\n    Data Length (4-byte integer)\n    Data (an array of json objects, see DataHardware.cs) \n```\n\n - Status (currently used for storage SMART), the data is written as follows:\n```\n    Metadata Length (4-byte integer)\n    Metadata:\n        UpdateInerval (4-byte integer)\n        LastUpdate (8-byte long)\n    Data Length (4-byte integer)\n    Data\n        HwStatusInfo:\n            Block Length (4-byte integer, info+data)\n            Info Length (4-byte integer)\n            Type (4-byte integer)\n            Json serialized HwStatusInfo\n            Data Length (4-byte integer)\n            Data\n            0x00 (one byte filled with zero)\n```\n\nFor more details, see SensorsManager.cs and MemoryMappedSensors.cs.\n\n## License\n\nLibreHardwareService is licensed under the terms of [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/).\n\nThis software uses the open source libraries [LibreHardwareMonitor](https://github.com/LibreHardwareMonitor/LibreHardwareMonitor), [Utf8Json](https://github.com/neuecc/Utf8Json) and [MessagePack-CSharp](https://github.com/neuecc/MessagePack-CSharp). The source code and their licenses can be obtained at their respective github/websites.\n\n### This project is not part of LibreHardwareMonitor. ###\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepinter%2Flibrehardwareservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepinter%2Flibrehardwareservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepinter%2Flibrehardwareservice/lists"}