Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Voice Control with PowerHome Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: January 27 2017 at 10:46 | IP Logged Quote smarty

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.

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 View smarty's Profile Search for other posts by smarty
 
nick7920
Senior Member
Senior Member


Joined: March 04 2008
Location: United States
Online Status: Offline
Posts: 193
Posted: January 30 2017 at 20:22 | IP Logged Quote nick7920

Great - I have not fully configured yet , but I think voice
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 View nick7920's Profile Search for other posts by nick7920
 
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: January 30 2017 at 20:55 | IP Logged Quote gg102

The way I understand this, rather than (in the
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 View gg102's Profile Search for other posts by gg102
 
nick7920
Senior Member
Senior Member


Joined: March 04 2008
Location: United States
Online Status: Offline
Posts: 193
Posted: January 30 2017 at 21:07 | IP Logged Quote nick7920

I know you can use macro ,my concern is on Amazon Echo
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 View nick7920's Profile Search for other posts by nick7920
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: January 31 2017 at 07:53 | IP Logged Quote smarty

Nick - Concerning Alexa's limited verbiage.... On, Off, Set and Dim seem to work.

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 View smarty's Profile Search for other posts by smarty
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: January 31 2017 at 08:10 | IP Logged Quote smarty

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.




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 View smarty's Profile Search for other posts by smarty
 
nick7920
Senior Member
Senior Member


Joined: March 04 2008
Location: United States
Online Status: Offline
Posts: 193
Posted: January 31 2017 at 17:46 | IP Logged Quote nick7920

Thank you -

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 View nick7920's Profile Search for other posts by nick7920
 
objector
Newbie
Newbie
Avatar

Joined: August 20 2011
Location: United States
Online Status: Offline
Posts: 31
Posted: February 01 2017 at 03:17 | IP Logged Quote objector

Hi All,

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 View objector's Profile Search for other posts by objector Visit objector's Homepage
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: February 01 2017 at 08:02 | IP Logged Quote smarty

Derek,
   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 View smarty's Profile Search for other posts by smarty
 
objector
Newbie
Newbie
Avatar

Joined: August 20 2011
Location: United States
Online Status: Offline
Posts: 31
Posted: February 01 2017 at 17:13 | IP Logged Quote objector

Hi Smarty,

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 View objector's Profile Search for other posts by objector Visit objector's Homepage
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: February 05 2017 at 10:23 | IP Logged Quote jeffw_00

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

Edited by jeffw_00 - February 05 2017 at 10:23
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
nick7920
Senior Member
Senior Member


Joined: March 04 2008
Location: United States
Online Status: Offline
Posts: 193
Posted: February 05 2017 at 10:51 | IP Logged Quote nick7920

yes, that's ture.

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 View nick7920's Profile Search for other posts by nick7920
 
DennisWeller
Newbie
Newbie
Avatar

Joined: April 12 2016
Location: United States
Online Status: Offline
Posts: 2
Posted: February 06 2017 at 13:26 | IP Logged Quote DennisWeller

Is the Echo the way to go for this type of functionality?

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 View DennisWeller's Profile Search for other posts by DennisWeller
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: February 06 2017 at 15:26 | IP Logged Quote smarty

Dennis,
    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 View smarty's Profile Search for other posts by smarty
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: February 06 2017 at 15:39 | IP Logged Quote smarty

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 View smarty's Profile Search for other posts by smarty
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: March 19 2017 at 10:24 | IP Logged Quote TonyNo

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...

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: March 19 2017 at 15:16 | IP Logged Quote TonyNo

Picked up a Dot. Works great!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: March 21 2017 at 19:50 | IP Logged Quote TonyNo

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.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
GCollins
Groupie
Groupie
Avatar

Joined: March 27 2011
Location: United States
Online Status: Offline
Posts: 53
Posted: March 10 2023 at 12:30 | IP Logged Quote GCollins

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 Integration: JV Digital, Lightolier, Harmony, Insteon, Leviton, X10-Pro, DSC, Radio Shack, HA-Bridge/Alexa
Alexa Integration: Ecobee, Philips Hue, UniFi Protect, Sengled Zigbee, Kasa WiFi

Back to Top View GCollins's Profile Search for other posts by GCollins
 
GCollins
Groupie
Groupie
Avatar

Joined: March 27 2011
Location: United States
Online Status: Offline
Posts: 53
Posted: March 10 2023 at 19:35 | IP Logged Quote GCollins

OK, I got it fixed!

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 Integration: JV Digital, Lightolier, Harmony, Insteon, Leviton, X10-Pro, DSC, Radio Shack, HA-Bridge/Alexa
Alexa Integration: Ecobee, Philips Hue, UniFi Protect, Sengled Zigbee, Kasa WiFi

Back to Top View GCollins's Profile Search for other posts by GCollins
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum