MisterHouse and Echo integration

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

MisterHouse and Echo integration

Tom-172
I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty
much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is
fast.  In most cases, my lights are on/off before she finishes saying
OK


You need to include the URL for the on/off commands.. the URL could be
a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon
echo now supports wemo and philip hue... great news if you own any of
those devices! My house is pretty heavily invested in the z-wave using
the Vera as the gateway and thought it would be nice bridge the Amazon
Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty
much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar
--upnp.config.address=<synology IP> >>
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Timothy Spaulding
Tom,

Thanks for posting this and your steps.  

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices
Added a name: Upstairs Landing Lights (have also tried with just a single word for the name)
Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Timothy Spaulding
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.  

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Craig-24
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.

On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




--
-Craig

------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Wayne Gatlin
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.

I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.

I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.

I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.

_Wayne



On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.

On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




--
-Craig

------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Brian Rudy

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.


Cheers!

-Brian



On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.

I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.

I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.

I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.

_Wayne



On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.

On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




--
-Craig

------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users





------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi


________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users



------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Wayne Gatlin
My problem with the skills is that they have to be hosted at Amazon which means adding latency for internet traversal and being dependent on my internet connectivity for my home functions to work. I am not a fan on cloud hosting for my HA stuff.

I have been working on a perl implementation of the hue api emulation that is integrated into Misterhouse which means you will be able to select the objects in MH that you want to present to alexa for discovery. I haven't decided on the best way to do this yet.

I think the limitation is 25 devices per tcp port (emulated hue bridge), so I plan to just add more ports (configurable in mh) and look at the port the request comes in on and respond with that set of devices.


I'll upload to git once I have something ready to start testing.

    
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.


Cheers!

-Brian



On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.

I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.

I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.

I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.

_Wayne



On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.

On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




--
-Craig

------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users





------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi


________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users



------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.


Cheers!

-Brian



On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.

I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.

I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.

I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.

_Wayne



On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.

On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




--
-Craig

------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users





------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi


________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users



------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Jeff

Wayne,

Regarding how to decide which objects to expose to Alexa, you've probably already thought of this, but just in case:  when I had a brief (and ill-conceived) idea to use Open Remote for my GUI (just before ia7 came around), I decided to add the objects that OR would use to an MH "group".  This part of my idea actually worked pretty well.  As such, I wonder if you could have an "Alexa" group and just add the objects you want to expose to it?

Anyway, just thought I'd throw it out there.

Regards,
Jeff


On 12/23/2016 08:20 AM, Wayne Gatlin wrote:
My problem with the skills is that they have to be hosted at Amazon which means adding latency for internet traversal and being dependent on my internet connectivity for my home functions to work. I am not a fan on cloud hosting for my HA stuff.

I have been working on a perl implementation of the hue api emulation that is integrated into Misterhouse which means you will be able to select the objects in MH that you want to present to alexa for discovery. I haven't decided on the best way to do this yet.

I think the limitation is 25 devices per tcp port (emulated hue bridge), so I plan to just add more ports (configurable in mh) and look at the port the request comes in on and respond with that set of devices.


I'll upload to git once I have something ready to start testing.

    
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.


Cheers!

-Brian



On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.

I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.

I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.

I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.

_Wayne



On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.

On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




--
-Craig

------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users





------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.

Cheers!

-Brian

On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.
I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.
I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.
I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.
_Wayne
On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.
On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now. My problem was with using Internet Explorer on the web page to configure the devices. -----Original Message----- From: Timothy Spaulding [mailto:[hidden email]] Sent: Thursday, July 2, 2015 6:43 PM To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration Tom, Thanks for posting this and your steps. I am trying it out, but I am getting stuck at the point of adding devices. I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on (that URL works all by itself as well). When I click on add, I don't get anything. No device is added. -----Original Message----- From: Tom [mailto:[hidden email]] Sent: Monday, June 29, 2015 4:55 PM To: The main list for the MisterHouse home automation program Subject: [mh] MisterHouse and Echo integration I've also added this info to the wiki... https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge --------------------------------------------- I found the following bridge which allows the echo to control pretty much any device. It works with the on off commands.. ie: Alexa turn on my kitchen lights Alexa turn off my kitchen lights She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command https://github.com/armzilla/amazon-echo-ha-bridge the requires Java 8 here's a description from the github page: ----------- emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it. Register a device, bind to some sort of on/off (vera style) url ----------- Here are the steps I used to install the bridge on my Synology ------------------------------------------------------------------------ Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's) mkdir /volume1/@appstore/Amazon_Echo_HA_Bridge/ cd /volume1/@appstore/Amazon_Echo_HA_Bridge/ curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar vi listen.sh hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log & (to specify port, add --server.port=yyyy  ie:   java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> --server.port=yyyy) chmod +x listen.sh sh listen.sh logs are in /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log add/remove devices: http://<synology IP>:8080/configurator.html ----------- Bridge server:   update the address with your server IP.. i.e.: http://<synology IP>:8080/api/devices Add a new device Name:  ie: Kitchen On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off --------- go to echo settings http://echo.amazon.com/#settings/connected-home and have her Discover Devices or simply say "Alexa discover devices" --------------------------------------------------------------------------------------- Now you should be able to control your devices as follows: Alexa turn on/off <name> Alexa turn on my kitchen light ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
--
-Craig
------------------------------------------------------------------------------ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Brian Rudy
In reply to this post by Wayne Gatlin

Thanks Wayne,

Most aspects that power the Echo (including NLP/NLU via AVS) are hosted at Amazon, so there is a certain amount of cloud connectivity that is unavoidable with the Echo and kin. I too would prefer hosting everything within my own private network, but thus far the main thrust of commercial IoT solutions are cloud-based, and it looks like that ship has sailed.

What I am looking to do would have a minimal forwarding layer in AWS Lambda (currently the only supported endpoint for the Smart Home skill type) and perform the rest of the logic natively in Perl with MH. I was able to stub out some simple simple Discovery and Control functions earlier today using the Login with Amazon OAuth provider to provide account pairing and a hacked up version of the Smart Home skill adapter sample (which needed updating to support the current Alexa.ConnectedHome message format in place of the Alexa Lighting API that has now been deprecated)

I haven't figured out how to handle selective device discovery either, but my current thoughts are to do this by filtering out devices that are not capable of the the supported list of Smart Home API 'actions' (setTargetTemperature, incrementTargetTemperature, decrementTargetTemperature, setPercentage,  incrementPercentage, decrementPercentage, turnOff, turnOn)

I'll keep fiddling with this as time permits, but am happy to test anything you would like another set of eyes on.


Happy holidays!
-Brian


On 12/23/16 06:20, Wayne Gatlin wrote:
My problem with the skills is that they have to be hosted at Amazon which means adding latency for internet traversal and being dependent on my internet connectivity for my home functions to work. I am not a fan on cloud hosting for my HA stuff.

I have been working on a perl implementation of the hue api emulation that is integrated into Misterhouse which means you will be able to select the objects in MH that you want to present to alexa for discovery. I haven't decided on the best way to do this yet.

I think the limitation is 25 devices per tcp port (emulated hue bridge), so I plan to just add more ports (configurable in mh) and look at the port the request comes in on and respond with that set of devices.


I'll upload to git once I have something ready to start testing.

    
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.


Cheers!

-Brian



On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.

I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.

I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.

I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.

_Wayne



On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.

On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




--
-Craig

------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users





------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.

Cheers!

-Brian

On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.
I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.
I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.
I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.
_Wayne
On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.
On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now. My problem was with using Internet Explorer on the web page to configure the devices. -----Original Message----- From: Timothy Spaulding [mailto:[hidden email]] Sent: Thursday, July 2, 2015 6:43 PM To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration Tom, Thanks for posting this and your steps. I am trying it out, but I am getting stuck at the point of adding devices. I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on (that URL works all by itself as well). When I click on add, I don't get anything. No device is added. -----Original Message----- From: Tom [mailto:[hidden email]] Sent: Monday, June 29, 2015 4:55 PM To: The main list for the MisterHouse home automation program Subject: [mh] MisterHouse and Echo integration I've also added this info to the wiki... https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge --------------------------------------------- I found the following bridge which allows the echo to control pretty much any device. It works with the on off commands.. ie: Alexa turn on my kitchen lights Alexa turn off my kitchen lights She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command https://github.com/armzilla/amazon-echo-ha-bridge the requires Java 8 here's a description from the github page: ----------- emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it. Register a device, bind to some sort of on/off (vera style) url ----------- Here are the steps I used to install the bridge on my Synology ------------------------------------------------------------------------ Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's) mkdir /volume1/@appstore/Amazon_Echo_HA_Bridge/ cd /volume1/@appstore/Amazon_Echo_HA_Bridge/ curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar vi listen.sh hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log & (to specify port, add --server.port=yyyy  ie:   java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> --server.port=yyyy) chmod +x listen.sh sh listen.sh logs are in /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log add/remove devices: http://<synology IP>:8080/configurator.html ----------- Bridge server:   update the address with your server IP.. i.e.: http://<synology IP>:8080/api/devices Add a new device Name:  ie: Kitchen On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off --------- go to echo settings http://echo.amazon.com/#settings/connected-home and have her Discover Devices or simply say "Alexa discover devices" --------------------------------------------------------------------------------------- Now you should be able to control your devices as follows: Alexa turn on/off <name> Alexa turn on my kitchen light ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
--
-Craig
------------------------------------------------------------------------------ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Brian Rudy

Thanks to the extra time permitted by the holidays I finally have both the discovery and control functionality working to a minimal degree. The simple HTTPS forwarder AWS Lambda code (in JavaScript for Node.js) I am using can be found here: https://github.com/rudybrian/IoT-Playground/blob/master/AWS-Lambda/MisterHouse-alexa-smart-home-skill-api-forwarder.js

To pair down the list of eligible devices during discovery, the given group (I used "Lights" for testing) object members are inspected for those that have possible states of "on" (for on/off) and 80% (for those that support percentage). These "actions" are provided back to the Alexa Smart Home API in the DiscoverAppliancesResponse. Currently I only have the turnOn and turnOff actions working, with the rest of the actions stubbed out. If you want to have a look, I have the MH code in my add_alexa_smart_home_support branch here: https://github.com/rudybrian/misterhouse/tree/add_alexa_smart_home_support

To use this as-is, you will need a reverse proxy setup with authentication to handle the inbound HTTPS requests from AWS and forward them on to MH.

A great deal still needs to be added, but it is working, and seems to do so fairly well.


Cheers!
-Brian

On 12/26/16 16:30, Brian Rudy wrote:

Thanks Wayne,

Most aspects that power the Echo (including NLP/NLU via AVS) are hosted at Amazon, so there is a certain amount of cloud connectivity that is unavoidable with the Echo and kin. I too would prefer hosting everything within my own private network, but thus far the main thrust of commercial IoT solutions are cloud-based, and it looks like that ship has sailed.

What I am looking to do would have a minimal forwarding layer in AWS Lambda (currently the only supported endpoint for the Smart Home skill type) and perform the rest of the logic natively in Perl with MH. I was able to stub out some simple simple Discovery and Control functions earlier today using the Login with Amazon OAuth provider to provide account pairing and a hacked up version of the Smart Home skill adapter sample (which needed updating to support the current Alexa.ConnectedHome message format in place of the Alexa Lighting API that has now been deprecated)

I haven't figured out how to handle selective device discovery either, but my current thoughts are to do this by filtering out devices that are not capable of the the supported list of Smart Home API 'actions' (setTargetTemperature, incrementTargetTemperature, decrementTargetTemperature, setPercentage,  incrementPercentage, decrementPercentage, turnOff, turnOn)

I'll keep fiddling with this as time permits, but am happy to test anything you would like another set of eyes on.


Happy holidays!
-Brian


On 12/23/16 06:20, Wayne Gatlin wrote:
My problem with the skills is that they have to be hosted at Amazon which means adding latency for internet traversal and being dependent on my internet connectivity for my home functions to work. I am not a fan on cloud hosting for my HA stuff.

