www.homeseer.com    
 

Go Back   HomeSeer Message Board > Audio / Video and Infra-red (IR) Plug-ins > Audio / Video and Infra-red (IR) Discussion > AirplaySpeak

AirplaySpeak This plug-in is a Speak Proxy which allows Homeseer to route annoucements to AirPlay capable devices such as an AirPort Express

Reply
 
Thread Tools Display Modes
  #1  
Old July 20th, 2016, 02:18 AM
chimera chimera is offline
Seer
 
Join Date: May 2016
Location: Australia
Posts: 58
Airport Express always gets wrong IP

My airport express always shows up in the logs as: 169.254.122.74:5000. It also appears in airplay.ini with this IP as well. This is not correct it has a 10.X.X.X ip address which is confirmed in the Airport utility and by pinging. When including this device as a speaker all other speakers don't function. Can you please make a suggestion as to why this may be?
Reply With Quote
  #2  
Old July 20th, 2016, 03:15 AM
chimera chimera is offline
Seer
 
Join Date: May 2016
Location: Australia
Posts: 58
Ok I did a factory reset on the device and it's now functioning correctly.
Reply With Quote
  #3  
Old August 3rd, 2016, 06:18 PM
chimera chimera is offline
Seer
 
Join Date: May 2016
Location: Australia
Posts: 58
Further to this in case anyone else has this error. If the Airport express is not connected to an ip network when booting it seems to supply a 169.254.x.x IP address to the Airplayspeak plugin even when it is connected and is using a valid IP address later. This will confound the plugin and make it unreliable.

Spud in the interests of making this plugin more solid you could detect this ip address and log an issue to make people aware of the problem.

The error is reproducible. Let me know if you require further info.
Reply With Quote
  #4  
Old August 3rd, 2016, 06:45 PM
zwolfpack zwolfpack is offline
Seer Master
 
Join Date: Sep 2015
Location: Orange County, California, USA
Posts: 948
https://who.is/whois-ip/ip-address/169.254.122.74

Quote:
Computers use addresses starting with "169.254." when they do not have a manually configured address or when they are not told which address to use by a service on the network. They are commonly called the "link local" addresses."
Reply With Quote
  #5  
Old August 7th, 2016, 04:42 AM
RandyInLA's Avatar
RandyInLA RandyInLA is offline
Seer
 
Join Date: Aug 2016
Location: Los Angeles
Posts: 44
AVAHI returning IP address for Airport Express Eth interface, not the Wifi interface

I also discovered the wrong IP address being used for AirSpeak on my Raspberry Pi 3b Homseer install. Thinking it was a DNS resolution issue, I did the following:
  • Went into my TimeCapsule (my DHCP server) and created a static IP for the Airport Express of 172.16.40.3
  • I restarted the Airport Express to verify it was being set to 172.16.40.3 (used the AirPort Utility to verify)
  • I even added an /etc/hosts entry on my homeseer computer of:
    • 172.16.40.3 workbench workbench.local
  • I can "$ ping workbench.local" from my homeseer computer and it resolves to 172.16.40.3
  • I went into /Config/AirplaySpeak.ini
    • xxxxxxxxxx98###name=Workbench
    • xxxxxxxxxx98###ipaddress=172.16.40.3
      • I manually changed it from the 169, self-assigned IP
When HomeSeer starts up, I can see AirplaySpeak still resolves Workbench to 169.254.64.171

I tried "$ grep -irn '169.254.64.171' *" from my HomeSeer root and it did not find that string in any other file.

It's at that point I noticed that the MAC address listed in AirplaySpeak.ini is NOT the wireless interface of the Airport Express, it is the Ethernet interface! Since the Airport Express is configured to use DHCP & the Ethernet interface isn't plugged into anything, the Ethernet interface never gets assigned an IP address, so it gives itself a self-assigned address of 169.254.x.x
  • Airport Express Mac addresses:
    • xx:xx:xx:xx:xx:98 Ethernet
      • 169.254.64.171 (self-assigned IP)
    • xx:xx:xx:xx:xx:99 Wireless
      • 172.16.40.3 (DHCP assigned from my TimeCapsule and the only way I connect to the Airport Express)
So I finally added "xx:xx:xx:xx:xx:98###forceip=True" to /Config/AirplaySpeak.ini and it can now send TTS to my Airport Express.

How does AirplaySpeak utilize avahi to resolve the Airport Expresses? I did a quick googling for avahi and found "avahi-browse" but my homeseer computer can't find that command (do you know where it's located so I can update my $PATH?). I did find /etc/avahi/hosts file, but there were no entries for the Airport Express. I'm hoping avahi can return the wifi interface information instead of the eth info, but I can't troubleshoot further until I find where it's installed.

Perhaps after you get the name of the Airport Express you could ping that name + ".local" to get the IP address of the wifi interface and use that instead of the address returned from avahi?

Last edited by RandyInLA; August 7th, 2016 at 09:46 AM.
Reply With Quote
  #6  
Old August 7th, 2016, 09:44 AM
RandyInLA's Avatar
RandyInLA RandyInLA is offline
Seer
 
