Alexa-Hue Bridge Plugin (old locked topic)

Posted on
Fri Aug 05, 2016 1:11 pm
verhelle offline
Posts: 2
Joined: Dec 09, 2011

Re: Alexa-Hue Bridge Plugin

Jay,

Thank you for your assistance. We have no ability to cause Alexa to find our device.

YES, Jay, when we disable and re-enable the Alexa bridge, we are getting this error (below):

Alexa-Hue Bridge Error Computer has no host name specified. Check the Sharing system preference and restart the plugin once the name is resolved.
Alexa-Hue Bridge 1 devices published
Started plugin "Alexa-Hue Bridge 1.0.3"
Alexa-Hue Bridge Starting hue bridge web server and discovery threads

We have only one NW interface connected (Ethernet, fixed IP).
Computer name: 16WHSVR (16wh.local)
Use Dynamic Global Host Name is NOT selected. See: https://www.dropbox.com/s/n3c63pmkww1goga/Screenshot%202016-08-05%2015.05.10.png?dl=0

Computer Name Screen shot reflecting computer name:
See: https://www.dropbox.com/s/xire68pirbkwpx1/Screenshot%202016-08-05%2014.52.22.png?dl=0

When we paste this (python -c "import socket; print socket.gethostname()") into a terminal window, the following is returned:
Last login: Fri Aug 5 14:31:58 on console
16wh:~ williamverhelle$ python -c "import socket; print socket.gethostname()"
16wh.server.private
16wh:~ williamverhelle$

When we paste this (python -c "import socket; print socket.gethostbyname(socket.gethostname())") into a Terminal window, the following is returned:
16wh:~ williamverhelle$ python -c "import socket; print socket.gethostbyname(socket.gethostname())"
Traceback (most recent call last):
File "<string>", line 1, in <module>
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
16wh:~ williamverhelle$

Thank you again for your help Jay. :D

Best,

- Bill Verhelle
bill@verhelle.com

-----

JAY WROTE: Are you getting any errors when the plugin starts (you can reload it to see)?

Regards,
Jay
Attachments
Screenshot 2016-08-05 15.05.10.png
Screen shot of dynamic global host name is NOT selected.
Screenshot 2016-08-05 15.05.10.png (58.87 KiB) Viewed 5188 times
Screenshot 2016-08-05 14.52.22.png
Screen shot of computer name.
Screenshot 2016-08-05 14.52.22.png (63.49 KiB) Viewed 5188 times

Thank you.

- Bill
__________
bill@verhelle.com

Posted on
Fri Aug 05, 2016 2:17 pm
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Alexa-Hue Bridge Plugin

Hi Bill, I believe your problem is related to the ".private" that's appended to your host name in the first python test. Notice that there are 3 different host names in different places: in the Sharing dialog, it shows 16WHSVR as the computer name. Then, below that, it shows 16wh.local. Then, when you did the first python test, it shows 16wh.server.private. Each of those hostnames should be exactly the same under normal circumstances.

Do you have Mac OS X server installed? I can only assume that that may have something to do with it but I don't know - server versions aren't an officially supported configuration (though recent versions seem to mostly work). It's possible that there's just one service that's causing the issue (perhaps VPN?) but I wouldn't know where to start.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Aug 07, 2016 5:00 pm
exos offline
Posts: 57
Joined: Feb 02, 2016

Re: Alexa-Hue Bridge Plugin

I am having this same issue. Just Went through all the steps as above and can't find my published devices.

import socket; print socket.gethostname() returns "RGS-imac"


import socket; print socket.gethostbyname(socket.gethostname())" returns 192.168.1.22



Fixed: So... I went out for dinner and when I returned the issue had mysteriously cleared up on its own....

Posted on
Mon Aug 08, 2016 11:16 am
CarlSchulz offline
Posts: 6
Joined: Aug 29, 2014

Re: Alexa-Hue Bridge Plugin

