Amazon Echo / Alexa support in master

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Amazon Echo / Alexa support in master

Jon Whitear
Hello folks,

I’ve just been getting Alexa working using master, and come across a couple of gotchas that might be worth fixing / documenting for the upcoming 4.3 release.

Firstly, there’s a typo in read_table_A, where the alexa bridge is defined as ALEX_BRIDGE instead of ALEXA_BRIDGE. I don’t have a dev environment set up at the moment, otherwise I’d submit a patch.

Here’s a snippet of my MHT file - I’ve kind of worked this backwards from what’s in read_table_A, and it doesn’t quite match what documented in AlexaBridge.pm:

ALEX_BRIDGE, Alexa
ALEXABRIDGE_ITEM, AlexaItems, Alexa

ALEXABRIDGE_ADD,        AlexaItems,   Study_Light
ALEXABRIDGE_ADD,        AlexaItems,   Front_Entrance_Light

which gives me this in my MHP file:

$Alexa                               =  new AlexaBridge('');

$AlexaItems                          =  new AlexaBridge_Item($Alexa);
use AlexaBridge;
$AlexaItems                          -> add('$Study_Light','','','','','',);
$AlexaItems                          -> add('$Front_Entrance_Light','','','','','',);


Also, I wasn’t able to get Alexa to discover anything unless I specified alexaHttpIp. I was getting this debug message showing a missing IP address in the location field:-

06/03/17 09:12:24 PM [Alexa] Debug: SSDP OUT - HTTP/1.1 200 OK
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=100
EXT:
LOCATION: http://:8080/description.xml
SERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.15.0
hue-bridgeid: B827EBFFFE13ABC3
ST: upnp:rootdevice
USN: uuid:B827EB13ABC3::upnp:rootdevice

I now have this in my INI file:

alexa_enable=1
alexaEnableChunked=1
alexaHttpIp=<my hostname>

and it’s all working.

Cheers,

Jon



------------------------------------------------------------------------------
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
|  
Report Content as Inappropriate

Re: Amazon Echo / Alexa support in master

Jon Boehm
I'm not understanding Alexa integration.  First off, to get this out of the way, I build my own AlexaPi.  Its possible Alexa integration doesn't work with a AlexiPi???

So my install story:

I couldn't get Net::Address::Ethernet to install on Ubuntu so I just specified the IP and MAC 

I've added this to ini
alexa_enable = 1
alexaEnableChunked = 1
alexaHttpIp=NUMBER
alexaMac=NUMBER

Then I could not get items.mht specification to work because items.mhp compiles 
use AlexaBridge; 
after the bridge declaration.

So I created a user code my_alexa.pl and did this.  (ignore the line numbers)
  2 use AlexaBridge;
  3 
  4 
  5 $Alexa = new AlexaBridge();  # parent object
  6 
  7 $AlexaItems                          =  new AlexaBridge_Item($Alexa);
  8 $AlexaItems                          -> add('$KitchenLights','Kitchen_Lights','','','','',);
  9 $AlexaItems                          -> add('$KitchenCabinet','Kitchen_Cabinet_Lights','','','','',);
 10 $AlexaItems                          -> add('$FamilyRoomLamp','Family_Room_Lights','','','','',);
 11 $AlexaItems                          -> add('$HolidayLightsOutside','Outside_Christmas_Lights','','','','',);
 12 $AlexaItems                          -> add('$HolidayLightsIndoor','Inside_Christmas_Lights','','','','',);
 13 $AlexaItems                          -> add('$FrontPorchLight','Front_Porch_Lights','','','','',);

Finally I'm stuck because the Echo can't see anything. I enabled the Hue skill, 
but in creating a hue account it said it could not find a device.  I assume its 
talking about a hue base station??? I don't know what I'm talking about here.

Next in scanning for devices nothing shows up.
I'm not sure what I'm doing wrong.

Thanks for the help,
Jon

On Sat, Jun 3, 2017 at 6:45 PM, Jon Whitear <[hidden email]> wrote:
Hello folks,

I’ve just been getting Alexa working using master, and come across a couple of gotchas that might be worth fixing / documenting for the upcoming 4.3 release.

Firstly, there’s a typo in read_table_A, where the alexa bridge is defined as ALEX_BRIDGE instead of ALEXA_BRIDGE. I don’t have a dev environment set up at the moment, otherwise I’d submit a patch.

Here’s a snippet of my MHT file - I’ve kind of worked this backwards from what’s in read_table_A, and it doesn’t quite match what documented in AlexaBridge.pm:

ALEX_BRIDGE, Alexa
ALEXABRIDGE_ITEM, AlexaItems, Alexa

ALEXABRIDGE_ADD,        AlexaItems,   Study_Light
ALEXABRIDGE_ADD,        AlexaItems,   Front_Entrance_Light

which gives me this in my MHP file:

$Alexa                               =  new AlexaBridge('');

$AlexaItems                          =  new AlexaBridge_Item($Alexa);
use AlexaBridge;
$AlexaItems                          -> add('$Study_Light','','','','','',);
$AlexaItems                          -> add('$Front_Entrance_Light','','','','','',);


Also, I wasn’t able to get Alexa to discover anything unless I specified alexaHttpIp. I was getting this debug message showing a missing IP address in the location field:-

06/03/17 09:12:24 PM [Alexa] Debug: SSDP OUT - HTTP/1.1 200 OK
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=100
EXT:
LOCATION: http://:8080/description.xml
SERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.15.0
hue-bridgeid: B827EBFFFE13ABC3
ST: upnp:rootdevice
USN: uuid:B827EB13ABC3::upnp:rootdevice

I now have this in my INI file:

alexa_enable=1
alexaEnableChunked=1
alexaHttpIp=<my hostname>

and it’s all working.

Cheers,

Jon



------------------------------------------------------------------------------
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
|  
Report Content as Inappropriate

Re: Amazon Echo / Alexa support in master

Jon Boehm
I would like to add that something is happening.  When MH is running and I use the Hue app on my iPhone I see "1 new Hue bridge found".  But the next screen talks about "Push-Link".  Not sure what to do here.

Jon 

On Mon, Jun 12, 2017 at 9:31 PM, Jon Boehm <[hidden email]> wrote:
I'm not understanding Alexa integration.  First off, to get this out of the way, I build my own AlexaPi.  Its possible Alexa integration doesn't work with a AlexiPi???

So my install story:

I couldn't get Net::Address::Ethernet to install on Ubuntu so I just specified the IP and MAC 

I've added this to ini
alexa_enable = 1
alexaEnableChunked = 1
alexaHttpIp=NUMBER
alexaMac=NUMBER

Then I could not get items.mht specification to work because items.mhp compiles 
use AlexaBridge; 
after the bridge declaration.

So I created a user code my_alexa.pl and did this.  (ignore the line numbers)
  2 use AlexaBridge;
  3 
  4 
  5 $Alexa = new AlexaBridge();  # parent object
  6 
  7 $AlexaItems                          =  new AlexaBridge_Item($Alexa);
  8 $AlexaItems                          -> add('$KitchenLights','Kitchen_Lights','','','','',);
  9 $AlexaItems                          -> add('$KitchenCabinet','Kitchen_Cabinet_Lights','','','','',);
 10 $AlexaItems                          -> add('$FamilyRoomLamp','Family_Room_Lights','','','','',);
 11 $AlexaItems                          -> add('$HolidayLightsOutside','Outside_Christmas_Lights','','','','',);
 12 $AlexaItems                          -> add('$HolidayLightsIndoor','Inside_Christmas_Lights','','','','',);
 13 $AlexaItems                          -> add('$FrontPorchLight','Front_Porch_Lights','','','','',);

Finally I'm stuck because the Echo can't see anything. I enabled the Hue skill, 
but in creating a hue account it said it could not find a device.  I assume its 
talking about a hue base station??? I don't know what I'm talking about here.

