实例介绍
HASS Workstation Service是一个专门设计来将您的电脑工作站上的有用传感器和服务通过MQTT协议连接到Home Assistant智能家居系统的项目。该项目以服务的形式在后台运行,旨在为用户提供一个轻量级、使用标准化协议、易于配置且安全的方式来增强其智能家居体验。
主要特点包括:
- 作为后台服务运行,对系统资源消耗小
- 支持本地MQTT代理通讯,保证数据的局域网内安全
- 易于配置,支持安全通信
- 未来计划支持跨平台使用
此外,HASS Workstation Service还提供了多种传感器和命令来控制和监测您的工作站状态,如活动窗口、摄像头状态、麦克风状态等,同时支持通过MQTT发出的命令来控制主机系统,如关机、重启和静音操作。
【实例截图】
【核心代码】
文件清单
└── hass-workstation-service-bda77ad2f24f57b0e1d8cc66242c3473bc7652a2
├── documentation
│ ├── Commands.md
│ ├── direct communication.md
│ ├── FAQ.md
│ ├── Sensors.md
│ └── WMIQuery.md
├── hass-workstation-service
│ ├── appsettings.json
│ ├── Communication
│ │ ├── InterProcesCommunication
│ │ │ ├── InterProcessApi.cs
│ │ │ ├── IServiceContractInterfaces.cs
│ │ │ └── ServiceContractModels.cs
│ │ ├── MQTT
│ │ │ ├── MqttPublisher.cs
│ │ │ └── SensorDiscoveryConfigModel.cs
│ │ └── Util
│ │ ├── CamelCaseJsonNamingpolicy.cs
│ │ └── DynamicJsonConverter.cs
│ ├── Data
│ │ ├── ConfigurationService.cs
│ │ ├── ConfiguredCommand.cs
│ │ ├── ConfiguredMqttBroker.cs
│ │ ├── ConfiguredSensor.cs
│ │ ├── GeneralSettings.cs
│ │ └── IConfigurationService.cs
│ ├── Domain
│ │ ├── AbstractDiscoverable.cs
│ │ ├── Commands
│ │ │ ├── AbstractCommand.cs
│ │ │ ├── CustomCommand.cs
│ │ │ ├── HibernateCommand.cs
│ │ │ ├── KeyCommand.cs
│ │ │ ├── LogOffCommand.cs
│ │ │ ├── MuteCommand.cs
│ │ │ ├── NextCommand.cs
│ │ │ ├── PlayPauseCommand.cs
│ │ │ ├── PreviousCommand.cs
│ │ │ ├── RestartCommand.cs
│ │ │ ├── ShutdownCommand.cs
│ │ │ ├── VolumeDownCommand.cs
│ │ │ └── VolumeUpCommand.cs
│ │ └── Sensors
│ │ ├── AbstractSensor.cs
│ │ ├── ActiveWindowSensor.cs
│ │ ├── CPULoadSensor.cs
│ │ ├── CurrentClockSpeedSensor.cs
│ │ ├── CurrentVolumeSensor.cs
│ │ ├── DummySensor.cs
│ │ ├── GpuLoadSensor.cs
│ │ ├── GpuTemperatureSensor.cs
│ │ ├── LastActiveSensor.cs
│ │ ├── LastBootSensor.cs
│ │ ├── MasterVolumeSensor.cs
│ │ ├── MemoryUsageSensor.cs
│ │ ├── MicrophoneActiveSensor.cs
│ │ ├── MicrophoneProcessSensor.cs
│ │ ├── NamedWindowSensor.cs
│ │ ├── SessionStateSensor.cs
│ │ ├── UserNotificationStateSensor.cs
│ │ ├── WebcamActiveSensor.cs
│ │ ├── WebcamProcessSensor.cs
│ │ └── WMIQuerySensor.cs
│ ├── hass-workstation-logo.ico
│ ├── hass-workstation-service_1_TemporaryKey.pfx
│ ├── hass-workstation-service.csproj
│ ├── hass-workstation-service.deps.json
│ ├── hass-workstation-service.exe
│ ├── hass-workstation-service.runtimeconfig.json
│ ├── hass-workstation-service_TemporaryKey.pfx
│ ├── libHarfBuzzSharp.dll
│ ├── libSkiaSharp.dll
│ ├── Program.cs
│ ├── Properties
│ │ ├── launchSettings.json
│ │ └── PublishProfiles
│ │ ├── AzureHosted.pubxml
│ │ ├── ClickOnceFrameworkDependent.pubxml
│ │ ├── ClickOnceProfile.pubxml
│ │ ├── FolderProfile.pubxml
│ │ └── SelfContainedClickOnce.pubxml
│ ├── UserInterface.exe
│ └── Worker.cs
├── hass-workstation-service.sln
├── lib
│ ├── CoreAudio.dll
│ └── readme.txt
├── LICENSE
├── README.md
└── UserInterface
├── App.axaml
├── App.axaml.cs
├── Assets
│ └── hass-workstation-logo.ico
├── ITrayIcon.cs
├── nuget.config
├── Program.cs
├── Properties
│ └── PublishProfiles
│ ├── FolderProfile.pubxml
│ └── Standalone.pubxml
├── UserInterface.csproj
├── Util
│ └── OpenBrowser.cs
├── ViewLocator.cs
├── ViewModels
│ ├── AddCommandViewModel.cs
│ ├── AddSensorViewModel.cs
│ ├── BackgroundServiceSettingsViewModel.cs
│ ├── BrokerSettingsViewModel.cs
│ ├── CommandSettingsViewModel.cs
│ ├── GeneralSettingsViewModel.cs
│ ├── InfoViewModel.cs
│ ├── MainWindowViewModel.cs
│ ├── SensorSettingsViewModel.cs
│ └── ViewModelBase.cs
├── Views
│ ├── AddCommandDialog.axaml
│ ├── AddCommandDialog.axaml.cs
│ ├── AddSensorDialog.axaml
│ ├── AddSensorDialog.axaml.cs
│ ├── AppInfo.axaml
│ ├── AppInfo.axaml.cs
│ ├── BackgroundServiceSettings.axaml
│ ├── BackgroundServiceSettings.axaml.cs
│ ├── BrokerSettings.axaml
│ ├── BrokerSettings.axaml.cs
│ ├── CommandSettings.axaml
│ ├── CommandSettings.axaml.cs
│ ├── GeneralSettings.axaml
│ ├── GeneralSettings.axaml.cs
│ ├── MainWindow.axaml
│ ├── MainWindow.axaml.cs
│ ├── SensorSettings.axaml
│ └── SensorSettings.axaml.cs
└── Win
├── Interop
│ ├── BalloonFlags.cs
│ ├── IconDataMembers.cs
│ ├── IconState.cs
│ ├── MouseEvent.cs
│ ├── NotifyCommand.cs
│ ├── NotifyIconData.cs
│ ├── NotifyIconVersion.cs
│ ├── WinApi.cs
│ ├── WindowClass.cs
│ ├── WindowMessageSink.cs
│ └── WindowsMessages.cs
├── NotifyIcon.cs
└── WindowsTrayIcon.cs
23 directories, 128 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论