Skip to content
forked from KjetilSv/Win10As

Make your windows 10/11 computer IOT friendly

Notifications You must be signed in to change notification settings

ferarias/win2mqtt

 
 

Repository files navigation

Windows to MQTT

A Windows service that exposes system sensors to MQTT so that they can be consumed from IOT applications such as Home Assistant

Roadmap

See Roadmap.

Architecture

Architecture

The application is a Windows Service that runs in the background, collects system information, and publishes it to an MQTT broker.

It uses the MQTT protocol to communicate with the broker and publish sensor data.

Installation

Microsoft Windows

Install as a Windows Service

First, build a a self-containing exe:

dotnet publish .\src\Win2Mqtt\ --configuration Release --framework net8.0-windows8.0 --runtime win-x64 --self-contained  --output c:\Win2MQTT

Then create and start the service (you will need Administration privileges):

sc.exe create "Win2MQTT Service" binpath= "C:\Win2MQTT\Win2Mqtt.exe"
sc.exe start "Win2MQTT Service"

More information in this article

Linux

Install as a Linux Service

First, build a a self-containing exe:

dotnet publish ./src/Win2Mqtt --configuration Release --framework net8.0 --runtime linux-x64 --self-contained  --output ./publish

Sensors

Sensors are published to Home Assistant, provided it has the MQTT integration enabled.

The default topic is win2mqtt/{hostname} where {hostname} is the name of the computer running the service. The hostname is automatically detected and used as the prefix for all topics.

See Sensors to see the list of available sensors and their topics.

Listeners

Win2MQTT subscribes to several topics and, when receiving messages, executes a command or action.

See Listeners to see the list of available listeners and their topics.

Setup project

(in progress)

From https://learn.microsoft.com/en-us/dotnet/core/extensions/windows-service-with-installer?tabs=wix

About

Make your windows 10/11 computer IOT friendly

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%