Next in scanning for devices nothing shows up.
I'm not sure what I'm doing wrong.

Thanks for the help,
Jon

On Sat, Jun 3, 2017 at 6:45 PM, Jon Whitear <[hidden email]> wrote:
Hello folks,

I’ve just been getting Alexa working using master, and come across a couple of gotchas that might be worth fixing / documenting for the upcoming 4.3 release.

Firstly, there’s a typo in read_table_A, where the alexa bridge is defined as ALEX_BRIDGE instead of ALEXA_BRIDGE. I don’t have a dev environment set up at the moment, otherwise I’d submit a patch.

Here’s a snippet of my MHT file - I’ve kind of worked this backwards from what’s in read_table_A, and it doesn’t quite match what documented in AlexaBridge.pm:

ALEX_BRIDGE, Alexa
ALEXABRIDGE_ITEM, AlexaItems, Alexa

ALEXABRIDGE_ADD,        AlexaItems,   Study_Light
ALEXABRIDGE_ADD,        AlexaItems,   Front_Entrance_Light

which gives me this in my MHP file:

$Alexa                               =  new AlexaBridge('');

$AlexaItems                          =  new AlexaBridge_Item($Alexa);
use AlexaBridge;
$AlexaItems                          -> add('$Study_Light','','','','','',);
$AlexaItems                          -> add('$Front_Entrance_Light','','','','','',);


Also, I wasn’t able to get Alexa to discover anything unless I specified alexaHttpIp. I was getting this debug message showing a missing IP address in the location field:-

06/03/17 09:12:24 PM [Alexa] Debug: SSDP OUT - HTTP/1.1 200 OK
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=100
EXT:
LOCATION: http://:8080/description.xml
SERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.15.0
hue-bridgeid: B827EBFFFE13ABC3
ST: upnp:rootdevice
USN: uuid:B827EB13ABC3::upnp:rootdevice

I now have this in my INI file:

alexa_enable=1
alexaEnableChunked=1
alexaHttpIp=<my hostname>

and it’s all working.

Cheers,

Jon



------------------------------------------------------------------------------
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
|  
Report Content as Inappropriate

Re: Amazon Echo / Alexa support in master

Jon Whitear
You don’t need the Hue skill enabled in Alexa.

Try enabling debug (debug=alexa:5 in mh.private.ini) and see what you get when you tel Alexa to discover devices.

Why couldn’t you get Net::Address::Ethernet to install? Did you try using cpan?







------------------------------------------------------------------------------
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
|  
Report Content as Inappropriate

Re: Amazon Echo / Alexa support in master

Jon Boehm
My current problem does not appear to be misterhouse.  Unfortunately it looks like Alexapi 

From the Alexapi Q&A:

Can I discover my devices with AlexaPi like with Echo?

No. AVS API doesn't have a way to connect the devices to Amazon. You can probably still do this by setting up your own Alexa skills, but that's a different thing than AlexaPi.

AlexaPi will allow you to control your devices such as Hue provided you also have a genuine Echo in the network which acts as a gateway between the Alexa service and your Hue bridge.




On Tue, Jun 13, 2017 at 2:09 AM, Jon Whitear <[hidden email]> wrote:
You don’t need the Hue skill enabled in Alexa.

Try enabling debug (debug=alexa:5 in mh.private.ini) and see what you get when you tel Alexa to discover devices.

Why couldn’t you get Net::Address::Ethernet to install? Did you try using cpan?








------------------------------------------------------------------------------
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
|  
Report Content as Inappropriate

Re: Amazon Echo / Alexa support in master

Jon Boehm
All,

JonW helped me offline.  As a result I'm up and running.  I expanded the documentation a bit, explaining the fixes JonW and I discovered in the process.


Please remove info that you know to be incorrect.

Thanks

