Skip to content
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

Closed
omarshahine opened this issue Apr 6, 2016 · 106 comments
Closed

Support for Alexa (Amazon Echo) Smart Skills API #602

omarshahine opened this issue Apr 6, 2016 · 106 comments

Comments

@omarshahine
Copy link

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

@lessphiling
Copy link

I'd love to see this as well!

@KhaosT
Copy link
Contributor

KhaosT commented Apr 7, 2016

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.

@maddox
Copy link
Contributor

maddox commented Apr 7, 2016

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.

@justme-1968
Copy link
Contributor

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.

@etsnfrels
Copy link

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?

@justme-1968
Copy link
Contributor

justme-1968 commented Dec 21, 2016

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.

@thezepter
Copy link

A homebridge skill for Alexa would be cool. The skill should only forward the requests from Alexa to the homebridge. Is this theoretically possible?

@macjeff
Copy link

macjeff commented Dec 28, 2016 via email

@jeffdoll-wf
Copy link

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.

@inator
Copy link

inator commented Jan 19, 2017

Homebridge does not (and shouldn't) have a generic capability for broadcasting it's devices or commanding them. It's specifically a HomeKit implementation.

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

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 Home Assistant like solutions to achieve this. In fact, I have added accessories that are uncovered by other such solutions entirely.

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:

  • Exposure of all accessories and characteristics from within plugin code (for discovery)
  • The ability to change characteristics via plugin code (to execute Alexa commands)
  • The addition of oAuth authentication and REST access via plugin code (required by Smart Home Skill)

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

My 2 pesos anyway. :)

@inator
Copy link

inator commented Jan 19, 2017

A simple way to accomplish this would be to expose homebridge via a REST endpoint?

👍

@cflurin
Copy link
Contributor

cflurin commented Jan 19, 2017

One great tool for API integration is node-red. Take a look here:
https://nodered.org/
I'm using node-red for all my home automation cases, it also offers a wui (dashboard). The devices I need to control via homebridge are connected via homebridge-mqtt
There is als a node for Alexa:
https://github.com/hardillb/node-red-contrib-alexa-home-skill

@NorthernMan54
Copy link
Contributor

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.

@grinsekatze003
Copy link

+1 Please do this. An alexa integration would be awesome!

@NorthernMan54
Copy link
Contributor

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

 "bridge": {
    "name": "Howard",
    "username": "CC:22:3D:E3:CE:31",
    "port": 51826,
    "pin": "031-45-154",
"ssdp": 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:

  1. If you run homebridge on the same machine as Kodi, this feature will not work and you will receive an error during startup. If you start homebridge first, then Kodi it should be okay.
  2. Only one per machine. If you are running multiple copies of homebridge on a machine, it will not work.

PS This only works with Real Amazon devices, any RaspberryPI based devices like AlexaPI are not supported.

@etsnfrels
Copy link

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!

@etsnfrels
Copy link

I'll add: my goal is controlling my connectedbytcp lights with alexa.

@NorthernMan54
Copy link
Contributor

Can you try again in debug mode, and post the log I.e.

DEBUG=* homebridge

@zork17
Copy link

zork17 commented Mar 4, 2017

@cflurin
I just read your comment: #602 (comment)
All of my devices (120) are currently controlled by homebridge (most of them by hombridge-knx).
I want to have a dashboard (that you mentioned) on my iPad for easy control of them.
How can I connect homebridge and its devices to node-red?
What dashboard are you using?

@NorthernMan54
Copy link
Contributor

@ethansinjin I found an issue in the code, please reinstall and try again. If it doesn't work, please post a debug log

@etsnfrels
Copy link

pi@raspberrypi:~ $ DEBUG=* homebridge
*** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs
*** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister
[3/4/2017, 5:53:49 PM] Loaded plugin: homebridge-connectedbytcp
[3/4/2017, 5:53:56 PM] Registering platform 'homebridge-conntectedbytcp.ConnectedByTcp'
[3/4/2017, 5:53:56 PM] ---
[3/4/2017, 5:53:56 PM] Loaded config.json with 0 accessories and 1 platforms.
[3/4/2017, 5:53:56 PM] ---
[3/4/2017, 5:53:56 PM] Loading 1 platforms...
[3/4/2017, 5:53:56 PM] [ConnectedByTcp] Initializing ConnectedByTcp platform...
[3/4/2017, 5:53:56 PM] [ConnectedByTcp] in accessories
ssdp not running +0ms
ssdp binding to port 1900 for ssdp discovery +11ms
ssdp server listening 0.0.0.0:1900 +21ms
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] roomGetCarousel result: 12001Living Room1000bd1f1images/green.png0002164765823351504481011002164765823352626791011002164765823353558751011005Kitchen10845fcf5images/purple.png000216476582335277448101100216476582335279408101100216476582335279412101100216476582335328851101100
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] {"did":["216476582335150448"],"known":["1"],"lock":["0"],"state":["1"],"level":["100"]}
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Creating Lightbulb with device id '216476582335150448' and state '1'
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] {"did":["216476582335262679"],"known":["1"],"lock":["0"],"state":["1"],"level":["100"]}
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Creating Lightbulb with device id '216476582335262679' and state '1'
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] {"did":["216476582335355875"],"known":["1"],"lock":["0"],"state":["1"],"level":["100"]}
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Creating Lightbulb with device id '216476582335355875' and state '1'
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] {"did":["216476582335277448"],"known":["1"],"lock":["0"],"state":["1"],"level":["100"]}
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Creating Lightbulb with device id '216476582335277448' and state '1'
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] {"did":["216476582335279408"],"known":["1"],"lock":["0"],"state":["1"],"level":["100"]}
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Creating Lightbulb with device id '216476582335279408' and state '1'
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] {"did":["216476582335279412"],"known":["1"],"lock":["0"],"state":["1"],"level":["100"]}
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Creating Lightbulb with device id '216476582335279412' and state '1'
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] {"did":["216476582335328851"],"known":["1"],"lock":["0"],"state":["1"],"level":["100"]}
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Creating Lightbulb with device id '216476582335328851' and state '1'
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] returning devices: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Initializing platform accessory 'Test'...
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Initializing platform accessory 'Bulb 216476582335262679'...
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Initializing platform accessory 'Bulb 216476582335355875'...
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Initializing platform accessory 'Bulb 216476582335277448'...
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Initializing platform accessory 'Bulb 216476582335279408'...
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Initializing platform accessory 'Bulb 216476582335279412'...
[3/4/2017, 5:53:57 PM] [ConnectedByTcp] Initializing platform accessory 'Bulb 216476582335328851'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

EventedHTTPServer Server listening on port 51826 +1s
[3/4/2017, 5:53:57 PM] Homebridge is running on port 51826.
EventedHTTPServer [::ffff:192.168.0.10] New connection from client +19s
EventedHTTPServer [::ffff:192.168.0.10] HTTP server listening on port 40353 +4ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP request: /pair-verify +40ms
HAPServer [CC:22:3D:E3:CE:31] HAP Request: POST /pair-verify +3ms
HAPServer [CC:22:3D:E3:CE:31] Pair verify step 1/2 +18ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP Response is finished +60ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP request: /pair-verify +61ms
HAPServer [CC:22:3D:E3:CE:31] HAP Request: POST /pair-verify +1ms
HAPServer [CC:22:3D:E3:CE:31] Pair verify step 2/2 +5ms
HAPServer [CC:22:3D:E3:CE:31] Client BF9949F1-80F2-4ABE-A526-7D5DD0EB818F verification complete +10ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP Response is finished +4ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP request: /accessories +20ms
HAPServer [CC:22:3D:E3:CE:31] HAP Request: GET /accessories +0ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP Response is finished +15ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP request: /characteristics +260ms
HAPServer [CC:22:3D:E3:CE:31] HAP Request: PUT /characteristics +0ms
Accessory [Homebridge] Processing characteristic set: [{"aid":2,"iid":12,"ev":true},{"aid":2,"iid":15,"ev":true},{"aid":3,"iid":12,"ev":true},{"aid":3,"iid":15,"ev":true},{"aid":4,"iid":12,"ev":true},{"aid":4,"iid":15,"ev":true},{"aid":5,"iid":12,"ev":true},{"aid":5,"iid":15,"ev":true},{"aid":6,"iid":12,"ev":true},{"aid":6,"iid":15,"ev":true},{"aid":7,"iid":12,"ev":true},{"aid":7,"iid":15,"ev":true},{"aid":8,"iid":12,"ev":true},{"aid":8,"iid":15,"ev":true}] +4ms
Accessory [Homebridge] Registering Characteristic "Reachable" for events +3ms
Accessory [Homebridge] Registering Characteristic "Category" for events +1ms
Accessory [Homebridge] Registering Characteristic "Reachable" for events +0ms
Accessory [Homebridge] Registering Characteristic "Category" for events +0ms
Accessory [Homebridge] Registering Characteristic "Reachable" for events +0ms
Accessory [Homebridge] Registering Characteristic "Category" for events +1ms
Accessory [Homebridge] Registering Characteristic "Reachable" for events +0ms
Accessory [Homebridge] Registering Characteristic "Category" for events +0ms
Accessory [Homebridge] Registering Characteristic "Reachable" for events +0ms
Accessory [Homebridge] Registering Characteristic "Category" for events +0ms
Accessory [Homebridge] Registering Characteristic "Reachable" for events +1ms
Accessory [Homebridge] Registering Characteristic "Category" for events +0ms
Accessory [Homebridge] Registering Characteristic "Reachable" for events +0ms
Accessory [Homebridge] Registering Characteristic "Category" for events +0ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP Response is finished +2ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP request: /characteristics +154ms
HAPServer [CC:22:3D:E3:CE:31] HAP Request: PUT /characteristics +0ms
Accessory [Homebridge] Processing characteristic set: [{"aid":3,"iid":9,"ev":true},{"aid":3,"iid":10,"ev":true}] +1ms
Accessory [Homebridge] Registering Characteristic "On" for events +0ms
Accessory [Homebridge] Registering Characteristic "Brightness" for events +0ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP Response is finished +1ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP request: /characteristics +35ms
HAPServer [CC:22:3D:E3:CE:31] HAP Request: PUT /characteristics +1ms
Accessory [Homebridge] Processing characteristic set: [{"aid":2,"iid":9,"ev":true},{"aid":2,"iid":10,"ev":true}] +1ms
Accessory [Homebridge] Registering Characteristic "On" for events +4ms
Accessory [Homebridge] Registering Characteristic "Brightness" for events +1ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP Response is finished +1ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP request: /characteristics +22ms
HAPServer [CC:22:3D:E3:CE:31] HAP Request: PUT /characteristics +0ms
Accessory [Homebridge] Processing characteristic set: [{"aid":4,"iid":9,"ev":true},{"aid":4,"iid":10,"ev":true}] +1ms
Accessory [Homebridge] Registering Characteristic "On" for events +0ms
Accessory [Homebridge] Registering Characteristic "Brightness" for events +0ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP Response is finished +1ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP request: /characteristics +13ms
HAPServer [CC:22:3D:E3:CE:31] HAP Request: PUT /characteristics +0ms
Accessory [Homebridge] Processing characteristic set: [{"aid":5,"iid":9,"ev":true},{"aid":5,"iid":10,"ev":true}] +2ms
Accessory [Homebridge] Registering Characteristic "On" for events +1ms
Accessory [Homebridge] Registering Characteristic "Brightness" for events +2ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP Response is finished +1ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP request: /characteristics +20ms
HAPServer [CC:22:3D:E3:CE:31] HAP Request: PUT /characteristics +1ms
Accessory [Homebridge] Processing characteristic set: [{"aid":6,"iid":9,"ev":true},{"aid":6,"iid":10,"ev":true}] +1ms
Accessory [Homebridge] Registering Characteristic "On" for events +0ms
Accessory [Homebridge] Registering Characteristic "Brightness" for events +0ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP Response is finished +2ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP request: /characteristics +33ms
HAPServer [CC:22:3D:E3:CE:31] HAP Request: PUT /characteristics +0ms
Accessory [Homebridge] Processing characteristic set: [{"aid":7,"iid":9,"ev":true},{"aid":7,"iid":10,"ev":true}] +1ms
Accessory [Homebridge] Registering Characteristic "On" for events +1ms
Accessory [Homebridge] Registering Characteristic "Brightness" for events +0ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP Response is finished +2ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP request: /characteristics +29ms
HAPServer [CC:22:3D:E3:CE:31] HAP Request: PUT /characteristics +1ms
Accessory [Homebridge] Processing characteristic set: [{"aid":8,"iid":9,"ev":true},{"aid":8,"iid":10,"ev":true}] +1ms
Accessory [Homebridge] Registering Characteristic "On" for events +0ms
Accessory [Homebridge] Registering Characteristic "Brightness" for events +0ms
EventedHTTPServer [::ffff:192.168.0.10] HTTP Response is finished +1ms
ssdp << server got Hue: M-SEARCH * HTTP/1.1
ssdp HOST: 239.255.255.250:1900
ssdp MAN: "ssdp:discover"
ssdp MX: 15
ssdp ST: urn:schemas-upnp-org:device:basic:1
ssdp
ssdp from 192.168.0.9:50000 +6s
ssdp >> sent response ssdp discovery response HTTP/1.1 200 OK
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=100
EXT:
LOCATION: http://192.168.0.200:51826/description.xml
SERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.15.0
hue-bridgeid: CC223DFFFEE3CE31
ST: urn:schemas-upnp-org:device:basic:1
USN: uuid:2f402f80-da50-11e1-9b23-cc223de3ce31

