philippe44 / AirConnect

Use AirPlay to stream to UPnP/Sonos & Chromecast devices
Other
3.46k stars 217 forks source link

Duplicate Airplay Devices (ending with _______+) #163

Closed yonigold1 closed 5 years ago

yonigold1 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

oops accidentally closed the issue

pwt commented 5 years ago

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.

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

philippe44 commented 5 years ago

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 commented 5 years ago

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

yonigold1 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

will try this and let u know

yonigold1 commented 5 years ago

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

pwt commented 5 years ago

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 commented 5 years ago

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

philippe44 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

It's the date of the build

yonigold1 commented 5 years ago

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 commented 5 years ago

Use the advice I gave you there https://github.com/philippe44/AirConnect/issues/163#issuecomment-489346776

yonigold1 commented 5 years ago

thats what i did but it still doesnt seem to work

pwt commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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