On Tue, Jun 13, 2017 at 8:38 AM, Jon Boehm <[hidden email]> wrote:
My current problem does not appear to be misterhouse.  Unfortunately it looks like Alexapi 

From the Alexapi Q&A:

Can I discover my devices with AlexaPi like with Echo?

No. AVS API doesn't have a way to connect the devices to Amazon. You can probably still do this by setting up your own Alexa skills, but that's a different thing than AlexaPi.

AlexaPi will allow you to control your devices such as Hue provided you also have a genuine Echo in the network which acts as a gateway between the Alexa service and your Hue bridge.




On Tue, Jun 13, 2017 at 2:09 AM, Jon Whitear <[hidden email]> wrote:
You don’t need the Hue skill enabled in Alexa.

Try enabling debug (debug=alexa:5 in mh.private.ini) and see what you get when you tel Alexa to discover devices.

Why couldn’t you get Net::Address::Ethernet to install? Did you try using cpan?









------------------------------------------------------------------------------
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
|  
Report Content as Inappropriate

Re: Amazon Echo / Alexa support in master

H Plato
Thanks Jon,

  I just updated master to include a fix to read_table_A.pl so that ALEXA_BRIDGE works.

Also, just one comment - 

"Part1 - The mh-rev-4.2 has a bug in AlexaBridge.pm that does not seem to divine the address correctly. You must specify alexaHttpIp in mh.private.ini. Without it mh doesn't broadcast its URL to Alexa correctly”. 

Removing Net::Address::Ethernet was actually a concious choice, as it requires a binary object, so it couldn’t be included in the builtin site libs. Wayne did a great job of figuring out a method on how to include the necessary items to make Alexa work out of the box with just mh.ini settings.


On Jun 17, 2017, at 1:05 PM, Jon Boehm <[hidden email]> wrote:

All,

JonW helped me offline.  As a result I'm up and running.  I expanded the documentation a bit, explaining the fixes JonW and I discovered in the process.


Please remove info that you know to be incorrect.

Thanks

On Tue, Jun 13, 2017 at 8:38 AM, Jon Boehm <[hidden email]> wrote:
My current problem does not appear to be misterhouse.  Unfortunately it looks like Alexapi 

From the Alexapi Q&A:

Can I discover my devices with AlexaPi like with Echo?

No. AVS API doesn't have a way to connect the devices to Amazon. You can probably still do this by setting up your own Alexa skills, but that's a different thing than AlexaPi.

AlexaPi will allow you to control your devices such as Hue provided you also have a genuine Echo in the network which acts as a gateway between the Alexa service and your Hue bridge.




On Tue, Jun 13, 2017 at 2:09 AM, Jon Whitear <[hidden email]> wrote:
You don’t need the Hue skill enabled in Alexa.

Try enabling debug (debug=alexa:5 in mh.private.ini) and see what you get when you tel Alexa to discover devices.

Why couldn’t you get Net::Address::Ethernet to install? Did you try using cpan?








------------------------------------------------------------------------------
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
|  
Report Content as Inappropriate

Re: Amazon Echo / Alexa support in master

Jon Boehm
Let me know if have this correct:
* my section on  items.mht will be fixed in the next release
* alexaHttpIp Part1 is not a bug and alexaHttpIp is a required parameter.

If have that right I'll update my comments to reflect the info.

Thanks,
Jon 

On Sat, Jun 17, 2017 at 3:55 PM, H Plato <[hidden email]> wrote:
Thanks Jon,

  I just updated master to include a fix to read_table_A.pl so that ALEXA_BRIDGE works.

Also, just one comment - 

"Part1 - The mh-rev-4.2 has a bug in AlexaBridge.pm that does not seem to divine the address correctly. You must specify alexaHttpIp in mh.private.ini. Without it mh doesn't broadcast its URL to Alexa correctly”. 

Removing Net::Address::Ethernet was actually a concious choice, as it requires a binary object, so it couldn’t be included in the builtin site libs. Wayne did a great job of figuring out a method on how to include the necessary items to make Alexa work out of the box with just mh.ini settings.