+11ms
ssdp << server got Hue: M-SEARCH * HTTP/1.1
ssdp HOST: 239.255.255.250:1900
ssdp MAN: "ssdp:discover"
ssdp MX: 15
ssdp ST: urn:schemas-upnp-org:device:basic:1
ssdp
ssdp from 192.168.0.9:50000 +92ms
ssdp >> sent response ssdp discovery response HTTP/1.1 200 OK
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=100
EXT:
LOCATION: http://192.168.0.200:51826/description.xml
SERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.15.0
hue-bridgeid: CC223DFFFEE3CE31
ST: urn:schemas-upnp-org:device:basic:1
USN: uuid:2f402f80-da50-11e1-9b23-cc223de3ce31

+5ms

@etsnfrels
Copy link

Is there any particular Alexa skill I should have enabled?

@NorthernMan54
Copy link
Contributor

No 'skill' is required, Just looking at the log and Alexa Discover devices was detected by HomeBridge ;-).

Questions:

  1. From the log I see that HomeBridge was running at ip 192.168.0.200 ?

  2. What response do you get from this command while homebridge is running?

curl http://192.168.0.200:51826/description.xml

  1. The next lines of debug output after that should look like this
  EventedHTTPServer [::ffff:192.168.1.206] New connection from client +345ms
  EventedHTTPServer [::ffff:192.168.1.206] HTTP server listening on port 53212 +1ms
  EventedHTTPServer [::ffff:192.168.1.206] New connection from client +4ms
  EventedHTTPServer [::ffff:192.168.1.206] HTTP server listening on port 53213 +0ms
  EventedHTTPServer [::ffff:192.168.1.206] HTTP request: /description.xml +10ms
  HAPServer [CC:22:3D:E3:CE:30] HAP Request: GET /description.xml +0ms
  EventedHTTPServer [::ffff:192.168.1.206] HTTP Response is finished +8ms
  EventedHTTPServer [::ffff:192.168.1.206] HTTP request: /description.xml +3ms
  HAPServer [CC:22:3D:E3:CE:30] HAP Request: GET /description.xml +0ms
  EventedHTTPServer [::ffff:192.168.1.206] HTTP Response is finished +2ms
  EventedHTTPServer [::ffff:192.168.1.206] HTTP request: /api/pkBovaHrTjmiUwGqH7m6q7eecgD3VXVrR3BPE1qK/lights +237ms
  HAPServer [CC:22:3D:E3:CE:30] HAP Request: GET /api/pkBovaHrTjmiUwGqH7m6q7eecgD3VXVrR3BPE1qK/lights +0ms

@etsnfrels
Copy link

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:~ $

@etsnfrels
Copy link

EventedHTTPServer [::ffff:192.168.0.200] New connection from client +20s
EventedHTTPServer [::ffff:192.168.0.200] HTTP server listening on port 41743 +1ms
EventedHTTPServer [::ffff:192.168.0.200] HTTP request: /description.xml +3ms
HAPServer [CC:22:3D:E3:CE:31] HAP Request: GET /description.xml +1ms
EventedHTTPServer [::ffff:192.168.0.200] HTTP Response is finished +3ms
EventedHTTPServer [::ffff:192.168.0.200] Client connection closed +2ms
EventedHTTPServer [::ffff:192.168.0.200] HTTP connection was closed +2ms
EventedHTTPServer [::ffff:192.168.0.200] HTTP server was closed +0ms

@NorthernMan54
Copy link
Contributor

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
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=100
EXT:
LOCATION: http://192.168.0.200:51826/description.xml
SERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.15.0
hue-bridgeid: CC223DFFFEE3CE31
ST: urn:schemas-upnp-org:device:basic:1
USN: uuid:2f402f80-da50-11e1-9b23-cc223de3ce31

