PART TWO
Now, lets get started with IFTTT.
Go to ifttt.com and sign up for an account.
Hint: sign into a Chrome browser first, with the credentials you use for Google Home. Then when you go
to IFTTT, tell it to use google credentials and IFTTT and Google will just link everything up for you.
Easy! To clarify, IFTTT is already a registered service with Google Home so they already know how to
talk to each other. All we're doing is linking _our_ Google Home with _our_ IFTTT commands.
IFTTT stands for if THIS then THAT.
'THIS' is known as a trigger.
'THAT' is known as an action.
So what we're really doing here is assigning a specific action(s) to a specific trigger(s).
In our case, the TRIGGER is a spoken phrase sent to IFTTT via Google Home.
And the ACTION we would like to take is to send a web command to X10 Commander on our home server.
STEP BY STEP:
Sign in to IFTTT
From the top menu, click 'My Applets'
On the upper right side of the screen, click 'New Applet'
Click the big blue '+this' link
Click 'Google Assistant' << GA is what actually makes Google Home smart
Click 'Say a Simple Phrase'
Fill out the form:
Q. What do you want to say?
Type: Turn on the front door light
Q. What do you want the Assistant to say in response?
Type: Banana
Q. Language
Select English... or whatever
Click 'Create Trigger'
Now, click the big blue '+that' link
Click 'webhooks' << this is the magic, and why all of the older youtube examples fail
Click 'Make a Web Request'
**************************************************************
Okay, we're going to pause here and construct our web request.
It should be formatted like this:
ht tp://WAN_IP:WAN_PORT/?x10command=DEVICE~sendplc~%22DEVICE_NAME%20DEVICE_STATE%22
where WAN_IP, WAN_PORT and DEVICE_NAME were defined above
A _real_ example (although I just made up the WAN_IP address):
ht tp://66.131.88.125:38000/?x10command=DEVICE~sendplc~%22A3%20ON%22
where WAN_IP = 66.131.88.125
WAN_PORT = 38000
DEVICE_NAME = A3
DEVICE_STATE = ON
Quick note: "sendplc" above is the 'send powerline command', which works for the CM19 controller
for sure but 'should' work for other controller devices too
Now back to IFTTT's action setup...
*****************************************************************
Fill out the form:
Q. URL
Type in your constructed URL _precisely_.
Every letter and symbol matters.
Q. Method
Type: Get
Q. Content Type
Select: application/w-www-form-urlencoded
Click 'Create action'
And that should be it for IFTTT.
The last part of the puzzle is setting up port fowarding on your home router to accept
traffic on port: WAN_PORT and sending it to your home server at LOCAL_IP:LOCAL_PORT.
Setting up that part is not really hard but the specific instructions vary widely between
hardware models. Just google your router model and the words "port forward" and you
should find tutorials for pretty much everything.
And of course, you should have X10 Commander installed on your windows server.
There's really nothing to configure beyond what X10 control device you're using.
I use a CM19, so I selected that from the dropdown in the upper right corner of the
software.
Test it out:
Say "Turn on the front door light"
And GH should reply with "Banana".
Okay, you don't have to get it to say banana, but you'll want to use unique responses at first
to help troubleshoot any problems in your setup. I just like the word banana.
I also like minions
And finally, repeat.
It should be easy to add any number of commands, while simply substituting DEVICE_NAME and
DEVICE_STATE.
I'll leave this tutorial here. Its very wordy already but I hope it helps a few people out.
I'm new to the forum but I'll try to pop back in now and then to see if there are any questions
I can help with.
Good luck.
Nope, don't need luck. Should be fine.
Have fun !
Lazydiyer
PS> None of this works without the free software X10 Commander from Melloware.
Its not very pretty but it is VERY flexible. I invite you to buy either their iphone
or android app as support and a thank-you for making this software available.
L.