From 02f7e1d3229ab1a70dafafaa625d2abaa023c7ec Mon Sep 17 00:00:00 2001 From: TerminalMan <84923604+SecretiveShell@users.noreply.github.com> Date: Thu, 5 Aug 2021 23:45:32 +0100 Subject: [PATCH 01/11] Create Sensors.md --- documentation/Sensors.md | 86 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 documentation/Sensors.md diff --git a/documentation/Sensors.md b/documentation/Sensors.md new file mode 100644 index 0000000..5f8a041 --- /dev/null +++ b/documentation/Sensors.md @@ -0,0 +1,86 @@ +# Sensors + +Sensors are used to transfer data about the host system to an automation hub, where it can be processed. `hass-workstation-service` provides many sensors, and they are lisited below in the same order as listed in the configuration GUI. + +### ActiveWindowSensor + +The active window sensor returns the title of the currently selected window, and is the same value shown when hovering over the icon in the windows task bar. + +This sensor is commonly used to trigger automations when a specific program is in use, such as pausing audio during a skype call. This sensor can be unreliable when used with applications such as web browsers that update their title based on the current context. You can partially resolve this using regular expressions. + +### CPULoadSensor + +The CPU load sensor is used to determine the current utilization of the CPU, and returns a percentage value. + +### CurrentClockSpeedSensor + +The current clock speed sensor returns the base system clock as configured in the bios. **It does not return the current operating frequency of the CPU** + +### CurrentVolumeSensor + +This sensor returns the current volume of playing audio. **It does not return the master volume.** If you have no sound playing the value will be 0. + +### DummySensor + +This sensor produces a random output every second, and is intended to test latency and connectivity. + +### GPULoadSensor + +This is the same as the [CPULoadSensor](https://github.com/sleevezipper/hass-workstation-service/new/master/documentation#cpuloadsensor), but for the GPU. + +### GPUTemperatureSensor + +The GPU temperature returns the current operating temperature of the GPU. This sensor is useful for controling external cooling systems such as air conditioning. + +### LastActiveSensor + +The last active sensor returns the time when the workstation was last active (last keyboard and mouse input). It is useful as a form of presence detection when combined with motion sensors or software such as room assistant, although may not be reliable if used with auto clickers or other macro software commonly used for video game automation. + +### LastBootSensor + +The last boot sensor returns the time the windows computer booted. It can be used to calculate uptime, if combined with another sensor to detect system shutdowns. + +### MemoryUsageSensor + +This returns the amount of system memory used as a percentage value, as indicated by the task manager. + +### MicrophoneActiveSensor + +This is a binary sensor that can be used to detect if the microphone is in use. **It does not return what process is using it** + +### NamedWindowSensor + +The named window sensor is similar to the [ActiveWindowSensor](https://github.com/sleevezipper/hass-workstation-service/new/master/documentation#activewindowsensor), however it is a binary sensor that returns true if a window with a title matching a pre determined value is detected. + +### SessionStateSensor + +The session state sensor can be used to detect if someone is logged in. It has the following values : + +|State|Explanation| +|---|---| +|Locked|All user sessions are locked.| +|LoggedOff|No users are logged in.| +|InUse|A user is currently logged in.| +|Unknown|Something went wrong while getting the status.| + +### UserNotificationState + +This sensor watches the UserNotificationState. This is normally used in applications to determine if it is appropriate to send a notification but we can use it to expose this state. Notice that this status does not watch Focus Assist. It has the following possible states: + +|State|Explanation| +|---|---| +|NotPresent|A screen saver is displayed, the machine is locked, or a nonactive Fast User Switching session is in progress. | +|Busy|A full-screen application is running or Presentation Settings are applied. Presentation Settings allow a user to put their machine into a state fit for an uninterrupted presentation, such as a set of PowerPoint slides, with a single click.| +|RunningDirect3dFullScreen|A full-screen (exclusive mode) Direct3D application is running.| +|PresentationMode|The user has activated Windows presentation settings to block notifications and pop-up messages.| +|AcceptsNotifications|None of the other states are found, notifications can be freely sent.| +|QuietTime|Introduced in Windows 7. The current user is in "quiet time", which is the first hour after a new user logs into his or her account for the first time. During this time, most notifications should not be sent or shown. This lets a user become accustomed to a new computer system without those distractions. Quiet time also occurs for each user after an operating system upgrade or clean installation.| +|RunningWindowsStoreApp|A Windows Store app is running.| + +### WebcamActiveSensor + +The webcam active sensor returns the status of the webcam. + +### WMIQuerySensor + +Please see the specific documentaion page [here](). From b6170af1f75408effca7f5c825316916f7fb22c6 Mon Sep 17 00:00:00 2001 From: TerminalMan <84923604+SecretiveShell@users.noreply.github.com> Date: Thu, 5 Aug 2021 23:51:44 +0100 Subject: [PATCH 02/11] Create WMIQuery.md --- documentation/WMIQuery.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 documentation/WMIQuery.md diff --git a/documentation/WMIQuery.md b/documentation/WMIQuery.md new file mode 100644 index 0000000..f294020 --- /dev/null +++ b/documentation/WMIQuery.md @@ -0,0 +1,28 @@ +# WMIQuerySensor + +The WMI query sensor is and advanced sensor that executes a user defined [WMI query](https://docs.microsoft.com/en-us/windows/win32/wmisdk/wmi-and-sql) and exposes the result. It should return a single value. + +For example, If you wanted to find the current CPU frequency, the command : + +```sql +SELECT * FROM Win32_Processor +``` + +returns + +`|64|9|To Be Filled By O.E.M.|3|Intel64 Family 6 Model 94 Stepping 3|252|1|Win32_Processor|4008|12|64|Intel64 Family 6 Model 94 Stepping 3|CPU0|100|198|1024|8192|0|6|4|GenuineIntel|4008|Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz|4|4|8|To Be Filled By O.E.M.|False|BFEBFBFF000506E3|3|24067|CPU|False|To Be Filled By O.E.M.|U3E1|OK|3|Win32_ComputerSystem|GAME-PC-2016|8|1|False|False|` + +This query cannot be used, and instead you should try + +```sql +SELECT CurrentClockSpeed FROM Win32_Processor +``` + +which results in `4008` for my PC. Because this query retuens a single value (CPU frequency in MHz), it can be used with the current WMI query sensor implementation. + +You can use [WMI Explorer](https://github.com/vinaypamnani/wmie2/tree/v2.0.0.2) to find see what data is available, or alternatively look at the user submited sensors below: + + +|Query|Explanation|Submitted by| +|---|---|---| +|`SELECT username FROM Win32_ComputerSystem`|Shows the current user|@grizzlyjere| From 0b624957f8de3a13585dcf2d1156e42bdaf8f2ea Mon Sep 17 00:00:00 2001 From: TerminalMan <84923604+SecretiveShell@users.noreply.github.com> Date: Thu, 5 Aug 2021 23:52:30 +0100 Subject: [PATCH 03/11] Update Sensors.md --- documentation/Sensors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/Sensors.md b/documentation/Sensors.md index 5f8a041..fee136d 100644 --- a/documentation/Sensors.md +++ b/documentation/Sensors.md @@ -83,4 +83,4 @@ The webcam active sensor returns the status of the webcam. ### WMIQuerySensor -Please see the specific documentaion page [here](). +Please see the specific documentaion page [here](https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/WMIQuery.md#wmiquerysensor). From a16ee7435cd3074f2176f23786272bdb35875896 Mon Sep 17 00:00:00 2001 From: TerminalMan <84923604+SecretiveShell@users.noreply.github.com> Date: Fri, 6 Aug 2021 00:20:02 +0100 Subject: [PATCH 04/11] Update README.md --- README.md | 107 +++--------------------------------------------------- 1 file changed, 5 insertions(+), 102 deletions(-) diff --git a/README.md b/README.md index 6786e53..836dacf 100644 --- a/README.md +++ b/README.md @@ -62,110 +62,13 @@ The application provides several sensors. Sensors can be configured with a name Sensors publish their state on their own interval which you can configure and only publish when the state changes. -### UserNotificationState +Here is a list of the most commonly used sensors with the full documentation [here](): -This sensor watches the UserNotificationState. This is normally used in applications to determine if it is appropriate to send a notification but we can use it to expose this state. Notice that this status does not watch Focus Assist. It has the following possible states: - -|State|Explanation| -|---|---| -|NotPresent|A screen saver is displayed, the machine is locked, or a nonactive Fast User Switching session is in progress. | -|Busy|A full-screen application is running or Presentation Settings are applied. Presentation Settings allow a user to put their machine into a state fit for an uninterrupted presentation, such as a set of PowerPoint slides, with a single click.| -|RunningDirect3dFullScreen|A full-screen (exclusive mode) Direct3D application is running.| -|PresentationMode|The user has activated Windows presentation settings to block notifications and pop-up messages.| -|AcceptsNotifications|None of the other states are found, notifications can be freely sent.| -|QuietTime|Introduced in Windows 7. The current user is in "quiet time", which is the first hour after a new user logs into his or her account for the first time. During this time, most notifications should not be sent or shown. This lets a user become accustomed to a new computer system without those distractions. Quiet time also occurs for each user after an operating system upgrade or clean installation.| -|RunningWindowsStoreApp|A Windows Store app is running.| - -### ActiveWindow - -This sensor exposes the name of the currently focused window. - -### WebcamActive - -This sensor shows if the webcam is currently being used. It uses the Windows registry to check will work from Windows 10 version 1903 and higher. - -### MicrophoneActive - -This sensor shows if the microphone is currently being used. It uses the Windows registry to check and will work from Windows 10 version 1903 and higher. - -### CPULoad - -This sensor checks the current CPU load. It averages the load on all logical cores every second and rounds the output to two decimals. - -### GPULoad - -This sensor returns the current GPU load. This should work for both NVidia and AMD GPU's. - -### GPUTemperature - -This sensor returns the current temperature of the GPU in °C. This should work for both NVidia and AMD GPU's. - -### UsedMemory - -This sensor calculates the percentage of used memory. - -### CurrentClockSpeed - -This sensor returns the BIOS configured baseclock for the processor. - -### WMIQuery - -This advanced sensor executes a user defined [WMI query](https://docs.microsoft.com/en-us/windows/win32/wmisdk/wmi-and-sql) and exposes the result. The query should return a single value. - -For example: - -```sql -SELECT * FROM Win32_Processor -``` - -returns - -`|64|9|To Be Filled By O.E.M.|3|Intel64 Family 6 Model 94 Stepping 3|252|1|Win32_Processor|4008|12|64|Intel64 Family 6 Model 94 Stepping 3|CPU0|100|198|1024|8192|0|6|4|GenuineIntel|4008|Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz|4|4|8|To Be Filled By O.E.M.|False|BFEBFBFF000506E3|3|24067|CPU|False|To Be Filled By O.E.M.|U3E1|OK|3|Win32_ComputerSystem|GAME-PC-2016|8|1|False|False|` - -This cannot not be used for this sensor. Instead try - -```sql -SELECT CurrentClockSpeed FROM Win32_Processor -``` - -which results in `4008` for my PC. - -You can use [WMI Explorer](https://github.com/vinaypamnani/wmie2/tree/v2.0.0.2) to find see what data is available. - -Here's some queries from other users: - -|Query|Explanation|Thanks| -|---|---|---| -|`SELECT username FROM Win32_ComputerSystem`|Shows the current user|@grizzlyjere| - -Want to add you query here? Please create a pull request or open an issue. - -### LastActive - -This sensor returns the date/time that the workstation was last active. Typing or moving your mouse will reset the date/time. - -### LastBoot - -This sensor returns the date/time that Windows was last booted. - -### SessionState - -This sensor returns the current session state. It has the following possible states: - -|State|Explanation| +|command|use| |---|---| -|Locked|All user sessions are locked.| -|LoggedOff|No users are logged in.| -|InUse|A user is currently logged in.| -|Unknown|Something went wrong while getting the status.| - -### CurrentVolume - -This sensor returns the volume of the currently playing audio. So if you're listening to music and you pause, this sensor will return 0 (or at least a very low value). - -### Dummy - -This sensor spits out a random number every second. Useful for testing, maybe you'll find some other use for it. +|ActiveWindow|Exposes the currently selected window| +|WebcamActive|Exposes the microphone state| +|MicrophoneActive|Exposes the webcam state| ## Commands From e6e3c93827f2920d202176bb03b8d3ca5ebfb20b Mon Sep 17 00:00:00 2001 From: TerminalMan <84923604+SecretiveShell@users.noreply.github.com> Date: Sat, 7 Aug 2021 09:49:53 +0100 Subject: [PATCH 05/11] Create commands.md --- documentation/commands.md | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 documentation/commands.md diff --git a/documentation/commands.md b/documentation/commands.md new file mode 100644 index 0000000..5b1d30d --- /dev/null +++ b/documentation/commands.md @@ -0,0 +1,41 @@ +# Commands + +Commands can be used to trigger certain things on the client. For each command, a switch will be available in Home Assistant. Turning on the switch fires the command on the client and it will turn the switch off when it's done. Turning it off will cancel the running command. + +### ShutdownCommand + +This command shuts down the computer immediately. It runs `shutdown /s`. + +### RestartCommand + +This command restarts the computer immediately. It runs `shutdown /r`. + +### LogOffCommand + +This command logs off the current user. It runs `shutdown /l`. + +### CustomCommand + +This command allows you to run any Windows Commands. The command will be run in a hidden Command Prompt. Some examples: + +|Command|Explanation| +|---|---| +|shutdown /s /f /t 000|Forcefully shutdown the PC immediately.| +|Rundll32.exe user32.dll,LockWorkStation|This locks the current session.| +|shutdown /s /t 300|Shuts the PC down after 5 minutes (300 seconds).| +|C:\path\to\your\batchfile.bat|Run the specified batch file.| + +### KeyCommand + +Sends a keystroke with the specified key. You can pick [any of these](https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) key codes. + +### Media Commands + +There's several media commands available which are very self exlanatory. + +- Play/Pause +- Next +- Previous +- Volume up +- Volume down +- Mute (toggle) From ed5b2285d8f258be48676915dc1bf9136d5f5882 Mon Sep 17 00:00:00 2001 From: TerminalMan <84923604+SecretiveShell@users.noreply.github.com> Date: Sat, 7 Aug 2021 09:59:54 +0100 Subject: [PATCH 06/11] Update README.md --- README.md | 41 +++-------------------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 836dacf..f5ab9cb 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ The application provides several sensors. Sensors can be configured with a name Sensors publish their state on their own interval which you can configure and only publish when the state changes. -Here is a list of the most commonly used sensors with the full documentation [here](): +Here is a list of the most commonly used sensors with the full documentation [here](https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md): |command|use| |---|---| @@ -72,44 +72,9 @@ Here is a list of the most commonly used sensors with the full documentation [he ## Commands -Commands can be used to trigger certain things on the client. For each command, a switch will be available in Home Assistant. Turning on the switch fires the command on the client and it will turn the switch off when it's done. Turning it off will cancel the running command. +This application allows you to send commands over MQTT to control the host system, and will be exposed using [MQTT discovery](https://www.home-assistant.io/docs/mqtt/discovery/). Alternatively you can directly send a command from Home Assistant using this topic : `homeassistant/switch/{DeviceName}/{Name}/set`, with the payload `ON`. -### ShutdownCommand - -This command shuts down the computer immediately. It runs `shutdown /s`. - -### RestartCommand - -This command restarts the computer immediately. It runs `shutdown /r`. - -### LogOffCommand - -This command logs off the current user. It runs `shutdown /l`. - -### CustomCommand - -This command allows you to run any Windows Commands. The command will be run in a hidden Command Prompt. Some examples: - -|Command|Explanation| -|---|---| -|Rundll32.exe user32.dll,LockWorkStation|This locks the current session.| -|shutdown /s /t 300|Shuts the PC down after 5 minutes (300 seconds).| -|C:\path\to\your\batchfile.bat|Run the specified batch file.| - -### KeyCommand - -Sends a keystroke with the specified key. You can pick [any of these](https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) key codes. - -### Media Commands - -There's several media commands available which are very self exlanatory. - -- Play/Pause -- Next -- Previous -- Volume up -- Volume down -- Mute (toggle) +Here is a list of the most commonly used sensors with the full documentation [here](https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Commands.md) ## Credits From 5afe2865e993d41458d5d0c673a8598e1f828a96 Mon Sep 17 00:00:00 2001 From: TerminalMan <84923604+SecretiveShell@users.noreply.github.com> Date: Sat, 7 Aug 2021 10:00:08 +0100 Subject: [PATCH 07/11] Rename commands.md to Commands.md --- documentation/{commands.md => Commands.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename documentation/{commands.md => Commands.md} (100%) diff --git a/documentation/commands.md b/documentation/Commands.md similarity index 100% rename from documentation/commands.md rename to documentation/Commands.md From 2a3569a87d8c39e797a8da333a024d2f59fd5d1c Mon Sep 17 00:00:00 2001 From: TerminalMan <84923604+SecretiveShell@users.noreply.github.com> Date: Sat, 7 Aug 2021 10:06:41 +0100 Subject: [PATCH 08/11] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f5ab9cb..32bd431 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ Sensors publish their state on their own interval which you can configure and on Here is a list of the most commonly used sensors with the full documentation [here](https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md): -|command|use| +|sensor|use| |---|---| |ActiveWindow|Exposes the currently selected window| |WebcamActive|Exposes the microphone state| @@ -76,6 +76,12 @@ This application allows you to send commands over MQTT to control the host syste Here is a list of the most commonly used sensors with the full documentation [here](https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Commands.md) +|command|use| +|---|---| +|ShutdownCommand|Shutdown the PC| +|RestartCommand|Restart the PC| +|MuteCommand|Mute the speakers| + ## Credits This project depends on work done by others and they should at least get a mention. Please note that this list is not complete yet. From 3f1c22ac9cf843481586c27bd1c26c96b0ba38d4 Mon Sep 17 00:00:00 2001 From: TerminalMan <84923604+SecretiveShell@users.noreply.github.com> Date: Sat, 7 Aug 2021 10:11:14 +0100 Subject: [PATCH 09/11] Update Commands.md --- documentation/Commands.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/documentation/Commands.md b/documentation/Commands.md index 5b1d30d..255bf62 100644 --- a/documentation/Commands.md +++ b/documentation/Commands.md @@ -31,11 +31,13 @@ Sends a keystroke with the specified key. You can pick [any of these](https://do ### Media Commands -There's several media commands available which are very self exlanatory. - -- Play/Pause -- Next -- Previous -- Volume up -- Volume down -- Mute (toggle) +There's several media commands available that allow you to control media playback. You can combine them into a media player entity as shown [here](https://pastebin.com/1VdL5iQm). + +|Command|use| +|---|---| +|Play/Pause|The same as pressing the play/pause media key| +|Next|skip to next track| +|Previous|skip to previous track| +|Volume up|Increase system master volume| +|Volume down|Decrease system master volume| +|Mute (toggle)|Mute the system| From c4e9344959c30081d408defd26d3d2f19765d53f Mon Sep 17 00:00:00 2001 From: TerminalMan <84923604+SecretiveShell@users.noreply.github.com> Date: Sat, 7 Aug 2021 21:07:05 +0100 Subject: [PATCH 10/11] Updated the more info URLs to reflect changes in documentation location --- UserInterface/Views/AddSensorDialog.axaml.cs | 32 ++++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/UserInterface/Views/AddSensorDialog.axaml.cs b/UserInterface/Views/AddSensorDialog.axaml.cs index 8c12a81..1be46e4 100644 --- a/UserInterface/Views/AddSensorDialog.axaml.cs +++ b/UserInterface/Views/AddSensorDialog.axaml.cs @@ -57,7 +57,7 @@ namespace UserInterface.Views { case AvailableSensors.UserNotificationStateSensor: item.Description = "This sensor watches the UserNotificationState. This is normally used in applications to determine if it is appropriate to send a notification but we can use it to expose this state. \n "; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#usernotificationstate"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#usernotificationstate"; item.ShowDetectionModeOptions = false; item.ShowQueryInput = false; item.ShowWindowNameInput = false; @@ -65,7 +65,7 @@ namespace UserInterface.Views break; case AvailableSensors.DummySensor: item.Description = "This sensor spits out a random number every second. Useful for testing, maybe you'll find some other use for it."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#dummy"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#dummysensor"; item.ShowDetectionModeOptions = false; item.ShowQueryInput = false; item.ShowWindowNameInput = false; @@ -73,7 +73,7 @@ namespace UserInterface.Views break; case AvailableSensors.CPULoadSensor: item.Description = "This sensor checks the current CPU load. It averages the load on all logical cores every second and rounds the output to two decimals."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#cpuload"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#cpuloadsensor"; item.ShowDetectionModeOptions = false; item.ShowQueryInput = false; item.ShowWindowNameInput = false; @@ -81,7 +81,7 @@ namespace UserInterface.Views break; case AvailableSensors.CurrentClockSpeedSensor: item.Description = "This sensor returns the BIOS configured baseclock for the processor."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#currentclockspeed"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#currentclockspeedsensor"; item.ShowDetectionModeOptions = false; item.ShowQueryInput = false; item.ShowWindowNameInput = false; @@ -89,7 +89,7 @@ namespace UserInterface.Views break; case AvailableSensors.WMIQuerySensor: item.Description = "This advanced sensor executes a user defined WMI query and exposes the result. The query should return a single value."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#wmiquerysensor"; + item.MoreInfoLink = "https://github.com/sleevezipperhass-workstation-service/blob/master/documentation/WMIQuery.md#wmiquerysensor"; item.ShowDetectionModeOptions = false; item.ShowQueryInput = true; item.ShowWindowNameInput = false; @@ -97,7 +97,7 @@ namespace UserInterface.Views break; case AvailableSensors.MemoryUsageSensor: item.Description = "This sensor calculates the percentage of used memory."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#usedmemory"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#memoryusagesensorsensor"; item.ShowDetectionModeOptions = false; item.ShowQueryInput = false; item.ShowWindowNameInput = false; @@ -105,7 +105,7 @@ namespace UserInterface.Views break; case AvailableSensors.ActiveWindowSensor: item.Description = "This sensor exposes the name of the currently active window."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#activewindow"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#activewindowsensor"; item.ShowDetectionModeOptions = false; item.ShowQueryInput = false; item.ShowWindowNameInput = false; @@ -113,63 +113,63 @@ namespace UserInterface.Views break; case AvailableSensors.WebcamActiveSensor: item.Description = "This sensor shows if the webcam is currently being used."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#webcamactive"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#webcamactivesensor"; item.ShowDetectionModeOptions = true; item.ShowQueryInput = false; item.UpdateInterval = 10; break; case AvailableSensors.MicrophoneActiveSensor: item.Description = "This sensor shows if the microphone is currently in use."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#microphoneactive"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#microphoneactivesensor"; item.ShowDetectionModeOptions = false; item.ShowQueryInput = false; item.UpdateInterval = 10; break; case AvailableSensors.NamedWindowSensor: item.Description = "This sensor returns true if a window was found with the name you search for. "; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#namedwindow"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#namedwindowsensor"; item.ShowQueryInput = false; item.ShowWindowNameInput = true; item.UpdateInterval = 5; break; case AvailableSensors.LastActiveSensor: item.Description = "This sensor returns the date/time that the workstation was last active."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#lastactive"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#lastactivesensor"; item.ShowQueryInput = false; item.ShowWindowNameInput = false; item.UpdateInterval = 5; break; case AvailableSensors.LastBootSensor: item.Description = "This sensor returns the date/time that Windows was last booted"; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#lastboot"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#lastbootsensor"; item.ShowQueryInput = false; item.ShowWindowNameInput = false; item.UpdateInterval = 5; break; case AvailableSensors.SessionStateSensor: item.Description = "This sensor returns the state of the Windows session."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#sessionstate"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#sessionstatesensor"; item.ShowQueryInput = false; item.ShowWindowNameInput = false; item.UpdateInterval = 5; break; case AvailableSensors.CurrentVolumeSensor: item.Description = "This sensor returns the volume of currently playing audio."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#currentvolume"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#currentvolumesensor"; item.ShowQueryInput = false; item.ShowWindowNameInput = false; item.UpdateInterval = 5; break; case AvailableSensors.GPUTemperatureSensor: item.Description = "This sensor returns the current temperature of the GPU in °C."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#gputemperature"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#gputemperaturesensor"; item.ShowQueryInput = false; item.ShowWindowNameInput = false; item.UpdateInterval = 5; break; case AvailableSensors.GPULoadSensor: item.Description = "This sensor returns the current GPU load."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#gpuload"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Sensors.md#gpuloadsensor"; item.ShowQueryInput = false; item.ShowWindowNameInput = false; item.UpdateInterval = 5; From 6bbbfcab422db1e3e8ba8e557de13700a94539bd Mon Sep 17 00:00:00 2001 From: TerminalMan <84923604+SecretiveShell@users.noreply.github.com> Date: Sat, 7 Aug 2021 21:12:33 +0100 Subject: [PATCH 11/11] Update AddCommandDialog.axaml.cs --- UserInterface/Views/AddCommandDialog.axaml.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/UserInterface/Views/AddCommandDialog.axaml.cs b/UserInterface/Views/AddCommandDialog.axaml.cs index a1ed877..171a2de 100644 --- a/UserInterface/Views/AddCommandDialog.axaml.cs +++ b/UserInterface/Views/AddCommandDialog.axaml.cs @@ -57,67 +57,67 @@ namespace UserInterface.Views { case AvailableCommands.CustomCommand: item.Description = "This command lets you execute any command you want. It will run in a Windows Command Prompt silently. "; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#customcommand"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Commands.md#customcommand"; item.ShowCommandInput = true; item.ShowKeyInput = false; break; case AvailableCommands.ShutdownCommand: item.Description = "This command shuts down the PC immediately. "; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#shutdowncommand"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Commands.md#shutdowncommand"; item.ShowCommandInput = false; item.ShowKeyInput = false; break; case AvailableCommands.RestartCommand: item.Description = "This command restarts the PC immediately. "; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#restartcommand"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Commands.md#restartcommand"; item.ShowCommandInput = false; item.ShowKeyInput = false; break; case AvailableCommands.LogOffCommand: item.Description = "This command logs the current user off immediately. "; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#logoffcommand"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Commands.md#logoffcommand"; item.ShowCommandInput = false; item.ShowKeyInput = false; break; case AvailableCommands.KeyCommand: item.Description = "This command can be used to emulate a keystroke. It requires a key code which you can find by clicking the info button below."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#keycommand"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Commands.md#keycommand"; item.ShowCommandInput = false; item.ShowKeyInput = true; break; case AvailableCommands.PlayPauseCommand: item.Description = "This command plays or pauses currently playing media."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#media-commands"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Commands.md#media-commands"; item.ShowCommandInput = false; item.ShowKeyInput = false; break; case AvailableCommands.NextCommand: item.Description = "This command skips to the next media."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#media-commands"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Commands.md#media-commands"; item.ShowCommandInput = false; item.ShowKeyInput = false; break; case AvailableCommands.PreviousCommand: item.Description = "This command plays previous media."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#media-commands"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Commands.md#media-commands"; item.ShowCommandInput = false; item.ShowKeyInput = false; break; case AvailableCommands.VolumeDownCommand: item.Description = "Lowers the system volume."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#media-commands"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Commands.md#media-commands"; item.ShowCommandInput = false; item.ShowKeyInput = false; break; case AvailableCommands.VolumeUpCommand: item.Description = "Raises the system volume."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#media-commands"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Commands.md#media-commands"; item.ShowCommandInput = false; item.ShowKeyInput = false; break; case AvailableCommands.MuteCommand: item.Description = "Toggles muting the system volume."; - item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#media-commands"; + item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service/blob/master/documentation/Commands.md#media-commands"; item.ShowCommandInput = false; item.ShowKeyInput = false; break;