New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Alexa (Amazon Echo) Smart Skills API #602
Comments
I'd love to see this as well! |
If I understand correctly of their API, I'm afraid with ASSA's current structure, it's not possible to integrate Amazon Echo support with homebridge. The main issue is that, ASSA will talk to a service server and that server is responsible for rerouting the request to send to the actual device. For homebridge, I don't think we can setup a centralized server to dispatch requests that comes from Alexa due to maintenance and security risk. |
If Alexa support is interesting to you, then you should probably have all of your devices in a software home automation hub rather than in Homebridge. You can then extend that to Homebridge and Alexa. Alexa is basically just a front end to controlling things. Think of it like an app on your phone. Homebridge does not (and shouldn't) have a generic capability for broadcasting it's devices or commanding them. It's specifically a HomeKit implementation. You should look into Home Assistant. I realize that some people have used Homebridge as a single "hub" to group all of their smart devices together, and that's great! But like all things Apple, it kind of ends there. If you want to grow a little easier, using something like Home Assistant would be best. Your devices can then be bridged right over to HomeBridge (HomeKit) and used like you did before with the plugin. To bridge your devices to Alexa, you can use Haaska. It's a really great setup. All your devices will be once again grouped together in a single place, but exposed to Alexa and HomeKit and Siri, as well as any thing else that may come out in the future. |
there are other home automation systems that you could and should use as the central system. i can recommend fhem as this is the system i use and develop for but there is also openhab and quite a few more. but yes. homekit and alexa are just two frontends to such a central system. it is even advisable not to use the sonos, hue, wifilight, ... plugins for homekit but use only one plugin to bridge your central system to homekit and controls all other systems through this bridge and the central system. |
Maddox, I'm looking to make the move you are describing, but I'm killing myself trying to find a solution for ConnectedbyTcp on home assistant. Any experience? |
actually in the meantime have createted an alexa integration for fhem based largely on hombridge. the reason for going this route was that the alexa home automation api is lacking in regard to device types and querying of values and homebridge gives a perfect support these concepts. this can then be used in a custom skill. currently it is still separate from homebridge-fhem but i will merge it back so that the homebridge-fhem plugin will give siri and alexa integration for fhem. |
A homebridge skill for Alexa would be cool. The skill should only forward the requests from Alexa to the homebridge. Is this theoretically possible? |
I second that and a link from homebride to SmartThings too which might accomplish the Alexa link since smart things supports it.
Jeff
…Sent from my iPhone
On Dec 28, 2016, at 8:03 AM, thezepter ***@***.***> wrote:
A homebridge skill for Alexa would be cool. The skill should only forward the requests from Alexa to the homebridge. Is this theoretically possible?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
A simple way to accomplish this would be to expose homebridge via a REST endpoint? I think most could make this work via ifttt or something if this were possible. I would love to see this... after attempting to sniff packets from my Apple TV to homebridge to identify how the communication occurs, I found that it was more trouble than it was worth... this would solve my needs, and those listed above. |
I disagree with this assertion that Homebridge shouldn't have this capability. So as long as it can be implemented securely, why would the scope be limited to only one-way discovery and control? We're already working outside of native HomeKit device support, so we shouldn't place artificial limits on our ability to innovate as a community on the Homebridge platform.
I'm not trying to be argumentative, but utilizing another solution to achieve this level of integration means that it also must support all desired accessories and platforms originally added to Homebridge (desired to have Siri-level of control via Alexa). I for one know for a fact that it would take several such external I see absolutely nothing wrong with the use of Homebridge as a "hub" especially since it's relatively easy to extend via Javascript coupled with the seemingly endless availability of npm modules that take a lot of the hard work out of adding integrations. Sure, many of the other solutions are extendable, but they all support different programing languages and don't have the vast library of npm modules available. It seems to me that all we're missing is a few simple changes/additions to Homebridge to make things like this possible:
Please note, this capability exists today if Homebridge is launched in insecure mode. By providing the necessary methods through plugins, it can surely be done securely and much more effectively than forcing the addition of an otherwise unnecessary bridged platform like My 2 pesos anyway. :) |
👍 |
One great tool for API integration is node-red. Take a look here: |
Take a look at this, https://github.com/NorthernMan54/homebridge-alexa, an initial attempt at exposing homebridge to Amazon Alexa. For the concern raised about central servers and security it just uses a local service instead of a central. It makes the configuration more complex, and requires exposing your home network to the internet, but makes a great POC. I have been using this for a few weeks now, and it has been pretty solid. Even though it runs as homebridge plugin, it doesn't expose any accessories as it just uses the homebridge plugin framework for configuration file etc. And it will discover all the homebridges on your network, and expose those to Alexa. |
+1 Please do this. An alexa integration would be awesome! |
Okay everyone, this is my 3rd attempt at using your Amazon Alexa to control your homebridge devices. After trying a couple of different methods of exposing your homebridge devices to Alexa, this is going to be the easist for people to use. For this to work, I have made a couple of changes to HomeBridge and HAP-NodeJS so that it speaks both HomeKit and Alexa ( actually Philips Hue ). Installation of this is very simple, just change your homebridge version to this one. npm install -g https://github.com/NorthernMan54/homebridge And add a new setting "ssdp" to the bridge section of your config.json file. Value must be 1900
Restart homebridge, and ask Alexa to discover devices. This setting enables the Alexa mode, so if you don't include it, alexa mode is disabled. Useful if you run multiple homebridge's on one machine. Known Issues:
PS This only works with Real Amazon devices, any RaspberryPI based devices like AlexaPI are not supported. |
Yay! A whole new reason to bang my head on the wall! Set up as described. Accessories working thru homebridge/Siri. Alexa cannot find any new accessories. Tips for the noob? Thanks! |
I'll add: my goal is controlling my connectedbytcp lights with alexa. |
Can you try again in debug mode, and post the log I.e. DEBUG=* homebridge |
@cflurin |
@ethansinjin I found an issue in the code, please reinstall and try again. If it doesn't work, please post a debug log |
pi@raspberrypi:~ $ DEBUG=* homebridge
EventedHTTPServer Server listening on port 51826 +1s +11ms +5ms |
Is there any particular Alexa skill I should have enabled? |
No 'skill' is required, Just looking at the log and Alexa Discover devices was detected by HomeBridge ;-). Questions:
curl http://192.168.0.200:51826/description.xml
|
pi@raspberrypi:~ $ curl http://192.168.0.200:51826/description.xml 1 0 http://192.168.0.200:51826/ urn:schemas-upnp-org:device:Basic:1 Philips hue (192.168.0.200) Royal Philips Electronics http://www.philips.com Philips hue Personal Wireless Lighting Philips hue bridge 2015 BSB002 http://www.meethue.com CC223DFFFEE3CE31 uuid:2f402f80-da50-11e1-9b23-cc223de3ce31 (null) (null) (null) (null) (null) index.html image/png 48 48 24 hue_logo_0.png image/png 120 120 24 hue_logo_3.png pi@raspberrypi:~ $ |
EventedHTTPServer [::ffff:192.168.0.200] New connection from client +20s |
Can you try 'Discover Devices' from your Alexa again, and post from the debug log any content after this. ssdp >> sent response ssdp discovery response HTTP/1.1 200 OK |
ssdp << server got Hue: M-SEARCH * HTTP/1.1 +2ms +1ms |
Tks What type of Alexa device are you using? I have a recent Dot. I'm thinking that I need to expand that response information as your Alexa does not seem to like the response. |
Currently a Dot, But I have a FireTV and FireTV stick if you think I'd have better luck with either. |
Hi NorthernMan54 i tried ur procedure like- sudo npm install -g https://github.com/NorthernMan54/homebridge pi@raspberrypi:~ $ sudo npm install -g https://github.com/NorthernMan54/homebridge npm ERR! Cannot read property 'path' of null npm ERR! Please include the following file with any support request: |
This is a really odd error that I have never seen before. Is the error repeatable? Does the error occur if you install the normal homebridge i.e.
sudo npm install -g homebridge
Tks
… On Jun 13, 2017, at 4:39 PM, rafiqaust ***@***.***> wrote:
Hi NorthernMan54 i tried ur procedure like- sudo npm install -g https://github.com/NorthernMan54/homebridge <https://github.com/NorthernMan54/homebridge>
I got error massage to my pi3
***@***.***:~ $ sudo npm install -g https://github.com/NorthernMan54/homebridge <https://github.com/NorthernMan54/homebridge>
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror https://github.com/NorthernMan54/homebridge.git <https://github.com/NorthernMan54/homebridge.git> /root/.npm/_git-remotes/git-https-github-com-NorthernMan54-homebridge-git-a6b381b2: Cloning into bare repository '/root/.npm/_git-remotes/git-https-github-com-NorthernMan54-homebridge-git-a6b381b2'...
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror https://github.com/NorthernMan54/homebridge.git <https://github.com/NorthernMan54/homebridge.git> /root/.npm/_git-remotes/git-https-github-com-NorthernMan54-homebridge-git-a6b381b2: fatal: unable to access 'https://github.com/NorthernMan54/homebridge.git/ <https://github.com/NorthernMan54/homebridge.git/>': gnutls_handshake() failed: Close notify
npm ERR! Linux 4.4.50-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "https://github.com/NorthernMan54/homebridge <https://github.com/NorthernMan54/homebridge>"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! Cannot read property 'path' of null
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /root/.npm/_logs/2017-06-13T20_32_49_160Z-debug.log
***@***.***:~ $
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#602 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AS5CmDWys2TK6_zQyrRjHWSpk_3-MTpHks5sDvOFgaJpZM4IAr7M>.
|
Hi thanks for ur email normal homebridge ok only when I try to install ur command it's giving me error message.
…Sent from my iPhone
On 14 Jun 2017, at 10:28 am, NorthernMan54 ***@***.***> wrote:
This is a really odd error that I have never seen before. Is the error repeatable? Does the error occur if you install the normal homebridge i.e.
npm install -g homebridge
Tks
> On Jun 13, 2017, at 4:39 PM, rafiqaust ***@***.***> wrote:
>
> Hi NorthernMan54 i tried ur procedure like- sudo npm install -g https://github.com/NorthernMan54/homebridge <https://github.com/NorthernMan54/homebridge>
> I got error massage to my pi3
>
> ***@***.***:~ $ sudo npm install -g https://github.com/NorthernMan54/homebridge <https://github.com/NorthernMan54/homebridge>
> npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror https://github.com/NorthernMan54/homebridge.git <https://github.com/NorthernMan54/homebridge.git> /root/.npm/_git-remotes/git-https-github-com-NorthernMan54-homebridge-git-a6b381b2: Cloning into bare repository '/root/.npm/_git-remotes/git-https-github-com-NorthernMan54-homebridge-git-a6b381b2'...
> npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror https://github.com/NorthernMan54/homebridge.git <https://github.com/NorthernMan54/homebridge.git> /root/.npm/_git-remotes/git-https-github-com-NorthernMan54-homebridge-git-a6b381b2: fatal: unable to access 'https://github.com/NorthernMan54/homebridge.git/ <https://github.com/NorthernMan54/homebridge.git/>': gnutls_handshake() failed: Close notify
> npm ERR! Linux 4.4.50-v7+
> npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "https://github.com/NorthernMan54/homebridge <https://github.com/NorthernMan54/homebridge>"
> npm ERR! node v7.10.0
> npm ERR! npm v4.2.0
>
> npm ERR! Cannot read property 'path' of null
> npm ERR!
> npm ERR! If you need help, you may report this error at:
> npm ERR! https://github.com/npm/npm/issues <https://github.com/npm/npm/issues>
> npm ERR! Please include the following file with any support request:
> npm ERR! /root/.npm/_logs/2017-06-13T20_32_49_160Z-debug.log
> ***@***.***:~ $
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub <#602 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AS5CmDWys2TK6_zQyrRjHWSpk_3-MTpHks5sDvOFgaJpZM4IAr7M>.
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I have tried the install again a couple of times on one of my rpi3's and can't recreate the issue. But I was looking at the options for npm install, and they list an alternate syntax for github repo's. Let me experiment with a couple and share the results. |
Thanks a lot.
…Sent from my iPhone
On 15 Jun 2017, at 12:06 pm, NorthernMan54 ***@***.***> wrote:
I have tried the install again a couple of times on one of my rpi3's and can't recreate the issue. But I was looking at the options for npm install, and they list an alternate syntax for github repo's. Let me experiment with a couple and share the results.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
My suspicion is a defect in the version of NPM that you have installed, but try this version of the install command. It does the same thing, but uses a different method of connecting to github.
npm install -g NorthernMan54/homebridge
… On Jun 15, 2017, at 4:27 AM, rafiqaust ***@***.***> wrote:
Thanks a lot.
Sent from my iPhone
> On 15 Jun 2017, at 12:06 pm, NorthernMan54 ***@***.***> wrote:
>
> I have tried the install again a couple of times on one of my rpi3's and can't recreate the issue. But I was looking at the options for npm install, and they list an alternate syntax for github repo's. Let me experiment with a couple and share the results.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub, or mute the thread.
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#602 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AS5CmKGn6915Ef9o3hbSCaK7Ewt-LwQzks5sEOrrgaJpZM4IAr7M>.
|
Hi I have tried ur latest command but still can't get through.
…Sent from my iPhone
On 16 Jun 2017, at 11:41 am, NorthernMan54 ***@***.***> wrote:
My suspicion is a defect in the version of NPM that you have installed, but try this version of the install command. It does the same thing, but uses a different method of connecting to github.
npm install -g NorthernMan54/homebridge
> On Jun 15, 2017, at 4:27 AM, rafiqaust ***@***.***> wrote:
>
> Thanks a lot.
>
> Sent from my iPhone
>
> > On 15 Jun 2017, at 12:06 pm, NorthernMan54 ***@***.***> wrote:
> >
> > I have tried the install again a couple of times on one of my rpi3's and can't recreate the issue. But I was looking at the options for npm install, and they list an alternate syntax for github repo's. Let me experiment with a couple and share the results.
> >
> > —
> > You are receiving this because you commented.
> > Reply to this email directly, view it on GitHub, or mute the thread.
> >
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub <#602 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AS5CmKGn6915Ef9o3hbSCaK7Ewt-LwQzks5sEOrrgaJpZM4IAr7M>.
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I presume your getting the same error message? If that's the case I'm stumped. This error is from the npm package manager. Have you tried updating the version of npm?
The error message indicates raising an issue with NPM for further help.
… On Jun 27, 2017, at 1:31 AM, rafiqaust ***@***.***> wrote:
Hi I have tried ur latest command but still can't get through.
Sent from my iPhone
> On 16 Jun 2017, at 11:41 am, NorthernMan54 ***@***.***> wrote:
>
> My suspicion is a defect in the version of NPM that you have installed, but try this version of the install command. It does the same thing, but uses a different method of connecting to github.
>
> npm install -g NorthernMan54/homebridge
>
>
>
>
> > On Jun 15, 2017, at 4:27 AM, rafiqaust ***@***.***> wrote:
> >
> > Thanks a lot.
> >
> > Sent from my iPhone
> >
> > > On 15 Jun 2017, at 12:06 pm, NorthernMan54 ***@***.***> wrote:
> > >
> > > I have tried the install again a couple of times on one of my rpi3's and can't recreate the issue. But I was looking at the options for npm install, and they list an alternate syntax for github repo's. Let me experiment with a couple and share the results.
> > >
> > > —
> > > You are receiving this because you commented.
> > > Reply to this email directly, view it on GitHub, or mute the thread.
> > >
> > —
> > You are receiving this because you commented.
> > Reply to this email directly, view it on GitHub <#602 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AS5CmKGn6915Ef9o3hbSCaK7Ewt-LwQzks5sEOrrgaJpZM4IAr7M>.
> >
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub, or mute the thread.
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
yes i have upgraded v4.2.0 to 5.0.3 Thanks |
Hi I have cbus at home and it's working well with cbus and apple homebridge but ur version of homebridge can't install i have tried from many different ways start from begining but can't get through. I have install homebridge and cbus plugin both working fine- Install Homebridge Install node.js: Install Avahi and other Dependencies sudo npm install -g --unsafe-perm homebridge Any suggestion Plz. |
I'm stumped as to the actual issue. When I google the issue, it shows up as a TLS issue or Firewall issue. I would suggest following the instructions in the error, and raise an issue against NPM npm ERR! If you need help, you may report this error at: npm ERR! Please include the following file with any support request: Also, the npm install command has a option to install from a directory, so you could download the package from github, then install from a directory. But I don't think that will work as the install downloads a second package as part of the install. |
Hi what version of node using ur raspberry Pi . Thanks
…Sent from my iPhone
On 29 Jun 2017, at 10:48 am, NorthernMan54 ***@***.***> wrote:
I'm stumped as to the actual issue. When I google the issue, it shows up as a TLS issue or Firewall issue.
I would suggest following the instructions in the error, and raise an issue against NPM
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /root/.npm/_logs/2017-06-13T20_32_49_160Z-debug.log
Also, the npm install command has a option to install from a directory, so you could download the package from github, then install from a directory. But I don't think that will work as the install downloads a second package as part of the install.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@rafiqaust I use Node v8.1.2 and it works perfectly, these were the 2 commands I ran to get that version loaded onto the pi:
|
Any plans to merge this into regular homebridge? It is super annoying that I have to run two home bridge servers to get the Alexa functionality. As long as the functionality is behind a configuration that defaults to turned off, those of us who wish to use it and troubleshoot it can. |
Merging this into the main homebridge and HAP-NodeJS is on my to do list, just waiting till I get some free time for this. But I’m wondering why you have to run two homebridge servers for this functionality? I’m running 5, but that is give some plugin’s isolation from each other, as I’m always tinkering. And I have a separate instance just for my kids, so they can maintain there own favourites and automations.
… On Jul 17, 2017, at 6:24 PM, creedda ***@***.***> wrote:
Any plans to merge this into regular homebridge? It is super annoying that I have to run two home bridge servers to get the Alexa functionality.
As long as the functionality is behind a configuration that defaults to turned off, those of us who wish to use it and troubleshoot it can.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#602 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AS5CmKZL9w0GhCkzecVJX4rgvXS9m_iRks5sO98agaJpZM4IAr7M>.
|
Hi Northernman54 ur homebridge version not installing in my raspberry pi globally but locally installing. My question if I install locally like npm install homebridge-alexa so it would be the same version as sudo npm install -g https://github.com/NorthernMan54/homebridge and also u have hap-alexa so do I need to install both or just one. I need to install homebridge-cbus plugin so ur version will work with the clipsal cbus system. |
To enable the feature all you need to do is install my version of homebridge, the other repositories on github are different approaches that I have abandoned. I kept them on github in case I decide to go back to that approach.
If the install with sudo is not working, please share the log. For the last person to have trouble installing, issuing the command as
sudo sudo npm install -g https://github.com/NorthernMan54/homebridge
Worked, but I don't know why.
… On Jul 31, 2017, at 7:09 AM, rafiqaust ***@***.***> wrote:
Hi Northernman54 ur homebridge version not installing in my raspberry pi globally but locally installing. My question if I install locally like npm install homebridge-alexa so it would be the same version as sudo npm install -g https://github.com/NorthernMan54/homebridge and also u have hap-alexa so do I need to install both or just one. I need to install homebridge-cbus plugin so ur version will work with the clipsal cbus system.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks for that I am bit confused u got other package hap-Alexa do i need to install both of them and also i raised the question cbus plugin will work with it. |
As I said before, you only need to my version of homebridge, and nothing else if mine. When it comes to cbus, I don't know if it will work, we need to try it and see. |
Merging the code into the regular homebridge would keep you from having to keep track of main branch homebrew changes :) Would also make install easier and standard since we would not have to go off and install a second version. I have two instances because I have anything non-Alexa facing on my regular homebridge (rock solid with no issues there) and everything Alexa facing needs to be on another instance of homebride that supports Alexa. Would be great to merge the two officially. |
I have just found this and i'm pretty excited about it, however i'm running into a problem on launch. EADDRINUSE *:1900. I have looked that there is nothing running on that port so it looks like a conflict in homebridge. `[10/3/2017, 6:04:59 PM] Loaded plugin: homebridge-applescript
[10/3/2017, 6:05:00 PM] Homebridge is running on port 51826. Error: bind EADDRINUSE 0.0.0.0:1900 |
How did you check for the port conflict? I use this command netstat -an | grep 1900 To check. |
Okay, well fail on my part! I think I was burned out last night not thinking clearly. Found the conflict and got that resolved. Thanks for the help! |
Hey @NorthernMan54, any update on merging your changes with the official branch? |
Just submitted the pull request for HAP-NodeJS, once that gets merged, then the homebridge changes and its then part of main stream. |
Hi, I’m completely new to this Project. I have Alexa since last weekend and try to get my switches connected to Alexa but no devices were found. I use Pilight with homebridge to control my switches via siri. Can somebody help me to get this done? Cheers. |
@sm17h85 Please open an issue against here |
@NorthernMan54 i just copied the message here. thank you |
Would be great if the HomeBridge could make the entire HomeKit network visible to Alexa via
https://developer.amazon.com/public/community/post/Tx1KIRDSNFDHEA4/Amazon-Enables-Developers-to-Extend-Alexa-s-Smart-Home-Capabilities-a-New-Additi
The text was updated successfully, but these errors were encountered: