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

Duplicate Airplay Devices (ending with _______+) #163

Closed
yonigold1 opened this issue May 3, 2019 · 25 comments
Closed

Duplicate Airplay Devices (ending with _______+) #163

yonigold1 opened this issue May 3, 2019 · 25 comments

Comments

@yonigold1
Copy link

Me again lol after forcing myself to figure out how to set up airconnect (took me a good 3 hours and I'm super proud of myself 😆) I now am able to airplay to my chromecast and Sonos but I see that in my airplay menu there are duplicates of all my speakers and i wanna know if its possible to get rid of it some how or maybe you can do something to the file and make it ignore the other devices or something idk im stupid with this stuff lol but its a lil frustrating but it is possible to live with
SS 2019-05-03 at 6 26 37 PM

@pwt
Copy link
Contributor

pwt commented May 3, 2019

That's because you probably have some Sonos speakers that have native AirPlay 2 capability (the duplicates without the '+'). You can prevent AirConnect from including these speakers with command line options '-m' and '-n': take a look at how I do this at the following link:

https://github.com/pwt/docker-airconnect-arm/blob/master/Dockerfile

See the text at the bottom of the Dockerfile.

@yonigold1
Copy link
Author

yonigold1 commented May 3, 2019

the Basement and Jacobs room speakers are not sonos though
How would i go about putting in the command with my devices?
SS 2019-05-03 at 7 30 04 PM

@pwt
Copy link
Contributor

pwt commented May 3, 2019

the Basement and Jacobs room speakers are not sonos though

It may be something similar, though. It's only the speakers with a '+' that AirConnect is adding as AirPlay targets.

I only have experience with (a wide range of) Sonos speakers, but you may be able to modify my advice for the speakers you have.

Failing that, you can generate and edit a 'config.xml' file to disable specific speakers.

@yonigold1
Copy link
Author

so I just wanna clarify the + speakers are the ones that AirConnect meaning that when AirConnect is off the list should just be:
SS 2019-05-03 at 7 35 54 PM

and if that's what u mean would u mind walking me through how to do that :) it would be a big help

@yonigold1 yonigold1 reopened this May 4, 2019
@yonigold1
Copy link
Author

oops accidentally closed the issue

@pwt
Copy link
Contributor

pwt commented May 4, 2019

Yes, the AirPlay targets with '+' appended to their names are the ones created by AirConnect. You have two options for getting AirConnect to exclude the speakers that already support AirPlay:

1) Exclude the speakers automatically by model name and/or model number.

  • For this, use the '-m' and/or '-n' command line options.
  • Model name is the modelName string in the UPnP device description for the speaker, model number is the modelNumber string. You'll have to determine these somehow, or you could try a few guesses.
  • So, if your speaker name is (e.g.) 'Play:5', you'd add -m Play:5 to the command line you use to start airupnp.

2) Exclude the speakers manually by disabling them in a configuration file.

  • First, generate a config file by starting airupnp with the -i config.xml option; you can then stop airupnp.
  • This will create a config.xml file in the current directory. If you inspect this file, you'll see some XML for each of your discovered speakers, each in a device section.
  • Edit the file: for each speaker you want to disable, set the enabled field to 0.
  • When you next start airupnpn, it will read the config.xml file and omit the disabled speakers.

@philippe44
Copy link
Owner

BTW, one thing you can do is set the enabled field to 0 in the section and just keep listed the device(s) you want and put an enabled field to 1 for that (or these) devices. With by default, any newly discovered device will be disabled

@yonigold1
Copy link
Author

im going to try both of these ideas will let u guys know if i need anymore help

@yonigold1
Copy link
Author

so i did this:
2) Exclude the speakers manually by disabling them in a configuration file.

First, generate a config file by starting airupnp with the -i config.xml option; you can then stop airupnp.
This will create a config.xml file in the current directory. If you inspect this file, you'll see some XML for each of your discovered speakers, each in a device section.
Edit the file: for each speaker you want to disable, set the enabled field to 0.
When you next start airupnpn, it will read the config.xml file and omit the disabled speakers.