@etsnfrels
Copy link

ssdp << server got Hue: M-SEARCH * HTTP/1.1
ssdp HOST: 239.255.255.250:1900
ssdp MAN: "ssdp:discover"
ssdp MX: 15
ssdp ST: urn:schemas-upnp-org:device:basic:1
ssdp
ssdp from 192.168.0.9:50000 +4m
ssdp >> sent response ssdp discovery response HTTP/1.1 200 OK
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=100
EXT:
LOCATION: http://192.168.0.200:51826/description.xml
SERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.15.0
hue-bridgeid: CC223DFFFEE3CE31
ST: urn:schemas-upnp-org:device:basic:1
USN: uuid:2f402f80-da50-11e1-9b23-cc223de3ce31

+2ms
ssdp << server got Hue: M-SEARCH * HTTP/1.1
ssdp HOST: 239.255.255.250:1900
ssdp MAN: "ssdp:discover"
ssdp MX: 15
ssdp ST: urn:schemas-upnp-org:device:basic:1
ssdp
ssdp from 192.168.0.25:50000 +612ms
ssdp >> sent response ssdp discovery response HTTP/1.1 200 OK
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=100
EXT:
LOCATION: http://192.168.0.200:51826/description.xml
SERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.15.0
hue-bridgeid: CC223DFFFEE3CE31
ST: urn:schemas-upnp-org:device:basic:1
USN: uuid:2f402f80-da50-11e1-9b23-cc223de3ce31

+1ms

@NorthernMan54
Copy link
Contributor

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.

@etsnfrels
Copy link

Currently a Dot, But I have a FireTV and FireTV stick if you think I'd have better luck with either.

@rafiqaust
Copy link

Hi NorthernMan54 i tried ur procedure like- sudo npm install -g https://github.com/NorthernMan54/homebridge
I got error massage to my pi3

pi@raspberrypi:~ $ sudo npm install -g https://github.com/NorthernMan54/homebridge
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror 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 /root/.npm/_git-remotes/git-https-github-com-NorthernMan54-homebridge-git-a6b381b2: fatal: unable to access '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"
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

npm ERR! Please include the following file with any support request:
npm ERR! /root/.npm/_logs/2017-06-13T20_32_49_160Z-debug.log
pi@raspberrypi:~ $

@NorthernMan54
Copy link
Contributor

NorthernMan54 commented Jun 14, 2017 via email

@rafiqaust
Copy link

rafiqaust commented Jun 14, 2017 via email

@NorthernMan54
Copy link
Contributor

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.

@rafiqaust
Copy link

rafiqaust commented Jun 15, 2017 via email

@NorthernMan54
Copy link
Contributor

NorthernMan54 commented Jun 16, 2017 via email

@rafiqaust
Copy link

rafiqaust commented Jun 27, 2017 via email

@NorthernMan54
Copy link
Contributor

NorthernMan54 commented Jun 27, 2017 via email

@rafiqaust
Copy link

yes i have upgraded v4.2.0 to 5.0.3 Thanks

@rafiqaust
Copy link

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
sudo apt-get install git make

Install node.js:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

Install Avahi and other Dependencies
sudo apt-get install libavahi-compat-libdnssd-dev

sudo npm install -g --unsafe-perm homebridge
sudo npm install -g homebridge-cbus

Any suggestion Plz.

@NorthernMan54
Copy link
Contributor

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.

@rafiqaust
Copy link

rafiqaust commented Jul 9, 2017 via email

@ElphaX
Copy link

ElphaX commented Jul 9, 2017

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

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

@creedda
Copy link

creedda commented Jul 17, 2017

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.

@NorthernMan54
Copy link
Contributor

NorthernMan54 commented Jul 18, 2017 via email

@rafiqaust
Copy link

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.

@NorthernMan54
Copy link
Contributor

NorthernMan54 commented Jul 31, 2017 via email

@rafiqaust
Copy link

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.

@NorthernMan54
Copy link
Contributor

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.

@creedda
Copy link

creedda commented Sep 21, 2017

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.

