Please login or register.

Login with username, password and session length
Pages: 1 [2] 3

Author Topic: Google Home and X10  (Read 29190 times)

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Google Home and X10
« Reply #15 on: December 06, 2017, 04:33:31 PM »

Using web hooks with IFTTT one may be able to trigger HA-Bridge devices.
However you'll need to be sure you have security enabled for the bridge.
I'll experiment with this over the next few days.
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Google Home and X10
« Reply #16 on: December 06, 2017, 06:16:27 PM »

Using web hooks and IFTTT will work. However since the device IDs can change in the bridge this would be unstable B:( 
I believe I can get this to work however using the web server in PCC.(ultralite)
If so I'll re-write it for Alex10 making it even simpler.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

lazydiyer

  • Newbie
  • Helpful Post Rating: 9
  • Posts: 5
Re: Google Home and X10
« Reply #17 on: December 08, 2017, 08:37:09 PM »

Part One:

Hi to anyone interested.

So here is a simple tutorial on getting Google Home to control your X10 devices, as of Dec 8, 2017.
I originally tried to write a very brief tutorial but I tend to be wordy when writing, so it expanded
quickly.

I'm not used to writing pure text tutorials so please forgive any lack of clarity.
I'm going to assume most everyone using X10 on this forum is at least a little bit of a tinkerer,
so I'll keep the info at a fairly high level except for the IFTTT details which is where I think the
help is really needed. I'll be as specific on the IFTTT steps as I can be.


First a really brief overview so you can see what we are trying to do.

Controlling X10 devices with Google Home consists of a series of links in a chain:

1] You issue a voice command to Google Home
2] Google talks to IFTTT, changing your voice command to a digital instruction.
3] IFTTT interprets the digital instruction, and performs a pre-defined action
    - in our case it sends a web command to X10 Commander on our home server
4] Melloware's free X10 Commander software then interprets the web command and sends the
   equivalent X10 command to our X10 device over the powerline.

The whole process is ridiculously fast and in practice a light will turn on in just 2-3
seconds... which is a very natural feeling pause if that makes any sense to anyone.


Okay, lets get some preliminary info out of the way. It will make the explanation easier if you
are clear on the pieces of info you need at each step.

WAN_IP  - this is the internet address of your home router or gateway, as seen from the outside.
        - for example, as if you were connecting to home from your work computer.
        - an easy way to get this is visit ipchicken.com and make note of the address they display

WAN_PORT - this is the port you will connect to on your router, from the internet

LOCAL_IP - this is the local address of your computer as seen on the 'inside' of your router,
           or the inside of your home network if thats clearer.
         - in windows, run cmd.exe and then type 'ipconfig" and check for the line labeled
           "IPv4 Address". it usually looks like 192.168.0.xxx or 10.0.0.x, etc.

LOCAL_PORT: X10 Commander uses port 8086 by default

DEVICE_NAME - just the X10 address of the device we want to control
            - I'll use 'A3'

DEVICE_STATE - set to either ON or OFF

-----------------------------------------
PART TWO FOLLOWS IMMEDIATELY BELOW
-----------------------------------------
Logged

lazydiyer

  • Newbie
  • Helpful Post Rating: 9
  • Posts: 5
Re: Google Home and X10
« Reply #18 on: December 08, 2017, 08:45:19 PM »

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.



Logged

Knightrider

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 62
  • Posts: 1748
  • I love my WM100!
    • This Automated House
Re: Google Home and X10
« Reply #19 on: December 08, 2017, 09:55:54 PM »

I'd give you a +2 if I were able. Enjoy this +1 on me. #:)
Logged
Remote control is cool,

but automation rules!

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Google Home and X10
« Reply #20 on: December 09, 2017, 12:43:58 AM »

I'd give you a +2 if I were able. Enjoy this +1 on me. #:)

I'll chip in the other one!

Great and very helpful effort lazydiyer. You did great. Now... literally ANY X10 user with a spare PC or laptop and either a CM15A or even a CM19A ($17).... can use the Google or Amazon device to control their X10.... for as little as ZERO dollars.

Thank you!


P.S. the Melloware link again:  https://melloware.com/x10commander/
« Last Edit: December 09, 2017, 05:18:25 PM by HA Dave »
Logged
Home Automation is an always changing technology

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13295
Re: Google Home and X10
« Reply #21 on: December 09, 2017, 05:55:25 AM »

Thank you for the information and the work that went into it.
+1 from me also.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Google Home and X10
« Reply #22 on: December 09, 2017, 07:22:13 AM »

lazydiyer, nice write up! #:)
Very helpful.
As I suspected web hooks were used!
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Google Home and X10
« Reply #23 on: December 20, 2017, 12:37:31 PM »

