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] 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)