@sterfrydude
Copy link

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:04:59 PM] Registering accessory 'homebridge-applescript.Applescript'
[10/3/2017, 6:04:59 PM] ---
[10/3/2017, 6:04:59 PM] Loaded plugin: homebridge-applescript-file
[10/3/2017, 6:04:59 PM] Registering accessory 'homebridge-applescript-file.ApplescriptFile'
[10/3/2017, 6:04:59 PM] ---
[10/3/2017, 6:04:59 PM] Loaded plugin: homebridge-nest
[10/3/2017, 6:04:59 PM] Registering platform 'homebridge-nest.Nest'
[10/3/2017, 6:04:59 PM] ---
[10/3/2017, 6:04:59 PM] Loaded plugin: homebridge-platform-myq
[10/3/2017, 6:04:59 PM] Registering platform 'homebridge-platform-myq.MyQ'
[10/3/2017, 6:04:59 PM] ---
[10/3/2017, 6:04:59 PM] Loaded plugin: homebridge-smartthings
[10/3/2017, 6:04:59 PM] Registering platform 'homebridge-smartthings.SmartThings'
[10/3/2017, 6:04:59 PM] ---
[10/3/2017, 6:04:59 PM] Loaded config.json with 6 accessories and 2 platforms.
[10/3/2017, 6:04:59 PM] ---
[10/3/2017, 6:04:59 PM] Loading 2 platforms...
[10/3/2017, 6:04:59 PM] [SmartThings] Initializing SmartThings platform...
[10/3/2017, 6:04:59 PM] [SmartThings] Fetching Smart Things devices.
[10/3/2017, 6:04:59 PM] [MyQ Platform] Initializing MyQ platform...
[10/3/2017, 6:04:59 PM] Loading 6 accessories...
[10/3/2017, 6:04:59 PM] [Spotify Play] Initializing ApplescriptFile accessory...
[10/3/2017, 6:04:59 PM] [Living Room Speakers] Initializing ApplescriptFile accessory...
[10/3/2017, 6:04:59 PM] [Kitchen Speaker] Initializing ApplescriptFile accessory...
[10/3/2017, 6:04:59 PM] [Bedroom TV] Initializing ApplescriptFile accessory...
[10/3/2017, 6:04:59 PM] [Computer Speaker] Initializing ApplescriptFile accessory...
[10/3/2017, 6:04:59 PM] [JBL Speaker] Initializing ApplescriptFile accessory...
[10/3/2017, 6:05:00 PM] [SmartThings] Device Added - Group locks, Name Front Door, ID b3c3f118-8623-4525-81a3-4b968acbccaa
[10/3/2017, 6:05:00 PM] [SmartThings] Device Added - Group locks, Name Side Door, ID 10479e52-640f-470e-b6da-f1b8e5d29460
[10/3/2017, 6:05:00 PM] [SmartThings] Device Added - Group sensor, Name Motion Sensor, ID f1a34fbc-2e30-4688-a712-7f727942d9cf
[10/3/2017, 6:05:00 PM] [SmartThings] Device Added - Group switch, Name Outlet, ID 3bdd3b65-9924-419e-ae37-cf4fab33340e
[10/3/2017, 6:05:00 PM] [SmartThings] Device Added - Group sensor, Name Sterling's iPhone, ID 113aa525-0619-4c3c-bd40-4a1fc0ef3ed7
[10/3/2017, 6:05:00 PM] [SmartThings] Unknown Capabilities: ["Health Check","Outlet"]
[10/3/2017, 6:05:00 PM] [SmartThings] Initializing platform accessory 'Front Door'...
[10/3/2017, 6:05:00 PM] [SmartThings] Initializing platform accessory 'Side Door'...
[10/3/2017, 6:05:00 PM] [SmartThings] Initializing platform accessory 'Motion Sensor'...
[10/3/2017, 6:05:00 PM] [SmartThings] Initializing platform accessory 'Outlet'...
[10/3/2017, 6:05:00 PM] [SmartThings] Initializing platform accessory 'Sterling's iPhone'...
[10/3/2017, 6:05:00 PM] [SmartThings] Direct Connect Is Listening On 192.168.1.29:8000
[10/3/2017, 6:05:00 PM] [MyQ Platform] found GarageDoorOpener, deviceid=57320091
[10/3/2017, 6:05:00 PM] [MyQ Platform] Initializing platform accessory 'Gate'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-983 │     
└────────────┘     