I have been working on a perl implementation of the hue api emulation that is integrated into Misterhouse which means you will be able to select the objects in MH that you want to present to alexa for discovery. I haven't decided on the best way to do this yet.

I think the limitation is 25 devices per tcp port (emulated hue bridge), so I plan to just add more ports (configurable in mh) and look at the port the request comes in on and respond with that set of devices.


I'll upload to git once I have something ready to start testing.

    
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.


Cheers!

-Brian



On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.

I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.

I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.

I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.

_Wayne



On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.

On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




--
-Craig

------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users





------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.

Cheers!

-Brian

On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.
I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.
I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.
I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.
_Wayne
On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.
On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now. My problem was with using Internet Explorer on the web page to configure the devices. -----Original Message----- From: Timothy Spaulding [mailto:[hidden email]] Sent: Thursday, July 2, 2015 6:43 PM To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration Tom, Thanks for posting this and your steps. I am trying it out, but I am getting stuck at the point of adding devices. I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on (that URL works all by itself as well). When I click on add, I don't get anything. No device is added. -----Original Message----- From: Tom [mailto:[hidden email]] Sent: Monday, June 29, 2015 4:55 PM To: The main list for the MisterHouse home automation program Subject: [mh] MisterHouse and Echo integration I've also added this info to the wiki... https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge --------------------------------------------- I found the following bridge which allows the echo to control pretty much any device. It works with the on off commands.. ie: Alexa turn on my kitchen lights Alexa turn off my kitchen lights She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command https://github.com/armzilla/amazon-echo-ha-bridge the requires Java 8 here's a description from the github page: ----------- emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it. Register a device, bind to some sort of on/off (vera style) url ----------- Here are the steps I used to install the bridge on my Synology ------------------------------------------------------------------------ Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's) mkdir /volume1/@appstore/Amazon_Echo_HA_Bridge/ cd /volume1/@appstore/Amazon_Echo_HA_Bridge/ curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar vi listen.sh hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log & (to specify port, add --server.port=yyyy  ie:   java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> --server.port=yyyy) chmod +x listen.sh sh listen.sh logs are in /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log add/remove devices: http://<synology IP>:8080/configurator.html ----------- Bridge server:   update the address with your server IP.. i.e.: http://<synology IP>:8080/api/devices Add a new device Name:  ie: Kitchen On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off --------- go to echo settings http://echo.amazon.com/#settings/connected-home and have her Discover Devices or simply say "Alexa discover devices" --------------------------------------------------------------------------------------- Now you should be able to control your devices as follows: Alexa turn on/off <name> Alexa turn on my kitchen light ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
--
-Craig
------------------------------------------------------------------------------ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Brian Rudy

Hi folks,

Thanks to Wayne's hard work and the flexibility of OSS, we now have two choices for directly integrating our Amazon Echos (and select 3rd party devices with AVS API implementations) with MisterHouse!

Since there are two separate implementations, I thought I would provide a high-level overview of them both.

Each implementation has it's strengths and weaknesses, and you can choose which works best for you. Both implementations currently use the same Alexa Smart Home intent schema, which constrains voice interaction to control devices by 'actions' of the type on/off, percent, temperature and increase/decrease. Voice responses are limited to "Ok" or, on error, a specific error response. Both implementations require Internet connectivity. Discovered devices are visible in the Smart Home section of the Alexa app on your iOS/Android devices as well as http://alexa.amazon.com#smart-home, and can be added to groups which allow control of multiple devices in the group with a single intent (utterance).

Wayne's implementation emulates a Phillips Hue bridge, which uses SSDP for device discovery over the local network (between an Echo and MisterHouse). Since MisterHouse is emulating a Hue bridge, other IoT devices that support interacting with Hue lights (Google Home, Logitech Harmony, etc) should also work. The network flow for control commands is as follows: "voice input"->Echo (local network)->Amazon AVS (cloud)->Echo (local network)->MisterHouse (local network)->Controlled devices (device-specific). With this implementation you don't need to open up your home network to inbound external access. Wayne, please feel free to correct or fill in anything I have stated incorrectly or might have missed :)

The implementation that I have been working on interacts directly with Amazon's official Alexa Smart Home API and discovers the MH-defined devices (objects) that support state changes of the same state 'actions' supported by the Amazon Smart Home API. This implementation works by using an AWS Lambda hosted service that forwards all the Alexa Smart Home API requests directly from Amazon's Voice Services through to MisterHouse unaltered. web/bin/alexa.pl acts upon these requests and responds back to the Lambda hosted service, which in turn forwards that response back to the Smart Home API. It requires that the Lambda hosted service is able to reach MisterHouse via an authenticated HTTPS request. Since MH doesn't natively support HTTPS, you will need to have an HTTPS reverse proxy with (basic) authentication at the edge of your network to handle the requests and forward them to MH. The network flow for control commands is as follows: "voice input"->Echo (local network)->Amazon AVS (cloud)->AWS Lambda (cloud)->HTTPS reverse proxy (local network)->MisterHouse (local network)->Controlled devices (device-specific)

Cheers!
-Brian

On 12/31/16 00:25, Brian Rudy wrote:

Thanks to the extra time permitted by the holidays I finally have both the discovery and control functionality working to a minimal degree. The simple HTTPS forwarder AWS Lambda code (in JavaScript for Node.js) I am using can be found here: https://github.com/rudybrian/IoT-Playground/blob/master/AWS-Lambda/MisterHouse-alexa-smart-home-skill-api-forwarder.js

To pair down the list of eligible devices during discovery, the given group (I used "Lights" for testing) object members are inspected for those that have possible states of "on" (for on/off) and 80% (for those that support percentage). These "actions" are provided back to the Alexa Smart Home API in the DiscoverAppliancesResponse. Currently I only have the turnOn and turnOff actions working, with the rest of the actions stubbed out. If you want to have a look, I have the MH code in my add_alexa_smart_home_support branch here: https://github.com/rudybrian/misterhouse/tree/add_alexa_smart_home_support

To use this as-is, you will need a reverse proxy setup with authentication to handle the inbound HTTPS requests from AWS and forward them on to MH.

A great deal still needs to be added, but it is working, and seems to do so fairly well.


Cheers!
-Brian

On 12/26/16 16:30, Brian Rudy wrote:

Thanks Wayne,

Most aspects that power the Echo (including NLP/NLU via AVS) are hosted at Amazon, so there is a certain amount of cloud connectivity that is unavoidable with the Echo and kin. I too would prefer hosting everything within my own private network, but thus far the main thrust of commercial IoT solutions are cloud-based, and it looks like that ship has sailed.

What I am looking to do would have a minimal forwarding layer in AWS Lambda (currently the only supported endpoint for the Smart Home skill type) and perform the rest of the logic natively in Perl with MH. I was able to stub out some simple simple Discovery and Control functions earlier today using the Login with Amazon OAuth provider to provide account pairing and a hacked up version of the Smart Home skill adapter sample (which needed updating to support the current Alexa.ConnectedHome message format in place of the Alexa Lighting API that has now been deprecated)

I haven't figured out how to handle selective device discovery either, but my current thoughts are to do this by filtering out devices that are not capable of the the supported list of Smart Home API 'actions' (setTargetTemperature, incrementTargetTemperature, decrementTargetTemperature, setPercentage,  incrementPercentage, decrementPercentage, turnOff, turnOn)

I'll keep fiddling with this as time permits, but am happy to test anything you would like another set of eyes on.


Happy holidays!
-Brian


On 12/23/16 06:20, Wayne Gatlin wrote:
My problem with the skills is that they have to be hosted at Amazon which means adding latency for internet traversal and being dependent on my internet connectivity for my home functions to work. I am not a fan on cloud hosting for my HA stuff.

I have been working on a perl implementation of the hue api emulation that is integrated into Misterhouse which means you will be able to select the objects in MH that you want to present to alexa for discovery. I haven't decided on the best way to do this yet.

I think the limitation is 25 devices per tcp port (emulated hue bridge), so I plan to just add more ports (configurable in mh) and look at the port the request comes in on and respond with that set of devices.


I'll upload to git once I have something ready to start testing.

    
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.


Cheers!

-Brian



On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.

I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.

I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.

I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.

_Wayne



On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.

On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




--
-Craig

------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users





------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.

Cheers!

-Brian

On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.
I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.
I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.
I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.
_Wayne
On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.
On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now. My problem was with using Internet Explorer on the web page to configure the devices. -----Original Message----- From: Timothy Spaulding [mailto:[hidden email]] Sent: Thursday, July 2, 2015 6:43 PM To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration Tom, Thanks for posting this and your steps. I am trying it out, but I am getting stuck at the point of adding devices. I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on (that URL works all by itself as well). When I click on add, I don't get anything. No device is added. -----Original Message----- From: Tom [mailto:[hidden email]] Sent: Monday, June 29, 2015 4:55 PM To: The main list for the MisterHouse home automation program Subject: [mh] MisterHouse and Echo integration I've also added this info to the wiki... https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge --------------------------------------------- I found the following bridge which allows the echo to control pretty much any device. It works with the on off commands.. ie: Alexa turn on my kitchen lights Alexa turn off my kitchen lights She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command https://github.com/armzilla/amazon-echo-ha-bridge the requires Java 8 here's a description from the github page: ----------- emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it. Register a device, bind to some sort of on/off (vera style) url ----------- Here are the steps I used to install the bridge on my Synology ------------------------------------------------------------------------ Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's) mkdir /volume1/@appstore/Amazon_Echo_HA_Bridge/ cd /volume1/@appstore/Amazon_Echo_HA_Bridge/ curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar vi listen.sh hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log & (to specify port, add --server.port=yyyy  ie:   java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> --server.port=yyyy) chmod +x listen.sh sh listen.sh logs are in /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log add/remove devices: http://<synology IP>:8080/configurator.html ----------- Bridge server:   update the address with your server IP.. i.e.: http://<synology IP>:8080/api/devices Add a new device Name:  ie: Kitchen On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off --------- go to echo settings http://echo.amazon.com/#settings/connected-home and have her Discover Devices or simply say "Alexa discover devices" --------------------------------------------------------------------------------------- Now you should be able to control your devices as follows: Alexa turn on/off <name> Alexa turn on my kitchen light ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
--
-Craig
------------------------------------------------------------------------------ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Brian Rudy

Hi folks,

Here are the full set of steps required to deploy the current working revision of the Alexa Smart Home API version of the MH integration that I have been working on. This ultimately belongs in the Wiki after development is finished. The setup is fairly involved and should only be undertaken if you have sufficient comfort in each of the functional areas. The Testing and Troubleshooting sections are incomplete, but there should be enough here to get you started.

  1. Configuring your reverse proxy
  2. Adding basic authentication to your reverse proxy
    1. Create a password file and add a user (see https://httpd.apache.org/docs/current/programs/htpasswd.html)
    2. For example: htpasswd /etc/httpd/.htpasswd-users jsmith
    3. You will need to define the following in your config
      1. AuthType Basic
      2. AuthName "Authentication Required"
      3. AuthUserFile    "/etc/httpd/.htpasswd-users"
  3. After completing the previous two steps, you should have an Apache configuration like the following from Apache 2.2:
    • # Reverse proxy for Misterhouse
      ProxyRequests    off
      ProxyHTMLEnable    On
      ProxyPass /mh/    http://my.misterhouse.ip:8080/
      ProxyHTMLURLMap http://my.misterhouse.ip:8080 /mh

      <Location /mh/>
           AuthType Basic
           AuthName "Authentication Required"
           AuthUserFile    "/etc/httpd/.htpasswd-users"
           Require valid-user
           ProxyPassReverse    /
           ProxyHTMLEnable    On
           SetOutputFilter    proxy-html
           ProxyHTMLURLMap    /    /mh/
           ProxyHTMLURLMap /mh    /mh
           RequestHeader unset    Accept-Encoding
       </Location>
  4. DDNS
    • If you do not have a static public IP address, you will need to use DDNS so that you can use a hostname to reach your reverse proxy. Configuration and setup of DDNS is beyond the scope of this document.
  5. Obtaining an SSL certificate
    • You will need to obtain an SSL certificate for your reverse proxy
    • There are many places that will happily sell you an SSL certificate, or you can use a free certificate from Let's Encrypt (https://letsencrypt.org)
    • Self-signed certificates may work as well, but are untested and are not recommended.
  6. Setting up HTTPS support on your reverse proxy
    • Once you have your SSL certificate, you will need to install it on your reverse proxy.
    • An example configuration for Apache 2.2 is shown below:
      • SSLCertificateFile /etc/pki/tls/certs/my.misterhousehost.com.crt
        SSLCertificateKeyFile /etc/pki/tls/private/my.misterhousehost.com.key
        SSLCertificateChainFile /etc/pki/tls/certs/my.misterhousehost.com-chain.pem
  7. Firewall
    • Your firewall will need to forward TCP port 443 to your reverse proxy to allow the HTTPS requests through.
  8. Setting up Login with Amazon
    1. Smart Home Skills require an OAuth 2.0 provider. To simplify the integration, I recommend the use of the Login with Amazon service available in the Amazon Developer portal: https://developer.amazon.com/login-with-amazon
    2. Create a new security profile per the instructions here: https://stackoverflow.com/questions/37512303/whats-an-easy-way-to-setup-oauth-for-an-amazon-alexa-connected-home-skill
      1. You will need to copy the Client ID and Client Secret values from your security profile into the Skill Adapter settings in step 9.
      2. You will also need top copy the Redirect URLs (usually there are two) from step 9 into the Web Settings of your security profile once your Skill Adapter is created.
  9. Creating the Alexa Skill
    1. Log in to the Amazon developer console here: https://developer.amazon.com
    2. Select ALEXA, and then click Get Started > under the Alexa Skills Kit
    3. Click Add a New Skill
    4. In Skill Information
      1. Select a Skill Type of Smart Home Skill API
      2. Select a name (this is arbitrary, but cannot overlap with existing skill names)
      3. Click Next
    5. In Configuration
      1. Set the Authorization URL to https://www.amazon.com/ap/oa
      2. Change the Client Id to the Client Id created in Step 8
      3. Create a new Scope of "profile:user_id"
      4. Set the Access Token URI to https://api.amazon.com/auth/o2/token
      5. Set the Client Secret to the Client Secret created in Step 8
      6. Copy each of the Redirect URLs to the Web Settings of your Login With Amazon security profile from step 8
      7. Enter a Privacy Policy URL (this is arbitrary, but is required for account linking)
      8. Click Save
      9. Your skill is not yet complete, as you need to enter the Endpoint ARN you will create in step 10.
      10. Check the North America region and enter the ARN you created in step 10, then click Next
      11. The Configuration section should now have a green checkmark
      12. In Test, click Show this skill in the Alexa App
  10. Setting up AWS Lambda Skill Adapter Function
    1. Log into the AWS console: https://console.aws.amazon.com
    2. Familiarize yourself with the steps required to create a Smart Home skill as show here: https://developer.amazon.com/blogs/post/Tx34M7F8Z8U7U8B/Creating-Your-First-Alexa-Smart-Home-Skill
      1. Note: This is only for reference, as we will be creating a skill adapter in JavaScript with Node.js
    3. To create the MisterHouse forwarder function, in Lambda select Create new Function.
      1. Change your Region to US East (N.Virginia). This is the only region that currently supports the Alexa Smart Home API.
      2. Search for "home". This should return two blueprints. Select the "alexa-smart-home-skill-adapter"
      3. Enter the Application Id from your skill created in step 9, and select Create Trigger
      4. In the Configure Function screen
        1. Name your function (this is arbitrary), and update the description as you see fit
        2. Replace the Lambda function code with the code from here: https://raw.githubusercontent.com/rudybrian/IoT-Playground/master/AWS-Lambda/MisterHouse-alexa-smart-home-skill-api-forwarder.js
        3. Edit the REMOTE_CLOUD_HOSTNAME and auth parameters per your hostname and credentials
          • For example:
            • var REMOTE_CLOUD_HOSTNAME = 'my.misterhousehost.com';
            • auth: 'jsmith:jsmithspassword',
        4. Create a new custom role
          1. Select IAM Role of lambda_basic_execution
          2. and a Policy Name of "Create a new Role Policy"
          3. Click Allow
        5. Once the custom role is created
          1. Select Role: "Choose and existing role"
          2. Select Existing role: "lambda_basic_execution"
        6. In Advanced settings
          1. Change the Memory (MB) from 512 to 128.
        7. Click Next
      5. Click Create function
      6. Copy the ARN (in the upper right-hand corner of the screen) to the Endpoint in your Skill from step 9.
  11. Grab a copy of the latest web/bin/alexa.pl from my GitHub repo here: https://raw.githubusercontent.com/rudybrian/misterhouse/add_alexa_smart_home_support/web/bin/alexa.pl and install on your MH instance.
    1. Edit the $list_name variable to point to the group or type of items you wish to expose to Alexa.
  12. Testing
    1. Testing web/bin/alexa.pl
      1. You can use Postman to test interaction with MisterHouse.
        1. Select POST, and enter the URL on your local network to alexa.pl
          1. For example: http://my.misterhouse.ip:8080/bin/alexa.pl
          2. In Body
            1. Select raw and JSON (application/json)
            2. in the POST body enter a Discovery request such as the following
              • {
                    "header": {
                        "messageId": "6d6d6e14-8aee-473e-8c24-0d31ff9c17a2",
                        "name": "DiscoverAppliancesRequest",
                        "namespace": "Alexa.ConnectedHome.Discovery",
                        "payloadVersion": "2"
                    },
                    "payload": {
                        "accessToken": "blah"
                    }
                }
              • Click Send, and you should see a JSON response with an array of your discoveredAppliances in the payload
    2. Testing HTTPS
    3. Testing the MH reverse proxy
    4. Testing the Lambda skill adapter
      1. Log into the AWS console, and select the Lambda function you created in step 10.
      2. Under the Actions drop-down, select "Configure test event"
      3. In "Input test event"
        1. Select Sample event template of "Alexa Smart Home - Control"
        2. In the text box, enter the same JSON you used to test web/bin/alexa.pl
        3. Click Save and test
        4. In the response you should see the same JSON response you saw when testing web/bin/alexa.pl
    5. Testing from http://alexa.amazon.com/
      1. Click on Skills, then click Your Skills
      2. You should see the Skill you created in step 9, with "Account linking required" next to it
      3. Click on your skill
      4. Log in with your Amazon credentials
        1. After login your skill should be activated
      5. Go to the Smart Home section
      6. Click on Discover Devices (you can also ask Alexa to discover devices)
        1. You should now see the list of devices as shown when testing the Lambda Skill adapter
        2. You can now ask "Alexa turn on {friendlyName}"
  13. Troubleshooting


Have fun!

-Brian



On 1/3/17 17:27, Brian Rudy wrote:

Hi folks,

Thanks to Wayne's hard work and the flexibility of OSS, we now have two choices for directly integrating our Amazon Echos (and select 3rd party devices with AVS API implementations) with MisterHouse!

Since there are two separate implementations, I thought I would provide a high-level overview of them both.

Each implementation has it's strengths and weaknesses, and you can choose which works best for you. Both implementations currently use the same Alexa Smart Home intent schema, which constrains voice interaction to control devices by 'actions' of the type on/off, percent, temperature and increase/decrease. Voice responses are limited to "Ok" or, on error, a specific error response. Both implementations require Internet connectivity. Discovered devices are visible in the Smart Home section of the Alexa app on your iOS/Android devices as well as http://alexa.amazon.com#smart-home, and can be added to groups which allow control of multiple devices in the group with a single intent (utterance).

Wayne's implementation emulates a Phillips Hue bridge, which uses SSDP for device discovery over the local network (between an Echo and MisterHouse). Since MisterHouse is emulating a Hue bridge, other IoT devices that support interacting with Hue lights (Google Home, Logitech Harmony, etc) should also work. The network flow for control commands is as follows: "voice input"->Echo (local network)->Amazon AVS (cloud)->Echo (local network)->MisterHouse (local network)->Controlled devices (device-specific). With this implementation you don't need to open up your home network to inbound external access. Wayne, please feel free to correct or fill in anything I have stated incorrectly or might have missed :)

The implementation that I have been working on interacts directly with Amazon's official Alexa Smart Home API and discovers the MH-defined devices (objects) that support state changes of the same state 'actions' supported by the Amazon Smart Home API. This implementation works by using an AWS Lambda hosted service that forwards all the Alexa Smart Home API requests directly from Amazon's Voice Services through to MisterHouse unaltered. web/bin/alexa.pl acts upon these requests and responds back to the Lambda hosted service, which in turn forwards that response back to the Smart Home API. It requires that the Lambda hosted service is able to reach MisterHouse via an authenticated HTTPS request. Since MH doesn't natively support HTTPS, you will need to have an HTTPS reverse proxy with (basic) authentication at the edge of your network to handle the requests and forward them to MH. The network flow for control commands is as follows: "voice input"->Echo (local network)->Amazon AVS (cloud)->AWS Lambda (cloud)->HTTPS reverse proxy (local network)->MisterHouse (local network)->Controlled devices (device-specific)

Cheers!
-Brian

On 12/31/16 00:25, Brian Rudy wrote:

Thanks to the extra time permitted by the holidays I finally have both the discovery and control functionality working to a minimal degree. The simple HTTPS forwarder AWS Lambda code (in JavaScript for Node.js) I am using can be found here: https://github.com/rudybrian/IoT-Playground/blob/master/AWS-Lambda/MisterHouse-alexa-smart-home-skill-api-forwarder.js

To pair down the list of eligible devices during discovery, the given group (I used "Lights" for testing) object members are inspected for those that have possible states of "on" (for on/off) and 80% (for those that support percentage). These "actions" are provided back to the Alexa Smart Home API in the DiscoverAppliancesResponse. Currently I only have the turnOn and turnOff actions working, with the rest of the actions stubbed out. If you want to have a look, I have the MH code in my add_alexa_smart_home_support branch here: https://github.com/rudybrian/misterhouse/tree/add_alexa_smart_home_support

To use this as-is, you will need a reverse proxy setup with authentication to handle the inbound HTTPS requests from AWS and forward them on to MH.

A great deal still needs to be added, but it is working, and seems to do so fairly well.


Cheers!
-Brian

On 12/26/16 16:30, Brian Rudy wrote:

Thanks Wayne,

Most aspects that power the Echo (including NLP/NLU via AVS) are hosted at Amazon, so there is a certain amount of cloud connectivity that is unavoidable with the Echo and kin. I too would prefer hosting everything within my own private network, but thus far the main thrust of commercial IoT solutions are cloud-based, and it looks like that ship has sailed.

What I am looking to do would have a minimal forwarding layer in AWS Lambda (currently the only supported endpoint for the Smart Home skill type) and perform the rest of the logic natively in Perl with MH. I was able to stub out some simple simple Discovery and Control functions earlier today using the Login with Amazon OAuth provider to provide account pairing and a hacked up version of the Smart Home skill adapter sample (which needed updating to support the current Alexa.ConnectedHome message format in place of the Alexa Lighting API that has now been deprecated)

I haven't figured out how to handle selective device discovery either, but my current thoughts are to do this by filtering out devices that are not capable of the the supported list of Smart Home API 'actions' (setTargetTemperature, incrementTargetTemperature, decrementTargetTemperature, setPercentage,  incrementPercentage, decrementPercentage, turnOff, turnOn)

I'll keep fiddling with this as time permits, but am happy to test anything you would like another set of eyes on.


Happy holidays!
-Brian


On 12/23/16 06:20, Wayne Gatlin wrote:
My problem with the skills is that they have to be hosted at Amazon which means adding latency for internet traversal and being dependent on my internet connectivity for my home functions to work. I am not a fan on cloud hosting for my HA stuff.

I have been working on a perl implementation of the hue api emulation that is integrated into Misterhouse which means you will be able to select the objects in MH that you want to present to alexa for discovery. I haven't decided on the best way to do this yet.

I think the limitation is 25 devices per tcp port (emulated hue bridge), so I plan to just add more ports (configurable in mh) and look at the port the request comes in on and respond with that set of devices.


I'll upload to git once I have something ready to start testing.

    
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.


Cheers!

-Brian



On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.

I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.

I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.

I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.

_Wayne



On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.

On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




--
-Craig

------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users





------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.

Cheers!

-Brian

On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.
I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.
I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.
I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.
_Wayne
On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.
On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now. My problem was with using Internet Explorer on the web page to configure the devices. -----Original Message----- From: Timothy Spaulding [mailto:[hidden email]] Sent: Thursday, July 2, 2015 6:43 PM To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration Tom, Thanks for posting this and your steps. I am trying it out, but I am getting stuck at the point of adding devices. I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on (that URL works all by itself as well). When I click on add, I don't get anything. No device is added. -----Original Message----- From: Tom [mailto:[hidden email]] Sent: Monday, June 29, 2015 4:55 PM To: The main list for the MisterHouse home automation program Subject: [mh] MisterHouse and Echo integration I've also added this info to the wiki... https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge --------------------------------------------- I found the following bridge which allows the echo to control pretty much any device. It works with the on off commands.. ie: Alexa turn on my kitchen lights Alexa turn off my kitchen lights She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command https://github.com/armzilla/amazon-echo-ha-bridge the requires Java 8 here's a description from the github page: ----------- emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it. Register a device, bind to some sort of on/off (vera style) url ----------- Here are the steps I used to install the bridge on my Synology ------------------------------------------------------------------------ Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's) mkdir /volume1/@appstore/Amazon_Echo_HA_Bridge/ cd /volume1/@appstore/Amazon_Echo_HA_Bridge/ curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar vi listen.sh hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log & (to specify port, add --server.port=yyyy  ie:   java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> --server.port=yyyy) chmod +x listen.sh sh listen.sh logs are in /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log add/remove devices: http://<synology IP>:8080/configurator.html ----------- Bridge server:   update the address with your server IP.. i.e.: http://<synology IP>:8080/api/devices Add a new device Name:  ie: Kitchen On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off --------- go to echo settings http://echo.amazon.com/#settings/connected-home and have her Discover Devices or simply say "Alexa discover devices" --------------------------------------------------------------------------------------- Now you should be able to control your devices as follows: Alexa turn on/off <name> Alexa turn on my kitchen light ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
--
-Craig
------------------------------------------------------------------------------ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Brian Rudy

Hi folks,

I recently ran across Bruce's blog post that shows how he used a custom Alexa skill to send commands to MisterHouse via an AWS Lambda proxy essentially the same way I have done with the Smart Home API. I modified his original Lambda function a bit to use HTTPS with basic authentication as well as a small addition to the alexa.pl code to support it. This allows you to continue use the Alexa smart home syntax "Alexa, turn on the living room lights", but also supports passing the spoken text directly to MisterHouse to act on a voice command such as "Alexa, ask MisterHouse when is the next full moon". We should be able to pass back any MisterHouse respond() replies back to Alexa to speak, but I haven't added this in yet.

I posted a short YouTube video of it in action here: https://www.youtube.com/watch?v=8X-Og4Y3Xzg

In the video I control an Insteon on/off module, Lamplinc dimmers (individually, and as a group), I also show two non-Insteon devices (WS2811-based pixels controlled by FPP) that track the state of Generic_Items that, when changed, control FPP via it's RESTful API.


Cheers,
-Brian


On 1/4/17 13:28, Brian Rudy wrote:

Hi folks,

Here are the full set of steps required to deploy the current working revision of the Alexa Smart Home API version of the MH integration that I have been working on. This ultimately belongs in the Wiki after development is finished. The setup is fairly involved and should only be undertaken if you have sufficient comfort in each of the functional areas. The Testing and Troubleshooting sections are incomplete, but there should be enough here to get you started.

  1. Configuring your reverse proxy
  2. Adding basic authentication to your reverse proxy
    1. Create a password file and add a user (see https://httpd.apache.org/docs/current/programs/htpasswd.html)
    2. For example: htpasswd /etc/httpd/.htpasswd-users jsmith
    3. You will need to define the following in your config
      1. AuthType Basic
      2. AuthName "Authentication Required"
      3. AuthUserFile    "/etc/httpd/.htpasswd-users"
  3. After completing the previous two steps, you should have an Apache configuration like the following from Apache 2.2:
    • # Reverse proxy for Misterhouse
      ProxyRequests    off
      ProxyHTMLEnable    On
      ProxyPass /mh/    http://my.misterhouse.ip:8080/
      ProxyHTMLURLMap http://my.misterhouse.ip:8080 /mh

      <Location /mh/>
           AuthType Basic
           AuthName "Authentication Required"
           AuthUserFile    "/etc/httpd/.htpasswd-users"
           Require valid-user
           ProxyPassReverse    /
           ProxyHTMLEnable    On
           SetOutputFilter    proxy-html
           ProxyHTMLURLMap    /    /mh/
           ProxyHTMLURLMap /mh    /mh
           RequestHeader unset    Accept-Encoding
       </Location>
  4. DDNS
    • If you do not have a static public IP address, you will need to use DDNS so that you can use a hostname to reach your reverse proxy. Configuration and setup of DDNS is beyond the scope of this document.
  5. Obtaining an SSL certificate
    • You will need to obtain an SSL certificate for your reverse proxy
    • There are many places that will happily sell you an SSL certificate, or you can use a free certificate from Let's Encrypt (https://letsencrypt.org)
    • Self-signed certificates may work as well, but are untested and are not recommended.
  6. Setting up HTTPS support on your reverse proxy
    • Once you have your SSL certificate, you will need to install it on your reverse proxy.
    • An example configuration for Apache 2.2 is shown below:
      • SSLCertificateFile /etc/pki/tls/certs/my.misterhousehost.com.crt
        SSLCertificateKeyFile /etc/pki/tls/private/my.misterhousehost.com.key
        SSLCertificateChainFile /etc/pki/tls/certs/my.misterhousehost.com-chain.pem
  7. Firewall
    • Your firewall will need to forward TCP port 443 to your reverse proxy to allow the HTTPS requests through.
  8. Setting up Login with Amazon
    1. Smart Home Skills require an OAuth 2.0 provider. To simplify the integration, I recommend the use of the Login with Amazon service available in the Amazon Developer portal: https://developer.amazon.com/login-with-amazon
    2. Create a new security profile per the instructions here: https://stackoverflow.com/questions/37512303/whats-an-easy-way-to-setup-oauth-for-an-amazon-alexa-connected-home-skill
      1. You will need to copy the Client ID and Client Secret values from your security profile into the Skill Adapter settings in step 9.
      2. You will also need top copy the Redirect URLs (usually there are two) from step 9 into the Web Settings of your security profile once your Skill Adapter is created.
  9. Creating the Alexa Skill
    1. Log in to the Amazon developer console here: https://developer.amazon.com
    2. Select ALEXA, and then click Get Started > under the Alexa Skills Kit
    3. Click Add a New Skill
    4. In Skill Information
      1. Select a Skill Type of Smart Home Skill API
      2. Select a name (this is arbitrary, but cannot overlap with existing skill names)
      3. Click Next
    5. In Configuration
      1. Set the Authorization URL to https://www.amazon.com/ap/oa
      2. Change the Client Id to the Client Id created in Step 8
      3. Create a new Scope of "profile:user_id"
      4. Set the Access Token URI to https://api.amazon.com/auth/o2/token
      5. Set the Client Secret to the Client Secret created in Step 8
      6. Copy each of the Redirect URLs to the Web Settings of your Login With Amazon security profile from step 8
      7. Enter a Privacy Policy URL (this is arbitrary, but is required for account linking)
      8. Click Save
      9. Your skill is not yet complete, as you need to enter the Endpoint ARN you will create in step 10.
      10. Check the North America region and enter the ARN you created in step 10, then click Next
      11. The Configuration section should now have a green checkmark
      12. In Test, click Show this skill in the Alexa App
  10. Setting up AWS Lambda Skill Adapter Function
    1. Log into the AWS console: https://console.aws.amazon.com
    2. Familiarize yourself with the steps required to create a Smart Home skill as show here: https://developer.amazon.com/blogs/post/Tx34M7F8Z8U7U8B/Creating-Your-First-Alexa-Smart-Home-Skill
      1. Note: This is only for reference, as we will be creating a skill adapter in JavaScript with Node.js
    3. To create the MisterHouse forwarder function, in Lambda select Create new Function.
      1. Change your Region to US East (N.Virginia). This is the only region that currently supports the Alexa Smart Home API.
      2. Search for "home". This should return two blueprints. Select the "alexa-smart-home-skill-adapter"
      3. Enter the Application Id from your skill created in step 9, and select Create Trigger
      4. In the Configure Function screen
        1. Name your function (this is arbitrary), and update the description as you see fit
        2. Replace the Lambda function code with the code from here: https://raw.githubusercontent.com/rudybrian/IoT-Playground/master/AWS-Lambda/MisterHouse-alexa-smart-home-skill-api-forwarder.js
        3. Edit the REMOTE_CLOUD_HOSTNAME and auth parameters per your hostname and credentials
          • For example:
            • var REMOTE_CLOUD_HOSTNAME = 'my.misterhousehost.com';
            • auth: 'jsmith:jsmithspassword',
        4. Create a new custom role
          1. Select IAM Role of lambda_basic_execution
          2. and a Policy Name of "Create a new Role Policy"
          3. Click Allow
        5. Once the custom role is created
          1. Select Role: "Choose and existing role"
          2. Select Existing role: "lambda_basic_execution"
        6. In Advanced settings
          1. Change the Memory (MB) from 512 to 128.
        7. Click Next
      5. Click Create function
      6. Copy the ARN (in the upper right-hand corner of the screen) to the Endpoint in your Skill from step 9.
  11. Grab a copy of the latest web/bin/alexa.pl from my GitHub repo here: https://raw.githubusercontent.com/rudybrian/misterhouse/add_alexa_smart_home_support/web/bin/alexa.pl and install on your MH instance.
    1. Edit the $list_name variable to point to the group or type of items you wish to expose to Alexa.
  12. Testing
    1. Testing web/bin/alexa.pl
      1. You can use Postman to test interaction with MisterHouse.
        1. Select POST, and enter the URL on your local network to alexa.pl
          1. For example: http://my.misterhouse.ip:8080/bin/alexa.pl
          2. In Body
            1. Select raw and JSON (application/json)
            2. in the POST body enter a Discovery request such as the following
              • {
                    "header": {
                        "messageId": "6d6d6e14-8aee-473e-8c24-0d31ff9c17a2",
                        "name": "DiscoverAppliancesRequest",
                        "namespace": "Alexa.ConnectedHome.Discovery",
                        "payloadVersion": "2"
                    },
                    "payload": {
                        "accessToken": "blah"
                    }
                }
              • Click Send, and you should see a JSON response with an array of your discoveredAppliances in the payload
    2. Testing HTTPS
    3. Testing the MH reverse proxy
    4. Testing the Lambda skill adapter
      1. Log into the AWS console, and select the Lambda function you created in step 10.
      2. Under the Actions drop-down, select "Configure test event"
      3. In "Input test event"
        1. Select Sample event template of "Alexa Smart Home - Control"
        2. In the text box, enter the same JSON you used to test web/bin/alexa.pl
        3. Click Save and test
        4. In the response you should see the same JSON response you saw when testing web/bin/alexa.pl
    5. Testing from http://alexa.amazon.com/
      1. Click on Skills, then click Your Skills
      2. You should see the Skill you created in step 9, with "Account linking required" next to it
      3. Click on your skill
      4. Log in with your Amazon credentials
        1. After login your skill should be activated
      5. Go to the Smart Home section
      6. Click on Discover Devices (you can also ask Alexa to discover devices)
        1. You should now see the list of devices as shown when testing the Lambda Skill adapter
        2. You can now ask "Alexa turn on {friendlyName}"
  13. Troubleshooting


Have fun!

-Brian



On 1/3/17 17:27, Brian Rudy wrote:

Hi folks,

Thanks to Wayne's hard work and the flexibility of OSS, we now have two choices for directly integrating our Amazon Echos (and select 3rd party devices with AVS API implementations) with MisterHouse!

Since there are two separate implementations, I thought I would provide a high-level overview of them both.

Each implementation has it's strengths and weaknesses, and you can choose which works best for you. Both implementations currently use the same Alexa Smart Home intent schema, which constrains voice interaction to control devices by 'actions' of the type on/off, percent, temperature and increase/decrease. Voice responses are limited to "Ok" or, on error, a specific error response. Both implementations require Internet connectivity. Discovered devices are visible in the Smart Home section of the Alexa app on your iOS/Android devices as well as http://alexa.amazon.com#smart-home, and can be added to groups which allow control of multiple devices in the group with a single intent (utterance).

Wayne's implementation emulates a Phillips Hue bridge, which uses SSDP for device discovery over the local network (between an Echo and MisterHouse). Since MisterHouse is emulating a Hue bridge, other IoT devices that support interacting with Hue lights (Google Home, Logitech Harmony, etc) should also work. The network flow for control commands is as follows: "voice input"->Echo (local network)->Amazon AVS (cloud)->Echo (local network)->MisterHouse (local network)->Controlled devices (device-specific). With this implementation you don't need to open up your home network to inbound external access. Wayne, please feel free to correct or fill in anything I have stated incorrectly or might have missed :)