Join Date: Aug 2016
Location: Los Angeles
Posts: 44
Correct Mac Address & Full Hostname For Airport Express From AVAHI

Turns out I didn't have avahi-browse, so I installed the avahi utils:
Code:
$ sudo apt-get install avahi-utils
After playing around with various command line options, I was able to coerce the Airport Express into revealing it's full Hostname & wireless interface Mac address:
Code:
$ avahi-browse --resolve --parsable --terminate -a | grep IPv4 | grep "Apple Base Station"
Which results in this output:
=;wlan0;IPv4;Workbench;Apple AirPort;local;Workbench.local;169.254.x.x;5009;"waMA=xx-xx-xx-xx-xx-98,raMA=xx-xx-xx-xx-xx-99,raNm=<myWiFiName>,raCh=149,raSt=1,raNA=0,syDs=Apple Base Station V7.6.7,syFl=0x8C,syAP=107,syVs=7.6.7,srcv=76700.5,bjSd=17"

  • 7th attribute is the full hostname: Workbench.local
    • Should be able to ping the full hostname to get the IP address of the Wireless interface. Though, a few times, I was still getting the IP address of the Eth interface. So I re-added an /etc/hosts entry, 172.16.40.3 workbench.local, forcing the IP I wanted. If I have to manually add the correct IP address somewhere, I'd rather do it in the hosts file so the computer knows where it is, not just AirplaySpeak. I realize you are currently storing the returned IP address from avahi in the .ini file, so the manually entered correct IP address & forceip=True still need to be inserted there. Maybe if you can sense that it's an AirPort Express, ping the full hostname & store the returned IP, then just the addition of the IP address to the /etc/hosts file would be all that is needed. If not, the user will still have to manually change the .ini file.
  • 8th attribute is the self-assigned IP address of the eth interface: 169.254.x.x
    • Incorrectly stored in AirplaySpeak.ini
  • 10th attribute is a comma-separated string of more attributes:
    • 1st attribute is the eth Mac address: waMA=xx-xx-xx-xx-xx-98
      • Incorrectly stored in AirplaySpeak.ini
    • 2nd attribute is the wlan Mac address: raMA=xx-xx-xx-xx-xx-99
      • Needs to be stored in the .ini file instead.
    • The last number in both Mac addresses are one away from each other on my Airport Express.
  • I originally had firmware version 7.6.4 in the AirPort Express, so I updated to the latest: 7.6.7. No change in response to avahi-browse command.

Hope this helps with the troubleshooting process,
-=Randy
Reply With Quote
  #7  
Old August 27th, 2016, 08:09 PM
chimera chimera is offline
Seer
 
Join Date: May 2016
Location: Australia
Posts: 58
Thanks Randy. Heaps of useful info there.
Reply With Quote
  #8  
Old August 31st, 2016, 04:06 AM
chimera chimera is offline
Seer
 
Join Date: May 2016
Location: Australia
Posts: 58
Quote:
Originally Posted by zwolfpack View Post
zwolfpack thanks for the input. This appears to be an error in the way the Airport express reports it's IP address to avahi when using Linux. Even when it is using a valid address it sometimes reports a link local address.
Reply With Quote
  #9  
Old August 31st, 2016, 04:16 AM
chimera chimera is offline
Seer
 
Join Date: May 2016
Location: Australia
Posts: 58
forceip is not working

Spud could you please advise what is going on here:
I have the following lines in my AirplaySpeak.ini

00254B098D7C###name=Bedroom Airport Express^M
00254B098D7C###ipaddress=10.7.0.28^M
00254B098D7C###port=5000^M
00254B098D7C###volume=0^M
00254B098D7C###enabled=True^M
00254B098D7C###predelay=0^M
00254B098D7C###postdelay=0^M
00254B098D7C###forceip=True^M

and yet I'm and still plagued by this problem:
Aug-31 6:28:48 PM
AirplaySpeak INFO Resolved Service: 00254B098D7C - Bedroom Airport Express - 169.254.157.220 - 5000

Edit: You need debugging on to see that AirplaySpeak is actually going to address it using the altered IP. This solution hopefully will work now.
Reply With Quote
  #10  
Old August 31st, 2016, 04:35 AM
chimera chimera is offline
Seer
 
Join Date: May 2016
Location: Australia
Posts: 58
Further to this I have a 802.11g version of the Airport Express that has been working well without any reconfiguring. It is the 802.11n Gen 1 version that has been giving me strife. Hopefully with the forceip config it will continue without issue.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AirPort Express line in and auto detect "play" markus.bergvoll PI-SonosController (3P) 5 July 16th, 2011 07:59 PM
Airport Express and Remote Speakers bearben25 Apple iTunes 2 December 23rd, 2010 11:57 AM
Setting up web access using Airport Express moose HomeSeer General Discussion Area 2 December 10th, 2008 02:31 AM
ITunes and Airport Express davidw4806 HomeSeer General Discussion Area 0 December 10th, 2004 04:48 PM
[script] Airport status cpreecs Script & Plug-In Library 0 March 22nd, 2003 04:15 PM


All times are GMT -4. The time now is 01:23 AM.


Copyright HomeSeer Technologies, LLC