jay (support) wrote:
Hi Bill, I believe your problem is related to the ".private" that's appended to your host name in the first python test. Notice that there are 3 different host names in different places: in the Sharing dialog, it shows 16WHSVR as the computer name. Then, below that, it shows 16wh.local. Then, when you did the first python test, it shows 16wh.server.private. Each of those hostnames should be exactly the same under normal circumstances.

Do you have Mac OS X server installed? I can only assume that that may have something to do with it but I don't know - server versions aren't an officially supported configuration (though recent versions seem to mostly work). It's possible that there's just one service that's causing the issue (perhaps VPN?) but I wouldn't know where to start.

I get the same error when entering python -c "import socket; print socket.gethostbyname(socket.gethostname())" at the terminal prompt. I note your question about Mac OS X server - I do not have it installed but had it installed in the past.

Posted on
Mon Aug 08, 2016 11:34 am
verhelle offline
Posts: 2
Joined: Dec 09, 2011

Re: Alexa-Hue Bridge Plugin

... me too. Had OSX server in the past.

Thank you.

- Bill
__________
bill@verhelle.com

Posted on
Mon Aug 08, 2016 12:26 pm
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Alexa-Hue Bridge Plugin

So, something from your Server install apparently was left over and it's somehow mucked with the hostname. The only way Python can get the IP (which is required for the plugin to work) is to use the method shown above. So, unfortunately, you're going to have to figure out what the server install did to your Mac and undo it.

Here's one thought: do either of you have any extra network interfaces defined in the Network System Preference? Other than the typical WiFi and Ethernet? If not, I'm afraid I'm out of my depth. Something odd is going on with your network setup but I don't know where to start looking to fix it.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Aug 09, 2016 9:21 am
billyv offline
Posts: 2
Joined: Jun 09, 2016

Re: Alexa-Hue Bridge Plugin

I have several extra network interfaces. See screen shot: https://www.dropbox.com/s/cz5taisdx9mjx ... 4.png?dl=0

Suggestions?

- Bill
Attachments
Screenshot 2016-08-09 11.19.34.png
Screen shot showing several extra interfaces installed on Mac Mini (formerly server)
Screenshot 2016-08-09 11.19.34.png (198.58 KiB) Viewed 4909 times

Thx.

Bill Verhelle
____________________________________

Bill Verhelle
Cell Ph.: 239 227 4662
E-mail: bill@verhelle.com

Posted on
Tue Aug 09, 2016 10:07 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Alexa-Hue Bridge Plugin

So, something from your Server install apparently was left over and it's somehow mucked with the hostname. The only way Python can get the IP (which is required for the plugin to work) is to use the method shown above. So, unfortunately, you're going to have to figure out what the server install did to your Mac and undo it.

When I first setup the plugin I had this issue as well, but it was fairly easy to resolve... On the first Server app screen (IIRC) the computer name was set to a hostname that was accessible from the outside using a dynamic DNS service. The same command you have posted previously showed it binding to this host name which, of course, resolved to the outside IP address. Thus, any search on the internal network via Alexa was not working.

In my case, I ended up setting a DNS entry on the server that resolved it locally to my local IP address. I did this using the OS X Server's DNS service tab, but I assume it could be done via HOSTS file as well.
Last edited by RogueProeliator on Tue Aug 09, 2016 12:06 pm, edited 1 time in total.

Posted on
Tue Aug 09, 2016 10:38 am
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Alexa-Hue Bridge Plugin

billyv wrote:
I have several extra network interfaces. See screen shot: https://www.dropbox.com/s/cz5taisdx9mjx ... 4.png?dl=0

Suggestions?


I'm all out of ideas.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Aug 13, 2016 7:08 pm
michaelu offline
Posts: 25
Joined: Feb 01, 2010

Re: Alexa-Hue Bridge Plugin

jay (support) wrote:
michaelu wrote:
it always finds the 11 Phlips devices on my network, even if i unplug the Hue bridge (v1)


So, if you use the Alexa app to forget all devices, unplug the Hue bridge, then discover, it still finds the 11 hue devices?


Thats the odd part, but needs to be said that reading the forums, the Indigo machine is also running (and has been running) MacOS Server app.

But yes, i unplugged my Hue bridge (v1) and told my Alexa app to forget all devices, waited a few min and reloaded the Alexa-Hue bridge PlugIn, started it's discovery with 3min, told Alexa to discover new devices and it still found 11 devices (my total Hue count)

I am really hoping to get this plug in working as it was the reason i wanted to play with Alexa in the first place so i very much welcome some advise. reading the rest of these posts I'm wondering if the fact that my Indigo sever is also running other Sever.app services but again no other services are using the ports specified by the plug in

Posted on
Sat Aug 13, 2016 8:07 pm
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Alexa-Hue Bridge Plugin

michaelu wrote:
But yes, i unplugged my Hue bridge (v1) and told my Alexa app to forget all devices, waited a few min and reloaded the Alexa-Hue bridge PlugIn, started it's discovery with 3min, told Alexa to discover new devices and it still found 11 devices (my total Hue count)


Well, something VERY ODD is going on with your network then. If the Hue bridge is unplugged, discovery shouldn't find anything unless what it's finding are the plugin's devices. Disable the plugin and the hue bridge, forget devices, then rediscover. I'd expect it to find nothing. If it still finds devices, the something else is out there acting like a hue bridge and is likely the source of the problem.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Aug 13, 2016 8:08 pm
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Alexa-Hue Bridge Plugin

And, btw, the Mac OS X server is likely the problem. Are you sure you don't see the error mentioned above about the hostname being incorrect when the plugin first starts up?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Aug 16, 2016 1:32 pm
CarlSchulz offline
Posts: 6
Joined: Aug 29, 2014

Re: Alexa-Hue Bridge Plugin

CarlSchulz wrote:
jay (support) wrote:
CarlSchulz wrote:
I just installed the Alexa Plugin. However, I am getting an error:
Alexa-Hue Bridge Error Computer has no host name specified. Check the Sharing system preference and restart the plugin once the name is resolved.


Open the Sharing System Preference and click the Edit... button under the Computer Name field. If you have Use dynamic global hostname checked, uncheck it. Otherwise make sure there's a simple host name there. If there already is, let us know what it is.


Ok I confirmed my machine name in sharing system prefs: CAS3MacMini1

I also confirmed in Terminal:


WORK AROUND:

Not sure why i wasn't getting the hostname ... possibly due to incomplete removal of LION Server ... until I rebuild from scratch updating my HOSTS file seems to have worked:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

192.168.0.180 CAS3MacMini1
192.168.0.180 CAS3MacMini1.local

Posted on
Sun Aug 28, 2016 5:03 pm
jfeger offline
Posts: 84
Joined: Jan 02, 2013

Re: Alexa-Hue Bridge Plugin

Glad you found it. I actually stated I had this issue until a reboot, but it returned. I literally just made the /etc/hosts edit and it worked like a charm. This is also an issue for the Sonos plugin, which uses the same method to get the hostname. By the way, the call is actually returning an IP, not a hostname, so I am not sure whats up with that. Either way, the edit does work, and I was coming to share that with everything.

Posted on
Thu Sep 08, 2016 5:54 pm
dz1rfj offline
Posts: 135
Joined: Mar 13, 2016

Re: Alexa-Hue Bridge Plugin

Hi,

Wondering...Is it possible to use more natural language with Alexa / Indigo, and if so, does anyone have any examples?

I currently have an Alexa device named Pool DOWN. This action group lowers the pool speakers 30% at a time.

It would be great to say, Alexa, lower the pool speakers 30 percent.

Or

I have a Kids action group that flashes the lights near the kids nonsense (PC, Xbox, whatever) and tells them their parents require their assistance, please find your parents (avoids the whole screaming throughout the house for the kids)

Instead of saying Alexa, turn on kids(triggers that action group) , say Alexa, locate kids.

Thanks

Thanks
-Brian

Who is online

Users browsing this forum: No registered users and 16 guests