The implementation that I have been working on interacts directly with Amazon's official Alexa Smart Home API and discovers the MH-defined devices (objects) that support state changes of the same state 'actions' supported by the Amazon Smart Home API. This implementation works by using an AWS Lambda hosted service that forwards all the Alexa Smart Home API requests directly from Amazon's Voice Services through to MisterHouse unaltered. web/bin/alexa.pl acts upon these requests and responds back to the Lambda hosted service, which in turn forwards that response back to the Smart Home API. It requires that the Lambda hosted service is able to reach MisterHouse via an authenticated HTTPS request. Since MH doesn't natively support HTTPS, you will need to have an HTTPS reverse proxy with (basic) authentication at the edge of your network to handle the requests and forward them to MH. The network flow for control commands is as follows: "voice input"->Echo (local network)->Amazon AVS (cloud)->AWS Lambda (cloud)->HTTPS reverse proxy (local network)->MisterHouse (local network)->Controlled devices (device-specific)

Cheers!
-Brian

On 12/31/16 00:25, Brian Rudy wrote:

Thanks to the extra time permitted by the holidays I finally have both the discovery and control functionality working to a minimal degree. The simple HTTPS forwarder AWS Lambda code (in JavaScript for Node.js) I am using can be found here: https://github.com/rudybrian/IoT-Playground/blob/master/AWS-Lambda/MisterHouse-alexa-smart-home-skill-api-forwarder.js

To pair down the list of eligible devices during discovery, the given group (I used "Lights" for testing) object members are inspected for those that have possible states of "on" (for on/off) and 80% (for those that support percentage). These "actions" are provided back to the Alexa Smart Home API in the DiscoverAppliancesResponse. Currently I only have the turnOn and turnOff actions working, with the rest of the actions stubbed out. If you want to have a look, I have the MH code in my add_alexa_smart_home_support branch here: https://github.com/rudybrian/misterhouse/tree/add_alexa_smart_home_support

To use this as-is, you will need a reverse proxy setup with authentication to handle the inbound HTTPS requests from AWS and forward them on to MH.

A great deal still needs to be added, but it is working, and seems to do so fairly well.


Cheers!
-Brian

On 12/26/16 16:30, Brian Rudy wrote:

Thanks Wayne,

Most aspects that power the Echo (including NLP/NLU via AVS) are hosted at Amazon, so there is a certain amount of cloud connectivity that is unavoidable with the Echo and kin. I too would prefer hosting everything within my own private network, but thus far the main thrust of commercial IoT solutions are cloud-based, and it looks like that ship has sailed.

What I am looking to do would have a minimal forwarding layer in AWS Lambda (currently the only supported endpoint for the Smart Home skill type) and perform the rest of the logic natively in Perl with MH. I was able to stub out some simple simple Discovery and Control functions earlier today using the Login with Amazon OAuth provider to provide account pairing and a hacked up version of the Smart Home skill adapter sample (which needed updating to support the current Alexa.ConnectedHome message format in place of the Alexa Lighting API that has now been deprecated)

I haven't figured out how to handle selective device discovery either, but my current thoughts are to do this by filtering out devices that are not capable of the the supported list of Smart Home API 'actions' (setTargetTemperature, incrementTargetTemperature, decrementTargetTemperature, setPercentage,  incrementPercentage, decrementPercentage, turnOff, turnOn)

I'll keep fiddling with this as time permits, but am happy to test anything you would like another set of eyes on.


Happy holidays!
-Brian


On 12/23/16 06:20, Wayne Gatlin wrote:
My problem with the skills is that they have to be hosted at Amazon which means adding latency for internet traversal and being dependent on my internet connectivity for my home functions to work. I am not a fan on cloud hosting for my HA stuff.

I have been working on a perl implementation of the hue api emulation that is integrated into Misterhouse which means you will be able to select the objects in MH that you want to present to alexa for discovery. I haven't decided on the best way to do this yet.

I think the limitation is 25 devices per tcp port (emulated hue bridge), so I plan to just add more ports (configurable in mh) and look at the port the request comes in on and respond with that set of devices.


I'll upload to git once I have something ready to start testing.

    
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.


Cheers!

-Brian



On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.

I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.

I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.

I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.

_Wayne



On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.

On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




--
-Craig

------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users





------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.

Cheers!

-Brian

On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.
I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.
I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.
I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.
_Wayne
On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.
On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now. My problem was with using Internet Explorer on the web page to configure the devices. -----Original Message----- From: Timothy Spaulding [mailto:[hidden email]] Sent: Thursday, July 2, 2015 6:43 PM To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration Tom, Thanks for posting this and your steps. I am trying it out, but I am getting stuck at the point of adding devices. I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on (that URL works all by itself as well). When I click on add, I don't get anything. No device is added. -----Original Message----- From: Tom [mailto:[hidden email]] Sent: Monday, June 29, 2015 4:55 PM To: The main list for the MisterHouse home automation program Subject: [mh] MisterHouse and Echo integration I've also added this info to the wiki... https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge --------------------------------------------- I found the following bridge which allows the echo to control pretty much any device. It works with the on off commands.. ie: Alexa turn on my kitchen lights Alexa turn off my kitchen lights She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command https://github.com/armzilla/amazon-echo-ha-bridge the requires Java 8 here's a description from the github page: ----------- emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it. Register a device, bind to some sort of on/off (vera style) url ----------- Here are the steps I used to install the bridge on my Synology ------------------------------------------------------------------------ Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's) mkdir /volume1/@appstore/Amazon_Echo_HA_Bridge/ cd /volume1/@appstore/Amazon_Echo_HA_Bridge/ curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar vi listen.sh hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log & (to specify port, add --server.port=yyyy  ie:   java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> --server.port=yyyy) chmod +x listen.sh sh listen.sh logs are in /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log add/remove devices: http://<synology IP>:8080/configurator.html ----------- Bridge server:   update the address with your server IP.. i.e.: http://<synology IP>:8080/api/devices Add a new device Name:  ie: Kitchen On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off --------- go to echo settings http://echo.amazon.com/#settings/connected-home and have her Discover Devices or simply say "Alexa discover devices" --------------------------------------------------------------------------------------- Now you should be able to control your devices as follows: Alexa turn on/off <name> Alexa turn on my kitchen light ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
--
-Craig
------------------------------------------------------------------------------ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Craig-24
In reply to this post by Brian Rudy
Brian,

Nice job putting this together. It was challenging to get it all working. I setup nginx on a raspberry pi for the reverse proxy. I can't imagine how hard it must have been to figure it out from scratch. I have followed all the steps and finally got it to work. I do have a question though.

I kept getting errors when trying to post the discovery request. The error was due to http_server.pl not passing the JSON data to alexa.pl. I tweaked it to pass it on if the request was for bin/alexa.pl. Did you have to make any changes to http_server.pl? I would be interested what you did. Is this something that should be added to the release version of mh?

Thanks for your work. With an echo and 3 dots, I finally have decent voice control of mh.

-Craig


On Wed, Jan 4, 2017 at 4:28 PM, Brian Rudy <[hidden email]> wrote:

Hi folks,

Here are the full set of steps required to deploy the current working revision of the Alexa Smart Home API version of the MH integration that I have been working on. This ultimately belongs in the Wiki after development is finished. The setup is fairly involved and should only be undertaken if you have sufficient comfort in each of the functional areas. The Testing and Troubleshooting sections are incomplete, but there should be enough here to get you started.

  1. Configuring your reverse proxy
  2. Adding basic authentication to your reverse proxy
    1. Create a password file and add a user (see https://httpd.apache.org/docs/current/programs/htpasswd.html)
    2. For example: htpasswd /etc/httpd/.htpasswd-users jsmith
    3. You will need to define the following in your config
      1. AuthType Basic
      2. AuthName "Authentication Required"
      3. AuthUserFile    "/etc/httpd/.htpasswd-users"
  3. After completing the previous two steps, you should have an Apache configuration like the following from Apache 2.2:
    • # Reverse proxy for Misterhouse
      ProxyRequests    off
      ProxyHTMLEnable    On
      ProxyPass /mh/    http://my.misterhouse.ip:8080/
      ProxyHTMLURLMap http://my.misterhouse.ip:8080 /mh

      <Location /mh/>
           AuthType Basic
           AuthName "Authentication Required"
           AuthUserFile    "/etc/httpd/.htpasswd-users"
           Require valid-user
           ProxyPassReverse    /
           ProxyHTMLEnable    On
           SetOutputFilter    proxy-html
           ProxyHTMLURLMap    /    /mh/
           ProxyHTMLURLMap /mh    /mh
           RequestHeader unset    Accept-Encoding
       </Location>
  4. DDNS
    • If you do not have a static public IP address, you will need to use DDNS so that you can use a hostname to reach your reverse proxy. Configuration and setup of DDNS is beyond the scope of this document.
  5. Obtaining an SSL certificate
    • You will need to obtain an SSL certificate for your reverse proxy
    • There are many places that will happily sell you an SSL certificate, or you can use a free certificate from Let's Encrypt (https://letsencrypt.org)
    • Self-signed certificates may work as well, but are untested and are not recommended.
  6. Setting up HTTPS support on your reverse proxy
    • Once you have your SSL certificate, you will need to install it on your reverse proxy.
    • An example configuration for Apache 2.2 is shown below:
      • SSLCertificateFile /etc/pki/tls/certs/my.misterhousehost.com.crt
        SSLCertificateKeyFile /etc/pki/tls/private/my.misterhousehost.com.key
        SSLCertificateChainFile /etc/pki/tls/certs/my.misterhousehost.com-chain.pem
  7. Firewall
    • Your firewall will need to forward TCP port 443 to your reverse proxy to allow the HTTPS requests through.
  8. Setting up Login with Amazon
    1. Smart Home Skills require an OAuth 2.0 provider. To simplify the integration, I recommend the use of the Login with Amazon service available in the Amazon Developer portal: https://developer.amazon.com/login-with-amazon
    2. Create a new security profile per the instructions here: https://stackoverflow.com/questions/37512303/whats-an-easy-way-to-setup-oauth-for-an-amazon-alexa-connected-home-skill
      1. You will need to copy the Client ID and Client Secret values from your security profile into the Skill Adapter settings in step 9.
      2. You will also need top copy the Redirect URLs (usually there are two) from step 9 into the Web Settings of your security profile once your Skill Adapter is created.
  9. Creating the Alexa Skill
    1. Log in to the Amazon developer console here: https://developer.amazon.com
    2. Select ALEXA, and then click Get Started > under the Alexa Skills Kit
    3. Click Add a New Skill
    4. In Skill Information
      1. Select a Skill Type of Smart Home Skill API
      2. Select a name (this is arbitrary, but cannot overlap with existing skill names)
      3. Click Next
    5. In Configuration
      1. Set the Authorization URL to https://www.amazon.com/ap/oa
      2. Change the Client Id to the Client Id created in Step 8
      3. Create a new Scope of "profile:user_id"
      4. Set the Access Token URI to https://api.amazon.com/auth/o2/token
      5. Set the Client Secret to the Client Secret created in Step 8
      6. Copy each of the Redirect URLs to the Web Settings of your Login With Amazon security profile from step 8
      7. Enter a Privacy Policy URL (this is arbitrary, but is required for account linking)
      8. Click Save
      9. Your skill is not yet complete, as you need to enter the Endpoint ARN you will create in step 10.
      10. Check the North America region and enter the ARN you created in step 10, then click Next
      11. The Configuration section should now have a green checkmark
      12. In Test, click Show this skill in the Alexa App
  10. Setting up AWS Lambda Skill Adapter Function
    1. Log into the AWS console: https://console.aws.amazon.com
    2. Familiarize yourself with the steps required to create a Smart Home skill as show here: https://developer.amazon.com/blogs/post/Tx34M7F8Z8U7U8B/Creating-Your-First-Alexa-Smart-Home-Skill
      1. Note: This is only for reference, as we will be creating a skill adapter in JavaScript with Node.js
    3. To create the MisterHouse forwarder function, in Lambda select Create new Function.
      1. Change your Region to US East (N.Virginia). This is the only region that currently supports the Alexa Smart Home API.
      2. Search for "home". This should return two blueprints. Select the "alexa-smart-home-skill-adapter"
      3. Enter the Application Id from your skill created in step 9, and select Create Trigger
      4. In the Configure Function screen
        1. Name your function (this is arbitrary), and update the description as you see fit
        2. Replace the Lambda function code with the code from here: https://raw.githubusercontent.com/rudybrian/IoT-Playground/master/AWS-Lambda/MisterHouse-alexa-smart-home-skill-api-forwarder.js
        3. Edit the REMOTE_CLOUD_HOSTNAME and auth parameters per your hostname and credentials
        4. Create a new custom role
          1. Select IAM Role of lambda_basic_execution
          2. and a Policy Name of "Create a new Role Policy"
          3. Click Allow
        5. Once the custom role is created
          1. Select Role: "Choose and existing role"
          2. Select Existing role: "lambda_basic_execution"
        6. In Advanced settings
          1. Change the Memory (MB) from 512 to 128.
        7. Click Next
      5. Click Create function
      6. Copy the ARN (in the upper right-hand corner of the screen) to the Endpoint in your Skill from step 9.
  11. Grab a copy of the latest web/bin/alexa.pl from my GitHub repo here: https://raw.githubusercontent.com/rudybrian/misterhouse/add_alexa_smart_home_support/web/bin/alexa.pl and install on your MH instance.
    1. Edit the $list_name variable to point to the group or type of items you wish to expose to Alexa.
  12. Testing
    1. Testing web/bin/alexa.pl
      1. You can use Postman to test interaction with MisterHouse.
        1. Select POST, and enter the URL on your local network to alexa.pl
          1. For example: http://my.misterhouse.ip:8080/bin/alexa.pl
          2. In Body
            1. Select raw and JSON (application/json)
            2. in the POST body enter a Discovery request such as the following
              • {
                    "header": {
                        "messageId": "6d6d6e14-8aee-473e-8c24-0d31ff9c17a2",
                        "name": "DiscoverAppliancesRequest",
                        "namespace": "Alexa.ConnectedHome.Discovery",
                        "payloadVersion": "2"
                    },
                    "payload": {
                        "accessToken": "blah"
                    }
                }
              • Click Send, and you should see a JSON response with an array of your discoveredAppliances in the payload
    2. Testing HTTPS
    3. Testing the MH reverse proxy
    4. Testing the Lambda skill adapter
      1. Log into the AWS console, and select the Lambda function you created in step 10.
      2. Under the Actions drop-down, select "Configure test event"
      3. In "Input test event"
        1. Select Sample event template of "Alexa Smart Home - Control"
        2. In the text box, enter the same JSON you used to test web/bin/alexa.pl
        3. Click Save and test
        4. In the response you should see the same JSON response you saw when testing web/bin/alexa.pl
    5. Testing from http://alexa.amazon.com/
      1. Click on Skills, then click Your Skills
      2. You should see the Skill you created in step 9, with "Account linking required" next to it
      3. Click on your skill
      4. Log in with your Amazon credentials
        1. After login your skill should be activated
      5. Go to the Smart Home section
      6. Click on Discover Devices (you can also ask Alexa to discover devices)
        1. You should now see the list of devices as shown when testing the Lambda Skill adapter
        2. You can now ask "Alexa turn on {friendlyName}"
  13. Troubleshooting


Have fun!

-Brian



On 1/3/17 17:27, Brian Rudy wrote:

Hi folks,

Thanks to Wayne's hard work and the flexibility of OSS, we now have two choices for directly integrating our Amazon Echos (and select 3rd party devices with AVS API implementations) with MisterHouse!

Since there are two separate implementations, I thought I would provide a high-level overview of them both.

Each implementation has it's strengths and weaknesses, and you can choose which works best for you. Both implementations currently use the same Alexa Smart Home intent schema, which constrains voice interaction to control devices by 'actions' of the type on/off, percent, temperature and increase/decrease. Voice responses are limited to "Ok" or, on error, a specific error response. Both implementations require Internet connectivity. Discovered devices are visible in the Smart Home section of the Alexa app on your iOS/Android devices as well as http://alexa.amazon.com#smart-home, and can be added to groups which allow control of multiple devices in the group with a single intent (utterance).

Wayne's implementation emulates a Phillips Hue bridge, which uses SSDP for device discovery over the local network (between an Echo and MisterHouse). Since MisterHouse is emulating a Hue bridge, other IoT devices that support interacting with Hue lights (Google Home, Logitech Harmony, etc) should also work. The network flow for control commands is as follows: "voice input"->Echo (local network)->Amazon AVS (cloud)->Echo (local network)->MisterHouse (local network)->Controlled devices (device-specific). With this implementation you don't need to open up your home network to inbound external access. Wayne, please feel free to correct or fill in anything I have stated incorrectly or might have missed :)

The implementation that I have been working on interacts directly with Amazon's official Alexa Smart Home API and discovers the MH-defined devices (objects) that support state changes of the same state 'actions' supported by the Amazon Smart Home API. This implementation works by using an AWS Lambda hosted service that forwards all the Alexa Smart Home API requests directly from Amazon's Voice Services through to MisterHouse unaltered. web/bin/alexa.pl acts upon these requests and responds back to the Lambda hosted service, which in turn forwards that response back to the Smart Home API. It requires that the Lambda hosted service is able to reach MisterHouse via an authenticated HTTPS request. Since MH doesn't natively support HTTPS, you will need to have an HTTPS reverse proxy with (basic) authentication at the edge of your network to handle the requests and forward them to MH. The network flow for control commands is as follows: "voice input"->Echo (local network)->Amazon AVS (cloud)->AWS Lambda (cloud)->HTTPS reverse proxy (local network)->MisterHouse (local network)->Controlled devices (device-specific)

Cheers!
-Brian

On 12/31/16 00:25, Brian Rudy wrote:

Thanks to the extra time permitted by the holidays I finally have both the discovery and control functionality working to a minimal degree. The simple HTTPS forwarder AWS Lambda code (in JavaScript for Node.js) I am using can be found here: https://github.com/rudybrian/IoT-Playground/blob/master/AWS-Lambda/MisterHouse-alexa-smart-home-skill-api-forwarder.js

To pair down the list of eligible devices during discovery, the given group (I used "Lights" for testing) object members are inspected for those that have possible states of "on" (for on/off) and 80% (for those that support percentage). These "actions" are provided back to the Alexa Smart Home API in the DiscoverAppliancesResponse. Currently I only have the turnOn and turnOff actions working, with the rest of the actions stubbed out. If you want to have a look, I have the MH code in my add_alexa_smart_home_support branch here: https://github.com/rudybrian/misterhouse/tree/add_alexa_smart_home_support

To use this as-is, you will need a reverse proxy setup with authentication to handle the inbound HTTPS requests from AWS and forward them on to MH.

A great deal still needs to be added, but it is working, and seems to do so fairly well.


Cheers!
-Brian

On 12/26/16 16:30, Brian Rudy wrote:

Thanks Wayne,

Most aspects that power the Echo (including NLP/NLU via AVS) are hosted at Amazon, so there is a certain amount of cloud connectivity that is unavoidable with the Echo and kin. I too would prefer hosting everything within my own private network, but thus far the main thrust of commercial IoT solutions are cloud-based, and it looks like that ship has sailed.

What I am looking to do would have a minimal forwarding layer in AWS Lambda (currently the only supported endpoint for the Smart Home skill type) and perform the rest of the logic natively in Perl with MH. I was able to stub out some simple simple Discovery and Control functions earlier today using the Login with Amazon OAuth provider to provide account pairing and a hacked up version of the Smart Home skill adapter sample (which needed updating to support the current Alexa.ConnectedHome message format in place of the Alexa Lighting API that has now been deprecated)

I haven't figured out how to handle selective device discovery either, but my current thoughts are to do this by filtering out devices that are not capable of the the supported list of Smart Home API 'actions' (setTargetTemperature, incrementTargetTemperature, decrementTargetTemperature, setPercentage,  incrementPercentage, decrementPercentage, turnOff, turnOn)

I'll keep fiddling with this as time permits, but am happy to test anything you would like another set of eyes on.


Happy holidays!
-Brian


On 12/23/16 06:20, Wayne Gatlin wrote:
My problem with the skills is that they have to be hosted at Amazon which means adding latency for internet traversal and being dependent on my internet connectivity for my home functions to work. I am not a fan on cloud hosting for my HA stuff.

I have been working on a perl implementation of the hue api emulation that is integrated into Misterhouse which means you will be able to select the objects in MH that you want to present to alexa for discovery. I haven't decided on the best way to do this yet.

I think the limitation is 25 devices per tcp port (emulated hue bridge), so I plan to just add more ports (configurable in mh) and look at the port the request comes in on and respond with that set of devices.


I'll upload to git once I have something ready to start testing.

    
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.


Cheers!

-Brian



On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.

I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.

I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.

I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.

_Wayne



On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.

On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




--
-Craig

------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users





------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.

Cheers!

-Brian

On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.
I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.
I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.
I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.
_Wayne
On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.
On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now. My problem was with using Internet Explorer on the web page to configure the devices. -----Original Message----- From: Timothy Spaulding [mailto:[hidden email]] Sent: Thursday, July 2, 2015 6:43 PM To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration Tom, Thanks for posting this and your steps. I am trying it out, but I am getting stuck at the point of adding devices. I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on (that URL works all by itself as well). When I click on add, I don't get anything. No device is added. -----Original Message----- From: Tom [mailto:[hidden email]] Sent: Monday, June 29, 2015 4:55 PM To: The main list for the MisterHouse home automation program Subject: [mh] MisterHouse and Echo integration I've also added this info to the wiki... https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge --------------------------------------------- I found the following bridge which allows the echo to control pretty much any device. It works with the on off commands.. ie: Alexa turn on my kitchen lights Alexa turn off my kitchen lights She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command https://github.com/armzilla/amazon-echo-ha-bridge the requires Java 8 here's a description from the github page: ----------- emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it. Register a device, bind to some sort of on/off (vera style) url ----------- Here are the steps I used to install the bridge on my Synology ------------------------------------------------------------------------ Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's) mkdir /volume1/@appstore/Amazon_Echo_HA_Bridge/ cd /volume1/@appstore/Amazon_Echo_HA_Bridge/ curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar vi listen.sh hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log & (to specify port, add --server.port=yyyy  ie:   java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> --server.port=yyyy) chmod +x listen.sh sh listen.sh logs are in /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log add/remove devices: http://<synology IP>:8080/configurator.html ----------- Bridge server:   update the address with your server IP.. i.e.: http://<synology IP>:8080/api/devices Add a new device Name:  ie: Kitchen On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off --------- go to echo settings http://echo.amazon.com/#settings/connected-home and have her Discover Devices or simply say "Alexa discover devices" --------------------------------------------------------------------------------------- Now you should be able to control your devices as follows: Alexa turn on/off <name> Alexa turn on my kitchen light ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
--
-Craig
------------------------------------------------------------------------------ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users





--
-Craig

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: MisterHouse and Echo integration

Brian Rudy
Hi Craig,

I'm glad you got things up and working!

The only change I had to make to http_server.pl was committed to the master branch as of 7635334. I discovered this when developing/testing alexa.pl using Postman, but am not sure this is an issue that would manifest itself when using the Lambda API proxies as I haven't dumped the headers that they are sending.Before making the change, http_server.pl was stripping the POST body (the JSON in this case) because it wasn't looking at the correct header to get the Content-Length.

What did you end up changing to get it working for you?


On 1/31/17 18:58, Craig wrote:
Brian,

Nice job putting this together. It was challenging to get it all working. I setup nginx on a raspberry pi for the reverse proxy. I can't imagine how hard it must have been to figure it out from scratch. I have followed all the steps and finally got it to work. I do have a question though.

I kept getting errors when trying to post the discovery request. The error was due to http_server.pl not passing the JSON data to alexa.pl. I tweaked it to pass it on if the request was for bin/alexa.pl. Did you have to make any changes to http_server.pl? I would be interested what you did. Is this something that should be added to the release version of mh?

Thanks for your work. With an echo and 3 dots, I finally have decent voice control of mh.

-Craig


On Wed, Jan 4, 2017 at 4:28 PM, Brian Rudy <[hidden email]> wrote:

Hi folks,

Here are the full set of steps required to deploy the current working revision of the Alexa Smart Home API version of the MH integration that I have been working on. This ultimately belongs in the Wiki after development is finished. The setup is fairly involved and should only be undertaken if you have sufficient comfort in each of the functional areas. The Testing and Troubleshooting sections are incomplete, but there should be enough here to get you started.

  1. Configuring your reverse proxy
  2. Adding basic authentication to your reverse proxy
    1. Create a password file and add a user (see https://httpd.apache.org/docs/current/programs/htpasswd.html)
    2. For example: htpasswd /etc/httpd/.htpasswd-users jsmith
    3. You will need to define the following in your config
      1. AuthType Basic
      2. AuthName "Authentication Required"
      3. AuthUserFile    "/etc/httpd/.htpasswd-users"
  3. After completing the previous two steps, you should have an Apache configuration like the following from Apache 2.2:
    • # Reverse proxy for Misterhouse
      ProxyRequests    off
      ProxyHTMLEnable    On
      ProxyPass /mh/    http://my.misterhouse.ip:8080/
      ProxyHTMLURLMap http://my.misterhouse.ip:8080 /mh

      <Location /mh/>
           AuthType Basic
           AuthName "Authentication Required"
           AuthUserFile    "/etc/httpd/.htpasswd-users"
           Require valid-user
           ProxyPassReverse    /
           ProxyHTMLEnable    On
           SetOutputFilter    proxy-html
           ProxyHTMLURLMap    /    /mh/
           ProxyHTMLURLMap /mh    /mh
           RequestHeader unset    Accept-Encoding
       </Location>
  4. DDNS
    • If you do not have a static public IP address, you will need to use DDNS so that you can use a hostname to reach your reverse proxy. Configuration and setup of DDNS is beyond the scope of this document.
  5. Obtaining an SSL certificate
    • You will need to obtain an SSL certificate for your reverse proxy
    • There are many places that will happily sell you an SSL certificate, or you can use a free certificate from Let's Encrypt (https://letsencrypt.org)
    • Self-signed certificates may work as well, but are untested and are not recommended.
  6. Setting up HTTPS support on your reverse proxy
    • Once you have your SSL certificate, you will need to install it on your reverse proxy.
    • An example configuration for Apache 2.2 is shown below:
      • SSLCertificateFile /etc/pki/tls/certs/my.misterhousehost.com.crt
        SSLCertificateKeyFile /etc/pki/tls/private/my.misterhousehost.com.key
        SSLCertificateChainFile /etc/pki/tls/certs/my.misterhousehost.com-chain.pem
  7. Firewall
    • Your firewall will need to forward TCP port 443 to your reverse proxy to allow the HTTPS requests through.
  8. Setting up Login with Amazon
    1. Smart Home Skills require an OAuth 2.0 provider. To simplify the integration, I recommend the use of the Login with Amazon service available in the Amazon Developer portal: https://developer.amazon.com/login-with-amazon
    2. Create a new security profile per the instructions here: https://stackoverflow.com/questions/37512303/whats-an-easy-way-to-setup-oauth-for-an-amazon-alexa-connected-home-skill
      1. You will need to copy the Client ID and Client Secret values from your security profile into the Skill Adapter settings in step 9.
      2. You will also need top copy the Redirect URLs (usually there are two) from step 9 into the Web Settings of your security profile once your Skill Adapter is created.
  9. Creating the Alexa Skill
    1. Log in to the Amazon developer console here: https://developer.amazon.com
    2. Select ALEXA, and then click Get Started > under the Alexa Skills Kit
    3. Click Add a New Skill
    4. In Skill Information
      1. Select a Skill Type of Smart Home Skill API
      2. Select a name (this is arbitrary, but cannot overlap with existing skill names)
      3. Click Next
    5. In Configuration
      1. Set the Authorization URL to https://www.amazon.com/ap/oa
      2. Change the Client Id to the Client Id created in Step 8
      3. Create a new Scope of "profile:user_id"
      4. Set the Access Token URI to https://api.amazon.com/auth/o2/token
      5. Set the Client Secret to the Client Secret created in Step 8
      6. Copy each of the Redirect URLs to the Web Settings of your Login With Amazon security profile from step 8
      7. Enter a Privacy Policy URL (this is arbitrary, but is required for account linking)
      8. Click Save
      9. Your skill is not yet complete, as you need to enter the Endpoint ARN you will create in step 10.
      10. Check the North America region and enter the ARN you created in step 10, then click Next
      11. The Configuration section should now have a green checkmark
      12. In Test, click Show this skill in the Alexa App
  10. Setting up AWS Lambda Skill Adapter Function
    1. Log into the AWS console: https://console.aws.amazon.com
    2. Familiarize yourself with the steps required to create a Smart Home skill as show here: https://developer.amazon.com/blogs/post/Tx34M7F8Z8U7U8B/Creating-Your-First-Alexa-Smart-Home-Skill
      1. Note: This is only for reference, as we will be creating a skill adapter in JavaScript with Node.js
    3. To create the MisterHouse forwarder function, in Lambda select Create new Function.
      1. Change your Region to US East (N.Virginia). This is the only region that currently supports the Alexa Smart Home API.
      2. Search for "home". This should return two blueprints. Select the "alexa-smart-home-skill-adapter"
      3. Enter the Application Id from your skill created in step 9, and select Create Trigger
      4. In the Configure Function screen
        1. Name your function (this is arbitrary), and update the description as you see fit
        2. Replace the Lambda function code with the code from here: https://raw.githubusercontent.com/rudybrian/IoT-Playground/master/AWS-Lambda/MisterHouse-alexa-smart-home-skill-api-forwarder.js
        3. Edit the REMOTE_CLOUD_HOSTNAME and auth parameters per your hostname and credentials
        4. Create a new custom role
          1. Select IAM Role of lambda_basic_execution
          2. and a Policy Name of "Create a new Role Policy"
          3. Click Allow
        5. Once the custom role is created
          1. Select Role: "Choose and existing role"
          2. Select Existing role: "lambda_basic_execution"
        6. In Advanced settings
          1. Change the Memory (MB) from 512 to 128.
        7. Click Next
      5. Click Create function
      6. Copy the ARN (in the upper right-hand corner of the screen) to the Endpoint in your Skill from step 9.
  11. Grab a copy of the latest web/bin/alexa.pl from my GitHub repo here: https://raw.githubusercontent.com/rudybrian/misterhouse/add_alexa_smart_home_support/web/bin/alexa.pl and install on your MH instance.
    1. Edit the $list_name variable to point to the group or type of items you wish to expose to Alexa.
  12. Testing
    1. Testing web/bin/alexa.pl
      1. You can use Postman to test interaction with MisterHouse.
        1. Select POST, and enter the URL on your local network to alexa.pl
          1. For example: http://my.misterhouse.ip:8080/bin/alexa.pl
          2. In Body
            1. Select raw and JSON (application/json)
            2. in the POST body enter a Discovery request such as the following
              • {
                    "header": {
                        "messageId": "6d6d6e14-8aee-473e-8c24-0d31ff9c17a2",
                        "name": "DiscoverAppliancesRequest",
                        "namespace": "Alexa.ConnectedHome.Discovery",
                        "payloadVersion": "2"
                    },
                    "payload": {
                        "accessToken": "blah"
                    }
                }
              • Click Send, and you should see a JSON response with an array of your discoveredAppliances in the payload
    2. Testing HTTPS
    3. Testing the MH reverse proxy
    4. Testing the Lambda skill adapter
      1. Log into the AWS console, and select the Lambda function you created in step 10.
      2. Under the Actions drop-down, select "Configure test event"
      3. In "Input test event"
        1. Select Sample event template of "Alexa Smart Home - Control"
        2. In the text box, enter the same JSON you used to test web/bin/alexa.pl
        3. Click Save and test
        4. In the response you should see the same JSON response you saw when testing web/bin/alexa.pl
    5. Testing from http://alexa.amazon.com/
      1. Click on Skills, then click Your Skills
      2. You should see the Skill you created in step 9, with "Account linking required" next to it
      3. Click on your skill
      4. Log in with your Amazon credentials
        1. After login your skill should be activated
      5. Go to the Smart Home section
      6. Click on Discover Devices (you can also ask Alexa to discover devices)
        1. You should now see the list of devices as shown when testing the Lambda Skill adapter
        2. You can now ask "Alexa turn on {friendlyName}"
  13. Troubleshooting


Have fun!

-Brian



On 1/3/17 17:27, Brian Rudy wrote:

Hi folks,

Thanks to Wayne's hard work and the flexibility of OSS, we now have two choices for directly integrating our Amazon Echos (and select 3rd party devices with AVS API implementations) with MisterHouse!

Since there are two separate implementations, I thought I would provide a high-level overview of them both.

Each implementation has it's strengths and weaknesses, and you can choose which works best for you. Both implementations currently use the same Alexa Smart Home intent schema, which constrains voice interaction to control devices by 'actions' of the type on/off, percent, temperature and increase/decrease. Voice responses are limited to "Ok" or, on error, a specific error response. Both implementations require Internet connectivity. Discovered devices are visible in the Smart Home section of the Alexa app on your iOS/Android devices as well as http://alexa.amazon.com#smart-home, and can be added to groups which allow control of multiple devices in the group with a single intent (utterance).

Wayne's implementation emulates a Phillips Hue bridge, which uses SSDP for device discovery over the local network (between an Echo and MisterHouse). Since MisterHouse is emulating a Hue bridge, other IoT devices that support interacting with Hue lights (Google Home, Logitech Harmony, etc) should also work. The network flow for control commands is as follows: "voice input"->Echo (local network)->Amazon AVS (cloud)->Echo (local network)->MisterHouse (local network)->Controlled devices (device-specific). With this implementation you don't need to open up your home network to inbound external access. Wayne, please feel free to correct or fill in anything I have stated incorrectly or might have missed :)