but now i dont think it sees the config file so i still see the + devices

SS 2019-05-05 at 1 00 09 PM

@yonigold1
Copy link
Author

ok so i got it to work by running the command: ./airupnp-osx-multi.dms -x /Users/yonigold/AirConnect/config.xml and im currently not seeing the duplicates and im seeing eveything that i like but my only other question is now is how can i modify the original file so that when i open the airupnp-osx-multi.dms it will run the command ./airupnp-osx-multi.dms -x /Users/yonigold/AirConnect/config.xml and so it will exclude the devices
SS 2019-05-05 at 1 05 47 PM

@pwt
Copy link
Contributor

pwt commented May 6, 2019

I'm afraid I don't know what a .dms file is. Did you look at the section in the Readme entitled 'Start automatically in MacOS'? That lets you add the config file.

So, create the file /Users/yonigold/Library/LaunchAgents/com.airupnp.bridge.plist with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.airupnp.bridge</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Users/yonigold/AirConnect/airupnp-osx-multi</string>
        <string>-Z</string>
        <string>-x</string>
        <string>/Users/yonigold/AirConnect/config.xml</string>
        <string>-f</string>
        <string>/Users/yonigold/AirConnect/airupnp.log</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>LaunchOnlyOnce</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
</dict>
</plist>

Caveat: I haven't tested this at all.

@yonigold1
Copy link
Author

will try this and let u know

@yonigold1
Copy link
Author

yonigold1 commented May 6, 2019

how do i check to see if it runs when it starts up

@pwt
Copy link
Contributor

pwt commented May 7, 2019

how do i check to see if it runs when it starts up

The obvious thing to do is to check that the relevant speakers appear in your list of AirPlay targets. You can also check for the log file: /Users/yonigold/AirConnect/airupnp.log.

@yonigold1
Copy link
Author

i dont have the file airupnp.log is that bad?

@yonigold1 yonigold1 changed the title duplicate airplay devices Duplicate Airplay Devices (ending with _______+) May 7, 2019
@philippe44
Copy link
Owner

you can use the -p option. It will create a file named with contains the processus id. If the file is empty, then it is not running. But why are you worried about that at the first place?

@yonigold1
Copy link
Author

you can use the -p option. It will create a file named with contains the processus id. If the file is empty, then it is not running. But why are you worried about that at the first place?

so i want the file to see if air connect launches when i log into my mac

@yonigold1
Copy link
Author

yonigold1 commented May 8, 2019

how do i check to see if it runs when it starts up

The obvious thing to do is to check that the relevant speakers appear in your list of AirPlay targets. You can also check for the log file: /Users/yonigold/AirConnect/airupnp.log.

so when i log into my mac in the log file the last time i see the last boot is April 20 (which is false cause ive been lauching it multiple times in the past week)
SS 2019-05-08 at 12 18 04 PM

@philippe44
Copy link
Owner

It's the date of the build

@yonigold1
Copy link
Author

yonigold1 commented May 9, 2019

It's the date of the build

ah ok i have another issue believe it or not i have the config.xml setup with all the devices i want disabled and one of my devices is still duplicated with a + at the end how can i fix this?

@philippe44
Copy link
Owner

Use the advice I gave you there #163 (comment)

@yonigold1
Copy link
Author

thats what i did but it still doesnt seem to work

@pwt
Copy link
Contributor

pwt commented May 9, 2019

Could you post the contents of your config.xml file, and confirm what the name of the duplicate device is? I'll take a look.

@yonigold1
Copy link
Author

Could you post the contents of your config.xml file, and confirm what the name of the duplicate device is? I'll take a look.

will do as soon as i get home

@yonigold1
Copy link
Author

so im still trying to play around with it. All good so far. ill report back at the end of the week

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

No branches or pull requests

3 participants