On Jun 17, 2017, at 1:05 PM, Jon Boehm <[hidden email]> wrote:

All,

JonW helped me offline.  As a result I'm up and running.  I expanded the documentation a bit, explaining the fixes JonW and I discovered in the process.


Please remove info that you know to be incorrect.

Thanks

On Tue, Jun 13, 2017 at 8:38 AM, Jon Boehm <[hidden email]> wrote:
My current problem does not appear to be misterhouse.  Unfortunately it looks like Alexapi 

From the Alexapi Q&A:

Can I discover my devices with AlexaPi like with Echo?

No. AVS API doesn't have a way to connect the devices to Amazon. You can probably still do this by setting up your own Alexa skills, but that's a different thing than AlexaPi.

AlexaPi will allow you to control your devices such as Hue provided you also have a genuine Echo in the network which acts as a gateway between the Alexa service and your Hue bridge.




On Tue, Jun 13, 2017 at 2:09 AM, Jon Whitear <[hidden email]> wrote:
You don’t need the Hue skill enabled in Alexa.

Try enabling debug (debug=alexa:5 in mh.private.ini) and see what you get when you tel Alexa to discover devices.

Why couldn’t you get Net::Address::Ethernet to install? Did you try using cpan?








------------------------------------------------------------------------------
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
|  
Report Content as Inappropriate

Re: Amazon Echo / Alexa support in master

H Plato
The fix is already in master, and will be included in 4.3, and yes, I think that for those that don’t want to install Net::Address::Ethernet, alexaHttpIp is required. I use that config setting on my setup and it works great.

On Jun 17, 2017, at 9:34 PM, Jon Boehm <[hidden email]> wrote:

Let me know if have this correct:
* my section on  items.mht will be fixed in the next release
* alexaHttpIp Part1 is not a bug and alexaHttpIp is a required parameter.

If have that right I'll update my comments to reflect the info.

Thanks,
Jon 

On Sat, Jun 17, 2017 at 3:55 PM, H Plato <[hidden email]> wrote:
Thanks Jon,

  I just updated master to include a fix to read_table_A.pl so that ALEXA_BRIDGE works.

Also, just one comment - 

"Part1 - The mh-rev-4.2 has a bug in AlexaBridge.pm that does not seem to divine the address correctly. You must specify alexaHttpIp in mh.private.ini. Without it mh doesn't broadcast its URL to Alexa correctly”. 

Removing Net::Address::Ethernet was actually a concious choice, as it requires a binary object, so it couldn’t be included in the builtin site libs. Wayne did a great job of figuring out a method on how to include the necessary items to make Alexa work out of the box with just mh.ini settings.


On Jun 17, 2017, at 1:05 PM, Jon Boehm <[hidden email]> wrote:

All,

JonW helped me offline.  As a result I'm up and running.  I expanded the documentation a bit, explaining the fixes JonW and I discovered in the process.


Please remove info that you know to be incorrect.

Thanks

On Tue, Jun 13, 2017 at 8:38 AM, Jon Boehm <[hidden email]> wrote:
My current problem does not appear to be misterhouse.  Unfortunately it looks like Alexapi 

From the Alexapi Q&A:

Can I discover my devices with AlexaPi like with Echo?

No. AVS API doesn't have a way to connect the devices to Amazon. You can probably still do this by setting up your own Alexa skills, but that's a different thing than AlexaPi.

AlexaPi will allow you to control your devices such as Hue provided you also have a genuine Echo in the network which acts as a gateway between the Alexa service and your Hue bridge.




On Tue, Jun 13, 2017 at 2:09 AM, Jon Whitear <[hidden email]> wrote:
You don’t need the Hue skill enabled in Alexa.

Try enabling debug (debug=alexa:5 in mh.private.ini) and see what you get when you tel Alexa to discover devices.

Why couldn’t you get Net::Address::Ethernet to install? Did you try using cpan?








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

Loading...