The implementation that I have been working on interacts directly with Amazon's official Alexa Smart Home API and discovers the MH-defined devices (objects) that support state changes of the same state 'actions' supported by the Amazon Smart Home API. This implementation works by using an AWS Lambda hosted service that forwards all the Alexa Smart Home API requests directly from Amazon's Voice Services through to MisterHouse unaltered. web/bin/alexa.pl acts upon these requests and responds back to the Lambda hosted service, which in turn forwards that response back to the Smart Home API. It requires that the Lambda hosted service is able to reach MisterHouse via an authenticated HTTPS request. Since MH doesn't natively support HTTPS, you will need to have an HTTPS reverse proxy with (basic) authentication at the edge of your network to handle the requests and forward them to MH. The network flow for control commands is as follows: "voice input"->Echo (local network)->Amazon AVS (cloud)->AWS Lambda (cloud)->HTTPS reverse proxy (local network)->MisterHouse (local network)->Controlled devices (device-specific)

Cheers!
-Brian

On 12/31/16 00:25, Brian Rudy wrote:

Thanks to the extra time permitted by the holidays I finally have both the discovery and control functionality working to a minimal degree. The simple HTTPS forwarder AWS Lambda code (in JavaScript for Node.js) I am using can be found here: https://github.com/rudybrian/IoT-Playground/blob/master/AWS-Lambda/MisterHouse-alexa-smart-home-skill-api-forwarder.js

To pair down the list of eligible devices during discovery, the given group (I used "Lights" for testing) object members are inspected for those that have possible states of "on" (for on/off) and 80% (for those that support percentage). These "actions" are provided back to the Alexa Smart Home API in the DiscoverAppliancesResponse. Currently I only have the turnOn and turnOff actions working, with the rest of the actions stubbed out. If you want to have a look, I have the MH code in my add_alexa_smart_home_support branch here: https://github.com/rudybrian/misterhouse/tree/add_alexa_smart_home_support

To use this as-is, you will need a reverse proxy setup with authentication to handle the inbound HTTPS requests from AWS and forward them on to MH.

A great deal still needs to be added, but it is working, and seems to do so fairly well.


Cheers!
-Brian

On 12/26/16 16:30, Brian Rudy wrote:

Thanks Wayne,

Most aspects that power the Echo (including NLP/NLU via AVS) are hosted at Amazon, so there is a certain amount of cloud connectivity that is unavoidable with the Echo and kin. I too would prefer hosting everything within my own private network, but thus far the main thrust of commercial IoT solutions are cloud-based, and it looks like that ship has sailed.

What I am looking to do would have a minimal forwarding layer in AWS Lambda (currently the only supported endpoint for the Smart Home skill type) and perform the rest of the logic natively in Perl with MH. I was able to stub out some simple simple Discovery and Control functions earlier today using the Login with Amazon OAuth provider to provide account pairing and a hacked up version of the Smart Home skill adapter sample (which needed updating to support the current Alexa.ConnectedHome message format in place of the Alexa Lighting API that has now been deprecated)

I haven't figured out how to handle selective device discovery either, but my current thoughts are to do this by filtering out devices that are not capable of the the supported list of Smart Home API 'actions' (setTargetTemperature, incrementTargetTemperature, decrementTargetTemperature, setPercentage,  incrementPercentage, decrementPercentage, turnOff, turnOn)

I'll keep fiddling with this as time permits, but am happy to test anything you would like another set of eyes on.


Happy holidays!
-Brian


On 12/23/16 06:20, Wayne Gatlin wrote:
My problem with the skills is that they have to be hosted at Amazon which means adding latency for internet traversal and being dependent on my internet connectivity for my home functions to work. I am not a fan on cloud hosting for my HA stuff.

I have been working on a perl implementation of the hue api emulation that is integrated into Misterhouse which means you will be able to select the objects in MH that you want to present to alexa for discovery. I haven't decided on the best way to do this yet.

I think the limitation is 25 devices per tcp port (emulated hue bridge), so I plan to just add more ports (configurable in mh) and look at the port the request comes in on and respond with that set of devices.


I'll upload to git once I have something ready to start testing.

    
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.


Cheers!

-Brian



On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.

I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.

I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.

I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.

_Wayne



On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.

On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now.

My problem was with using Internet Explorer on the web page to configure the devices.

-----Original Message-----
From: Timothy Spaulding [mailto:[hidden email]]
Sent: Thursday, July 2, 2015 6:43 PM
To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration

Tom,

Thanks for posting this and your steps.

I am trying it out, but I am getting stuck at the point of adding devices.

I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on
(that URL works all by itself as well).

When I click on add, I don't get anything. No device is added.

-----Original Message-----
From: Tom [mailto:[hidden email]]
Sent: Monday, June 29, 2015 4:55 PM
To: The main list for the MisterHouse home automation program
Subject: [mh] MisterHouse and Echo integration

I've also added this info to the wiki...
https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge
---------------------------------------------

I found the following bridge which allows the echo to control pretty much any device.

It works with the on off commands..

ie:
Alexa turn on my kitchen lights
Alexa turn off my kitchen lights

She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK


You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command


https://github.com/armzilla/amazon-echo-ha-bridge

the requires Java 8

here's a description from the github page:

-----------
emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it.

Register a device, bind to some sort of on/off (vera style) url
-----------






Here are the steps I used to install the bridge on my Synology

------------------------------------------------------------------------

Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's)

mkdir
/volume1/@appstore/Amazon_Echo_HA_Bridge/

cd
/volume1/@appstore/Amazon_Echo_HA_Bridge/

curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar

vi listen.sh
hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log &

(to specify port, add --server.port=yyyy  ie:   java -jar
amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP>
--server.port=yyyy)

chmod +x listen.sh

sh listen.sh

logs are in
/volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log


add/remove devices:
http://<synology IP>:8080/configurator.html

-----------
Bridge server:   update the address with your server IP.. i.e.:
http://<synology IP>:8080/api/devices


Add a new device

Name:  ie: Kitchen

On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on
Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off


---------

go to echo settings
http://echo.amazon.com/#settings/connected-home
and have her Discover Devices

or simply say

"Alexa discover devices"

---------------------------------------------------------------------------------------

Now you should be able to control your devices as follows:

Alexa turn on/off <name>

Alexa turn on my kitchen light

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users




--
-Craig

------------------------------------------------------------------------------

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users





------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
On Thu, Dec 22, 2016 at 7:34 PM, Brian Rudy <[hidden email]> wrote:

Thanks Wayne,

I just picked up a few of the 2nd generation Echo dots to cover the house during Amazon's black Friday sale and have only just stated playing with them using the native ecobee integration and IFTTT. I have done a small amount of research into the ASK and developing Alexa skills with the skills SDK using nodejs/Lambda, but haven't been able to put much time into it yet.

I too have no desire to run a Java app alongside MisterHouse and now that formal Alexa Smart Home Skill API specs have been released, I think we can do better natively than what is possible using the Hue API with an external bridge. The mechanics of how to communicate will differ a bit (must use an OAuth 2.0 provider and have open access from Amazon to communicate via HTTPS with MH), but this opens up considerably more possibilities. A few major ones that come to mind are true device discovery (not needing to hard-code MH URLs) and increasing the device limit (up to 300) inherent in the Hue API (up to 75 in batches of 25).

I have limited time to play with MH stuff these days, but hope to spend a few hours over the holidays tinkering with this.

Cheers!

-Brian

On 12/9/16 22:50, Wayne Gatlin wrote:
I know this is an old thread, but I am getting an echo and I have started working on the native perl code to integrate the echo with Misterhouse via upnp emulating a hue bridge like the amazon-echo-bridge does. This will eliminate having to run the external java amazon-echo-bridge which seems to be CPU intensive and cumbersome.
I don't have the echo yet, so in order to move on I need a quick network capture of the echo discovering the bridge and sending a few commands to a light or 2 using the amazon-echo-bridge.
I have also been reading that google home will work with the amazon-echo-bridge, it just has to be set to port 80. Could some one test that? If it does work, send me a capture of that as well? This would be a direct local option which is much better than the cloud methods.
I also have to figure out a good way to select which objects or voice commands are presented to the echo because from what I see only 25 devices per bridge is supported and from what I can tell its only on or off commands. It looks like I can get around that by using multiple virtual bridges, but some MH systems will likely have hundreds of objects/voice commands so a method of selecting/mapping will be needed.
_Wayne
On Sun, Aug 9, 2015 at 9:42 AM, Craig <[hidden email]> wrote:
I finally got this running under windows on my mh server (had to use Chrome with the --disable-web-security flag to add devices). Very cool, but does require you to add each command as a device. Does anybody know how hard it would be to set up a bridge where you could pass any mh voice command? I would love to see the bridge functionality in a mh module.
On Fri, Jul 3, 2015 at 8:01 AM, Timothy Spaulding <[hidden email]> wrote:
I can claim success now. My problem was with using Internet Explorer on the web page to configure the devices. -----Original Message----- From: Timothy Spaulding [mailto:[hidden email]] Sent: Thursday, July 2, 2015 6:43 PM To: The main list for the MisterHouse home automation program
Subject: Re: [mh] MisterHouse and Echo integration Tom, Thanks for posting this and your steps. I am trying it out, but I am getting stuck at the point of adding devices. I have added my bridge; htttp://autopi:8080/api/devices Added a name: Upstairs Landing Lights (have also tried with just a single word for the name) Added the on/off URLs; http://house/set?$Upstairs_Landing_Lights?on (that URL works all by itself as well). When I click on add, I don't get anything. No device is added. -----Original Message----- From: Tom [mailto:[hidden email]] Sent: Monday, June 29, 2015 4:55 PM To: The main list for the MisterHouse home automation program Subject: [mh] MisterHouse and Echo integration I've also added this info to the wiki... https://github.com/hollie/misterhouse/wiki/Echo-integration-using-amazon-echo-ha-bridge --------------------------------------------- I found the following bridge which allows the echo to control pretty much any device. It works with the on off commands.. ie: Alexa turn on my kitchen lights Alexa turn off my kitchen lights She simply responds with "OK" and since it's handled locally, it is fast.  In most cases, my lights are on/off before she finishes saying OK You need to include the URL for the on/off commands.. the URL could be a Perl script to kick off more than a simple lights on/off command https://github.com/armzilla/amazon-echo-ha-bridge the requires Java 8 here's a description from the github page: ----------- emulates philips hue api to other home automation gateways. The Amazon echo now supports wemo and philip hue... great news if you own any of those devices! My house is pretty heavily invested in the z-wave using the Vera as the gateway and thought it would be nice bridge the Amazon Echo to it. Register a device, bind to some sort of on/off (vera style) url ----------- Here are the steps I used to install the bridge on my Synology ------------------------------------------------------------------------ Amazon Echo HA Bridge install on Synology  (it can be run on pretty much anything.. include Pi's) mkdir /volume1/@appstore/Amazon_Echo_HA_Bridge/ cd /volume1/@appstore/Amazon_Echo_HA_Bridge/ curl https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.1.3/amazon-echo-bridge-0.1.3.jar vi listen.sh hohup java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> >> /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log & (to specify port, add --server.port=yyyy  ie:   java -jar amazon-echo-bridge-0.1.3.jar --upnp.config.address=<synology IP> --server.port=yyyy) chmod +x listen.sh sh listen.sh logs are in /volume1/@appstore/Amazon_Echo_HA_Bridge/log/amazon_bridge.log add/remove devices: http://<synology IP>:8080/configurator.html ----------- Bridge server:   update the address with your server IP.. i.e.: http://<synology IP>:8080/api/devices Add a new device Name:  ie: Kitchen On URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=on Off URL:     http://<Misterhouse IP>/ia5/set?$kitchen_light=off --------- go to echo settings http://echo.amazon.com/#settings/connected-home and have her Discover Devices or simply say "Alexa discover devices" --------------------------------------------------------------------------------------- Now you should be able to control your devices as follows: Alexa turn on/off <name> Alexa turn on my kitchen light ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
--
-Craig
------------------------------------------------------------------------------ ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
--
-Craig
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users