[10/3/2017, 6:05:00 PM] Homebridge is running on port 51826.
[10/3/2017, 6:05:01 PM] [SmartThings] SmartThings Hub Communication Established
^C[10/3/2017, 6:11:04 PM] Got SIGINT, shutting down Homebridge...
Shirley:~ sterfrydude$ DEBUG=* homebridge
[10/3/2017, 6:11:31 PM] Loaded plugin: homebridge-applescript
[10/3/2017, 6:11:31 PM] Registering accessory 'homebridge-applescript.Applescript'
[10/3/2017, 6:11:31 PM] ---
[10/3/2017, 6:11:31 PM] Loaded plugin: homebridge-applescript-file
[10/3/2017, 6:11:31 PM] Registering accessory 'homebridge-applescript-file.ApplescriptFile'
[10/3/2017, 6:11:31 PM] ---
[10/3/2017, 6:11:32 PM] Loaded plugin: homebridge-nest
[10/3/2017, 6:11:32 PM] Registering platform 'homebridge-nest.Nest'
[10/3/2017, 6:11:32 PM] ---
[10/3/2017, 6:11:32 PM] Loaded plugin: homebridge-platform-myq
[10/3/2017, 6:11:32 PM] Registering platform 'homebridge-platform-myq.MyQ'
[10/3/2017, 6:11:32 PM] ---
[10/3/2017, 6:11:32 PM] Loaded plugin: homebridge-smartthings
[10/3/2017, 6:11:32 PM] Registering platform 'homebridge-smartthings.SmartThings'
[10/3/2017, 6:11:32 PM] ---
[10/3/2017, 6:11:32 PM] Loaded config.json with 6 accessories and 2 platforms.
[10/3/2017, 6:11:32 PM] ---
[10/3/2017, 6:11:32 PM] Loading 2 platforms...
[10/3/2017, 6:11:32 PM] [SmartThings] Initializing SmartThings platform...
[10/3/2017, 6:11:32 PM] [SmartThings] Fetching Smart Things devices.
[10/3/2017, 6:11:32 PM] [MyQ Platform] Initializing MyQ platform...
[10/3/2017, 6:11:32 PM] Loading 6 accessories...
[10/3/2017, 6:11:32 PM] [Spotify Play] Initializing ApplescriptFile accessory...
[10/3/2017, 6:11:32 PM] [Living Room Speakers] Initializing ApplescriptFile accessory...
[10/3/2017, 6:11:32 PM] [Kitchen Speaker] Initializing ApplescriptFile accessory...
[10/3/2017, 6:11:32 PM] [Bedroom TV] Initializing ApplescriptFile accessory...
[10/3/2017, 6:11:32 PM] [Computer Speaker] Initializing ApplescriptFile accessory...
[10/3/2017, 6:11:32 PM] [JBL Speaker] Initializing ApplescriptFile accessory...
ssdp not running +0ms
ssdp binding to port 1900 for ssdp discovery +14ms
ssdp server error:
ssdp Error: bind EADDRINUSE 0.0.0.0:1900
ssdp at Object.exports._errnoException (util.js:1020:11)
ssdp at exports._exceptionWithHostPort (util.js:1043:20)
ssdp at _handle.lookup (dgram.js:219:18)
ssdp at _combinedTickCallback (internal/process/next_tick.js:83:11)
ssdp at process._tickCallback (internal/process/next_tick.js:104:9)
ssdp at Module.runMain (module.js:606:11)
ssdp at run (bootstrap_node.js:389:7)
ssdp at startup (bootstrap_node.js:149:9)
ssdp at bootstrap_node.js:502:3 +4ms
/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/ssdp.js:81
throw err;
^

Error: bind EADDRINUSE 0.0.0.0:1900
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at _handle.lookup (dgram.js:219:18)
at _combinedTickCallback (internal/process/next_tick.js:83:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:502:3`

@NorthernMan54
Copy link
Contributor

How did you check for the port conflict? I use this command

netstat -an | grep 1900

To check.

@sterfrydude
Copy link

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!

@hawkeye217
Copy link

Hey @NorthernMan54, any update on merging your changes with the official branch?

@NorthernMan54
Copy link
Contributor

Just submitted the pull request for HAP-NodeJS, once that gets merged, then the homebridge changes and its then part of main stream.

@sm17h85
Copy link

sm17h85 commented Nov 9, 2017

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.

@NorthernMan54
Copy link
Contributor

@sm17h85 Please open an issue against here

https://github.com/NorthernMan54/homebridge-alexa

@sm17h85
Copy link

sm17h85 commented Nov 10, 2017

@NorthernMan54 i just copied the message here.

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests