| Author |  | 
      
        | smarty Super User
 
  
  
 Joined: May 21 2006
 Location: United States
 Online Status: Offline
 Posts: 729
 | 
          I thought I would share how I have combined the Amazon Echo voice service with PowerHome to have what I feel is a very slick integration.
           | Posted: January 27 2017 at 10:46 | IP Logged |   |  
           | 
 |  
 My setup:
 I have an Amazon Echo or Dot in most every room of my house.  From most any location, I can say a command like “Alexa, turn on the kitchen lights” and it happens instantly and reliably.
 
 How it is done:
 On my local PowerHome machine, I run a Hue Bridge emulator (see https://github.com/bwssytems/ha-bridge).  In the emulator, I set up and define the HTTP calls that get passed to the PowerHome web server that is running on the same machine.
 
 I chose this approach for two reasons – speed and security.
 
 The Amazon Alexa has all her smarts located up in the cloud.  In my setup, the Alexa voice recognition service is the only network traffic that comes in and out of my local network environment (therefore, I use a strong Alexa account password).  Once Alexa uses the cloud to figure out that I said “turn on the kitchen lights”, the rest of the process stays within my local network.  In the Hue bridge emulator, I set up a device called “kitchen lights”.  For on/off, I program in the proper HTTP calls that will get passed to the PH web server.  Examples of on/off would look like this:
 
 http://192.168.0.106:85/ph-cgi/eval?formula=ph_insteon(%22ki tchen%20lights%22,%2017,${intensity.byte})
 
 http://192.168.0.106:85/ph-cgi/eval?formula=ph_insteongroup( %22kitchen%20lights%22,%20ioff,0)
 
 Note that since this call comes from within my network, I use the local address (192.168.0.106) of my PH machine.  My local address is a trusted IP address from within the PH web server.  Note that I am running on port 85 because I have something else on port 80.  Also note that this is not limited to just "on" or "off".  Setting the “ intensity.byte” allows me to set the brightness to any value…so I could say something like “turn on the kitchen lights to 50%” or “set TV to 35%” (and it sets the TV volume).
 
 When I “arm the house –away”, I trigger a PH macro that stops the Hue bridge emulator.  That way all voice control is disabled.  Upon disarming the house, I restart the Hue bridge emulator and voice control is seamlessly restored (you don’t want someone standing outside your house and yelling “turn off house alarm”).
 
 I presently have over 50 devices set up in my Hue bridge emulator.  I have lights, TV, TV volume, garage doors, etc, etc, all set up using voice control.  If PH can control it, it can be set up in the Hue bridge.
 
 Additional notes.....
 This approach does not require any special "wake word/phrase".  You don't have to say "Alexa, ask PowerHome...."  I think that is too wordy.  Rather, you just say Alexa, turn on....Alexa, turn off...Alexa, set...   "Turn on/Turn off/set" are Hue bridge dependencies that are baked into the Hue bridge.
 
 For my garage doors, I sometimes call them by multiple names...like "west garage door" or small garage door"...but they refer to the same door.  Because I sometimes say either, I have two Hue bridge entries (one for each alias), but they both have the same HTTP calls.
 
 
 Edited by smarty - January 27 2017 at 10:56
 
 __________________
 Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | nick7920 Senior Member
 
  
 
 Joined: March 04 2008
 Location: United States
 Online Status: Offline
 Posts: 193
 | 
          Great - I have not fully configured yet , but I think voice
           | Posted: January 30 2017 at 20:22 | IP Logged |   |  
           | 
 |  command are limited to ON, OFF and DIM/BRIGHT.
 
 can you please post the picture of add device of yours from
 ha bridge , of course block your personal info.
 
 Thanks
 
 
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | gg102 Senior Member
 
  
 
 Joined: January 29 2013
 Location: United States
 Online Status: Offline
 Posts: 246
 | 
          The way I understand this, rather than (in the
           | Posted: January 30 2017 at 20:55 | IP Logged |   |  
           | 
 |  example) using:
 
 http://192.168.0.106:85/ph-cgi/eval?
 formula=ph_insteongroup( "kitchen lights",off,0)
 
 you could put:
 http://192.168.0.106:85/ph-cgi/eval?
 formula=ph_macro("my_macro",x,y,z)
 
 Using a macro, you could do pretty much anything.
 
 But then again, I could be wrong......
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | nick7920 Senior Member
 
  
 
 Joined: March 04 2008
 Location: United States
 Online Status: Offline
 Posts: 193
 | 
          I know you can use macro ,my concern is on Amazon Echo
           | Posted: January 30 2017 at 21:07 | IP Logged |   |  
           | 
 |  Alexa verbiage useage. ON, OFF and DIM/BRIGHT. those are
 limited.
 
 example: Alexa turn kitchen light off
 yes can be creative and do different stuff thru macro.
 
 
 
 
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | smarty Super User
 
  
  
 Joined: May 21 2006
 Location: United States
 Online Status: Offline
 Posts: 729
 | 
          Nick - Concerning Alexa's limited verbiage.... On, Off, Set and Dim seem to work.
           | Posted: January 31 2017 at 07:53 | IP Logged |   |  
           | 
 |  
 Things like "Play", Volume", "Open", "Close", Alarm" and "Disarm" don't seem to work.  But there are some(somewhat clunky) work-arounds...
 
 Voice commands that I regularly use with Alexa include:
 
 Alexa, turn on/off the TV (main TV)
 Alexa turn on/off bedroom TV (other TV)
 Alexa, set TV to 30% <=sets TV volume, but can't use the reserved word "volume"
 Alexa turn on/off the Garage Door <=Open/Close don't work
 Alexa turn on/off the House Alarm
 Alexa turn on/off outside mode
 Alexa turn on/off XXX mood lights
 Alexa turn on/off all outside lights
 Alexa Dim kitchen lights to XX%.
 etc.
 
 GG - You are right.  You can use most anything including a macro or a formula.
 
 __________________
 Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | smarty Super User
 
  
  
 Joined: May 21 2006
 Location: United States
 Online Status: Offline
 Posts: 729
 | 
          Once the .jar file is running on your local machine, the Hue Bridge emulator (see https://github.com/bwssytems/ha-bridge) can seen by opening your browser to your local IP address to port 8080 (8080 is the bridge default).  Note - IE11 doesn't display the bridge properly for me,...I had to use Chrome instead.
           | Posted: January 31 2017 at 08:10 | IP Logged |   |  
           | 
 |  
 
 
   
 Starting with version 4 of the bridge, the format of the "Target Item" type boxes has changed to expandable/"drag the lower right corner" type boxes (so you can see all of your HTTP call).  Please take a look at some of the "closed issues" asking about how this new display format works. It caused questions for many of us that were used to seeing the older display style of the bridge.
 
 
 
  
 __________________
 Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | nick7920 Senior Member
 
  
 
 Joined: March 04 2008
 Location: United States
 Online Status: Offline
 Posts: 193
 | 
          Thank you -
           | Posted: January 31 2017 at 17:46 | IP Logged |   |  
           | 
 |  
 Also found that url coding need to use JavaScript
 encode, meaning you cant use ph_macro("kitchen_lt_on")
 but ph_macro(%22kitchen_lt_on%22). where 22 is Hex for
 double quotation in Ascii.
 
 yes in ver 4. its was tricky to add url in Target
 item. Thank you again.
 
 I had used IFTT where you can use more verbiage but
 again not a big fan of lowering security.
 
 Nick
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | objector Newbie
 
  
  
 Joined: August 20 2011
 Location: United States
 Online Status: Offline
 Posts: 31
 | 
          Hi All,
           | Posted: February 01 2017 at 03:17 | IP Logged |   |  
           | 
 |  
 I'm currently just starting to try setting this up with
 PowerHome and the on/off and macro commands look simple
 enough, however, what commands/syntax are you using to
 achieve variable dimming, i.e. Alexa set bedroom light
 to 50, Alexa dim bedroom light to 50, etc.
 
 Thanks
 
 Derek
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | smarty Super User
 
  
  
 Joined: May 21 2006
 Location: United States
 Online Status: Offline
 Posts: 729
 | 
          Derek,
           | Posted: February 01 2017 at 08:02 | IP Logged |   |  
           | 
 |  To having Alexa do the dimming .... The "On Items" row has to have an HTTP call with the intensity.byte usage.
 
 From my very top post:
 
 http://192.168.0.106:85/ph-cgi/eval?formula=ph_insteon(%22ki tchen%20lights%22,%2017,${intensity.byte})
 
 Edited by smarty - February 01 2017 at 08:03
 
 __________________
 Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | objector Newbie
 
  
  
 Joined: August 20 2011
 Location: United States
 Online Status: Offline
 Posts: 31
 | 
          Hi Smarty,
           | Posted: February 01 2017 at 17:13 | IP Logged |   |  
           | 
 |  
 Thanks for the reply. Evidently I was still not awake
 this morning as I totally failed to "see" or think. I
 win the dummy award on this one!!
 
 Derek
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | jeffw_00 Super User
 
  
 
 Joined: June 30 2007
 Online Status: Offline
 Posts: 935
 | 
          Hi Smarty - Very slick indeed - but, just for clarification, are you saying you have to make an entry in the hue bridge for every powerhome command you might want to make (or every device you might want to control?)
           | Posted: February 05 2017 at 10:23 | IP Logged |   |  
           | 
 |  
 Thanks!
 /j
 
 Edited by jeffw_00 - February 05 2017 at 10:23
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | nick7920 Senior Member
 
  
 
 Joined: March 04 2008
 Location: United States
 Online Status: Offline
 Posts: 193
 | 
          yes, that's ture.
           | Posted: February 05 2017 at 10:51 | IP Logged |   |  
           | 
 |  
 but still fun, when you run a command
 Alexa -echo will only say okay.
 but I have wireless speakers where PH will
 return more info for me.
 
 Nick
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | DennisWeller Newbie
 
  
  
 Joined: April 12 2016
 Location: United States
 Online Status: Offline
 Posts: 2
 | 
          Is the Echo the way to go for this type of functionality?
           | Posted: February 06 2017 at 13:26 | IP Logged |   |  
           | 
 |  
 Does anyone have any experience with a different product that they would
 recommend more or perhaps caution against?
 
 I am looking for a voice control protocol, but I would like to have more options
 to consider.
 
 I am especially interested in a product that has any open source features.
 Something that seems like it will keep up with the changing landscape of home
 automation.
 
 Any help on making this kind of choice would be much appreciated.
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | smarty Super User
 
  
  
 Joined: May 21 2006
 Location: United States
 Online Status: Offline
 Posts: 729
 | 
          Dennis,
           | Posted: February 06 2017 at 15:26 | IP Logged |   |  
           | 
 |  Your question is somewhat off topic, but let me take a stab.....
 
 An Echo, or Dot or even GoogleHome provides the great voice recognition and great microphone hardware that most Home Automation (HA) systems have been lacking.
 
 There are many decent HA systems out there...some more DYI that others....PowerHome is my personal favorite.
 
 What we are doing here is "bridging" what an Echo/Dot/GoogleHome brings to the mix with what your HA system already can control...that is what is gained here.
 
 
 
 Edited by smarty - February 06 2017 at 15:27
 
 __________________
 Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | smarty Super User
 
  
  
 Joined: May 21 2006
 Location: United States
 Online Status: Offline
 Posts: 729
 | 
          
           | Posted: February 06 2017 at 15:39 | IP Logged |   |  
           | 
 |  
| jeffw_00 wrote: 
 
    
    | 
      
       | Hi Smarty - Very slick indeed - but, just for clarification, are you saying you have to make an entry in the hue bridge for every powerhome command you might want to make (or every device you might want to control?) 
 Thanks!
 /j
 |  |  |  
 Yes that is correct.  You may even want to add the same item a couple of ways.  For example:
 Sometimes the wife says "dining lights", sometime she says "dining room lights".  By putting them both in the bridge, I greatly increase the WAF :)
 
 __________________
 Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          Bah. I'm trying to get this to work with Google Assistant and I should have worked from that end first. I got the bridge set up and working. Trying to add the bridge to the Assistant just tosses me to the Hue login page, which is mentioned in the docs as my configuration being wrong...
           | Posted: March 19 2017 at 10:24 | IP Logged |   |  
           | 
 |  
 Update:
 Double bah. Looks like this statement also applies to Assistant...
 
 ATTENTION: This requires a physical Amazon Echo, Dot or Tap and does not work with prototype devices built using the Alexa Voice Service e.g. Amazon's Alexa AVS Sample App and Sam Machin's AlexaPi. The AVS version does not have any capability for Hue Bridge discovery!
 
 Google Home is $129, but an Echo Dot is only  $49...
 
 Edited by TonyNo - March 19 2017 at 11:02
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          Picked up a Dot. Works great!
           | Posted: March 19 2017 at 15:16 | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |       | 
       
       
        |  | 
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          Switched to Google Home instead since that would enable using the new Google Assistant on my phone/tablet etc. Cheaper solution in the long run for >2 points of control.
           | Posted: March 21 2017 at 19:50 | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |       | 
       
       
        |  | 
        | GCollins Groupie
 
  
  
 Joined: March 27 2011
 Location: United States
 Online Status: Offline
 Posts: 54
 | 
          
           | Posted: March 10 2023 at 12:30 | IP Logged |   |  
           | 
 |  
| smarty wrote: 
 
    
    | 
      
       | I thought I would share how I have combined the Amazon Echo voice service with PowerHome to have what I feel is a very slick integration. 
 
 |  |  |  
 smarty, I'm a bit late to the party, but thanks for this post!  I agree, this is very slick integration!
 
 Unfortunately, I'm having a bit of trouble getting it working.  gg102 has been very helpful in making sure my syntax was correct for calling PH macros.  For instance:
 
 http://192.168.10.60:81/ph-cgi/eval?formula=ph_macro(%22RM_G ARAGE_ON%22)
 
 The above command works fine when submitted from a browser on the same network.  The PH status bar and event log never show the web access (oddly), just the macro execution and the resulting two outgoing X10 commands.
 
 But when the same command is issued from an HA-Bridge test button, the PH status bar indicates that the command was received but fails to execute it:
 
 Last Event: Web Access (in red) From 192.168.10.60GET /ph-cgi/eval?formula=ph_macro(%22RM_GARAGE_ON%22) HTTP/1.1Host 192.168.10.60:81
 Connection: Keep-AliveUser-Agent: Appache-HttpClient/4.5.13 (Java/1.8.0_361)Accept-Encoding: gzip,deflate"
 
 And for some reason, the above entry in the PH status bar never appears in the event log (again, seems odd).
 
 The PH PC is Win10 22H2 with PH v2.1.5c listening on port 81 and HA-Bridge v5.4.1 listening on port 80.
 
 I've had a hunch that this due to an authentication problem, but whatever the issue is I can't seem to get past it.
 
 Any idea what I'm missing?
 
 Edited by GCollins - March 10 2023 at 15:57
 
 __________________
 PH2 Integr: JV Digital, Compose, Harmony, Insteon, Leviton, X10-Pro, DSC, Radio Shack, HA-Bridge/Alexa, UniFi Protect
 Alexa Integr: Ecobee, Philips Hue, UniFi Protect, Sengled Zigbee, Kasa WiFi
 
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | GCollins Groupie
 
  
  
 Joined: March 27 2011
 Location: United States
 Online Status: Offline
 Posts: 54
 | 
          OK, I got it fixed!
           | Posted: March 10 2023 at 19:35 | IP Logged |   |  
           | 
 |  
 First, (oddly) I found "Web Access" and "Trusted Web Acc:" were both disabled in Setup,Logs. Crazy, and explains the out-of-sync status line.
 
 Once logging was enabled I could easily see the HA-Bridge access attempts were not trusted (red) vs trusted (blue - loopback).  An authentication issue, as
 suspected.
 
 This led to the discovery that the entries in the Trusted IP's list in Setup,Web had spaces between them despite the warning to "use no spaces"!  More craziness.
 
 All that's fixed up now and commands from HA-Bridge are sailing through.
 
 Next step: Alexa.
 
 
 
 
 __________________
 PH2 Integr: JV Digital, Compose, Harmony, Insteon, Leviton, X10-Pro, DSC, Radio Shack, HA-Bridge/Alexa, UniFi Protect
 Alexa Integr: Ecobee, Philips Hue, UniFi Protect, Sengled Zigbee, Kasa WiFi
 
 
 | 
       
        | Back to Top |     | 
       
       
        |  |