I had setup a smart things cloud account when I first got my Broadlink as I had planed to use it to control my TV prior to the IHA app having an Alexa skill one all setup you load the skill and your Broadlink devices are all there.
While Playing with my Google Mini to day I loaded the Smart things skill for it  and presto All my x10 and other configured devices were there :)%
Very Cool though it did take a lot of fiddling to get it just right.
directions can be found here:  https://github.com/beckyricha/Broadlink-RM-SmartThings-Alexa
There are three options 2 have local control the third which I setup is just  could control.( I don't have Tasker nor do I have a Smart things hub.
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Google Home and X10
« Reply #24 on: December 21, 2017, 04:37:37 PM »

Based on my experimenting with the Broadlink and the SmartThings cloud Hub I believe I can get Alex10 to work with it.
If so this will mean the HA-Bridge wouldn't be needed for Alexa, Google Home, or Cortana. :)%
This Should also be less work then using IFTTT as you only need to enter the device once however I do like the custom command and response of IFTTT.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Google Home and X10
« Reply #25 on: December 26, 2017, 05:11:35 PM »

Just to expand on  lazydiyer's tutorial write up.
It is possible to do dimming as well with IFTTT. :)% When you get to the chose trigger option chose phrase with a number.
this way you put # in place of where you would say the number.
Example: Dim office light # % when you say "Hey Google dim office light 50 %" it places 50 in the web request if you say 20% it places 20.
in the URL where you would put the number value you place{{numbervalue}}
this way you don't need to make a Applet for each dim value command . You can do the same for the brighten.

I've implemented this into my setup using my own Web Request listener I created since doing dim/brighten is currently a bit clumsy in SmartThings until I or someone else creates a better device handler.
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Google Home and X10
« Reply #26 on: December 26, 2017, 05:30:31 PM »

I just experimented with the text and number options In IFTTT and this helps reduce the number of Applets you need to produce even more (at least for dim and brighten commands) Also the text field option should reduce having to create both on and off applets for each x10 address. :)%
in the above example your recognition phrase would be Office light $ # % url would include {{TextField}} for dim/bright {{NumberField}} for number value
for ON/Off office light $
url would include {{textfield}} where you would place the ON or Off command
 >!
« Last Edit: December 26, 2017, 05:40:13 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

CherScoled

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: Google Home and X10
« Reply #27 on: December 27, 2017, 11:07:15 AM »

 :)+

Thanks so much lazydiyer!   #:)

And to keep everyone updated - when I went to download X10 Commander by Melloware from Google Play today -- it's now $5.


Edit - OH!   -:)  I see -- It's the X10 Commander SERVER software that is needed that is free -- the $5 download for Android or Apple would be optional.


« Last Edit: December 27, 2017, 01:09:03 PM by CherScoled »
Logged

CherScoled

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: Google Home and X10
« Reply #28 on: December 27, 2017, 12:01:35 PM »

Well...  I've had my lights on X10 for.... about 19 years.  But we set it up 19 years ago, and have essentially forgotten about it.  There were a couple things that were wonky with it -- but we got the basics, and have since forgotten all about it.  Got a Google Home for Christmas, so thought it would be cool to now control the lights with the Google Home (mini). 

But boy, I feel like a noob now.   B:(  I understand that I need to connect a computer to the system, so I'm inferring that I would need some type of CM module?  (I'm probably not saying ANY of this correctly).  So first step - I decided to try to determine the differences between CM types CM17A (that's also a Firecracker, correct? - that needs a serial port?), CM19A has a USB connector? 

Are there others?  Are there other differences in these modules other than how they connect?

Trying to think what comp I have that still has a serial port  :' so I'm leaning toward a CM19A.... but when I looked at the requirements it says "PC running Windows ® 95 OSR 2.1 with USB support, or Windows 98."  Can I assume this is MINIMUM requirements? 

I guess it's time to walk around the house and reacquaint myself with the modules we currently have!

Thanks for your help.
Logged

CherScoled

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: Google Home and X10
« Reply #29 on: December 27, 2017, 12:40:19 PM »

I noticed BestBuy had a Black Friday deal on the Google Home Mini (making it less then the Amazon Dot).
Walmart I'm told has it with a $25 Google coupon making it even cheaper in the US.
Since I'm not one for standing in line ups I ordered one online.
Once it comes in I'll post my findings to this thread.
 >!

The current deal for the Google Home Mini -- apply for a Walmart.com credit card and get a $35 credit on your statement if you make a purchase the first day you have the credit card. 

Purchase a Google Home mini (or 2 at this price) -- currently marked down from $49 to $29 on Walmart.com.  Activate the Mini before Jan 31, and get a $25 coupon for Google Express when you hook your home account to Walmart.com (able to get up to 2 $25 coupons per household). 
Logged
Pages: 1 [2] 3
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.