|
1 | 1 | # HomeComputerControl |
2 | | -Control your computer with Google Home |
| 2 | +Control your computer with Google Home! |
| 3 | + |
| 4 | +This simple program lets you tell your Google Home to do basic tasks on your computer like; |
| 5 | +### Supported computer actions |
| 6 | +- Shutdown |
| 7 | +- Restart |
| 8 | +- Sleep / Hibernate |
| 9 | +- Lock |
| 10 | +- Logout |
| 11 | +- _more to come_ |
| 12 | + |
| 13 | +This software is Windows, only made for, and tested on, Windows 10 so far. |
| 14 | + |
| 15 | +No coding is required - you can simply grab the `HomeComputerControl.exe` file and follow the setup-instructions below. |
| 16 | +If you want to add your own features to the project it's easy! The entire project is made made in C#. The code is opensource and quite simple, so feel free to use the code in your own fork or even better; submit pull requests! |
| 17 | + |
| 18 | +## Setup |
| 19 | +All this program does is tell the computer what to do from reading a `.txt` file and execute the action that the file tells it to. Everything with the Google Home is handled [IFTTT](https://ifttt.com/) & [Dropbox](https://www.dropbox.com/). |
| 20 | +If you're familiare with IFTTT you can probably skip the first three steps. |
| 21 | + |
| 22 | +In this setup guide we will setup the shutdown action. |
| 23 | + |
| 24 | +### Step 1 |
| 25 | +Register an IFTTT and Dropbox account if you haven't already |
| 26 | + |
| 27 | +**Requirements;** |
| 28 | +- An [IFTTT](https://ifttt.com/) account |
| 29 | +- A [Dropbox](https://www.dropbox.com/) account |
| 30 | + |
| 31 | + |
| 32 | +### Step 2 |
| 33 | +_Creating the applet "this"_ |
| 34 | +- Go to https://ifttt.com/create to create a new applet |
| 35 | +- Press "+this" and type "Google Assistant" in the search field |
| 36 | +- Click the Google Assistant box and choose "Say a simple phrase" |
| 37 | + |
| 38 | +### Step 3 |
| 39 | +_Creating the trigger_ |
| 40 | +Here you have to define what Google will react to. The first three input fields are for the voice-commands that will activate the shutdown sequence. |
| 41 | +Below is an example. You can write _whatever_ you want. |
| 42 | + |
| 43 | + |
| 44 | +The next field defines what you want the Google Assistant to respond, could be "Okay, turning off your computer" or "Alright boss" - anything. |
| 45 | + |
| 46 | +When you're finished, press "Create Trigger" |
| 47 | + |
| 48 | +### Step 4 |
| 49 | +Now we've defined what will trigger the computer-shutdown, next press "+that". |
| 50 | +- Search for "Dropbox" |
| 51 | +- Select "Create a text file" |
| 52 | + |
| 53 | +Once again we have a few input fields that we need to fill out, but now it's important that we put the _right_ content into these inputs. |
| 54 | + |
| 55 | +The first field, "File name" should be `computerAction`. The "Content" field below needs to be `shutdown`. |
| 56 | +Now, the last field, "Dropbox folder path" can be anything you like. This is just the folder in your Dropbox the file will be created in. In this setup guide we're gonna go for "IFTTT/". |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | +When you're done, press "Create action" |
| 61 | + |
| 62 | +### Step 5 |
| 63 | +The next input that pops up is just the title / description for your applet, it can be anything you like. To finish the applet press "Finish". |
| 64 | +Now we're done on the IFTTT-side. To test your applet you can say "Hey Google -" and then the trigger you entered in _Step 3_. For me it's "Hey Google, shut down my computer" and Google will respond "Turning off your computer". This should create a file called `computerAction.txt`, containing `shutdown`, in the folder you specified. |
| 65 | + |
| 66 | +### Step 6 |
| 67 | +Grab the latest `HomeComputerControl.exe` from [Releases](https://github.com/AlbertMN/HomeComputerControl/releases) and place the file in the same Dropbox-folder that the `computerAction.txt` file is being generated in. |
| 68 | + |
| 69 | + |
| 70 | +### Step 7 |
| 71 | +If you want this software to work every time you start your computer (which you most likely do), you need to add a shortcut of the `HomeComputerControl.exe` in the Windows Startup-folder: |
| 72 | +- Press "Win + R" keys |
| 73 | +- Type `shell:startup` and press `OK` |
| 74 | +- Place the shortcut here _("[How to create a shortcut on Windows](http://www.thewindowsclub.com/create-desktop-shortcut-windows-10)")_ |
| 75 | + |
| 76 | +### Done! |
| 77 | +Now open the `HomeComputerControl.exe` file and you're good to go! |
| 78 | +Try tell your (Google) assistant to shut down your computer now, and it will do it! |
| 79 | + |
| 80 | + |
| 81 | +## How to impliment the other actions |
| 82 | +The setup just showed how to shutdown your computer, not restart, sleep, logout etc. These setups are almost _exactly_ the same as shutdown. All you have to do is type any of the following lines instead of `shutdown` in the "Content" field _(Step 4)_; |
| 83 | + |
| 84 | +### List of supported actions |
| 85 | +- `shutdown` |
| 86 | +- `restart` |
| 87 | +- `sleep` |
| 88 | +- `logout` |
| 89 | +- `lock` |
| 90 | + |
| 91 | +Set any of these as "Content" in the creation of the Dropbox file (IFTTT) and it will work! |
0 commit comments