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

Devices found, but not being added #160

Closed
1activegeek opened this issue Apr 20, 2019 · 10 comments
Closed

Devices found, but not being added #160

1activegeek opened this issue Apr 20, 2019 · 10 comments

Comments

@1activegeek
Copy link

First off I want to say thank you for a great app! It does work if I run it on the same subnet as the Google Chromecasts that I have. Unfortunately though, if I'm not on the same subnet, it seems to be having an issue. It may also be relative to VLAN as well. Point being, they're separated but I'm not sure why it's not adding them when it can see them. I stripped out the unique identifiers on the devices as I wasn't sure if those are identifying or not.

I know much of issues around this are going to be related to mcast/bcast traffic. I can confirm on my setup (Unify UAP/USG) - I have no block on LAN/WLAN traffic, I have IGMP snoop options on, IGMP enhancements on, and mDNS reflector service working. As a side note, I have Apple Airplay devices working fine across networks.

I'm hoping you can help highlight or outline what step seems to be failing so I can target what in the communication may not be working properly. Obviously it is finding the mcast device info it would seem, but something is just not clicking properly.

Output on LAN network trying to communicate with Chromecasts on IoT Wifi & VLAN

[14:49:07.438890] main:902 Starting aircast version: v0.2.8.0 (Mar 17 2019 @ 17:47:53)
[14:49:07.439817] main:910 no config file, using defaults
[14:49:07.440183] Start:677 Binding to 10.0.10.144
[14:49:11.197525] mDNSsearchCallback:379 ----------------- round ------------------
[14:49:11.197546] mDNSsearchCallback:383 [ACTIVE] host 10.0.10.1, srv 10.0.14.66, name Google-Home-Mini._googlecast._tcp.local 
[14:49:12.427135] mDNSsearchCallback:379 ----------------- round ------------------
[14:49:12.427154] mDNSsearchCallback:383 [ACTIVE] host 10.0.10.1, srv 10.0.14.67, name Google-Home-Mini._googlecast._tcp.local 
[14:49:12.630991] mDNSsearchCallback:379 ----------------- round ------------------
[14:49:12.631011] mDNSsearchCallback:383 [ACTIVE] host 10.0.10.1, srv 10.0.14.57, name Google-Home-Mini._googlecast._tcp.local 
[14:49:12.837541] mDNSsearchCallback:379 ----------------- round ------------------
[14:49:12.837560] mDNSsearchCallback:383 [ACTIVE] host 10.0.10.1, srv 10.0.14.57, name Google-Cast-Group._googlecast._tcp.local 
[14:49:12.938370] mDNSsearchCallback:379 ----------------- round ------------------
[14:49:12.938501] mDNSsearchCallback:383 [ACTIVE] host 10.0.10.1, srv 10.0.14.67, name Google-Cast-Group._googlecast._tcp.local 
[14:49:22.154558] mDNSsearchCallback:379 ----------------- round ------------------
[14:49:22.154588] mDNSsearchCallback:383 [ACTIVE] host 10.0.10.1, srv 10.0.14.55, name Google-Home-Mini._googlecast._tcp.local 
[14:49:22.461831] mDNSsearchCallback:379 ----------------- round ------------------
[14:49:22.461864] mDNSsearchCallback:383 [ACTIVE] host 10.0.10.1, srv 10.0.14.56, name Chromecast._googlecast._tcp.local 
[14:49:28.605953] mDNSsearchCallback:379 ----------------- round ------------------
[14:49:28.605981] mDNSsearchCallback:383 [ACTIVE] host 10.0.10.1, srv 10.0.14.55, name Google-Cast-Group._googlecast._tcp.local 
[14:49:28.913920] mDNSsearchCallback:379 ----------------- round ------------------
[14:49:28.913950] mDNSsearchCallback:383 [ACTIVE] host 10.0.10.1, srv 10.0.14.58, name Google-Home-Mini._googlecast._tcp.local 
[14:49:35.471128] Stop:713 terminate search thread ...

Output when running on the IoT Wifi/VLAN

[19:34:52.734237] main:902 Starting aircast version: v0.2.8.0 (Mar 17 2019 @ 17:47:53)
[19:34:52.735698] main:910 no config file, using defaults
[19:34:52.735869] Start:677 Binding to 10.0.14.71
[19:34:53.290933] mDNSsearchCallback:379 ----------------- round ------------------
[19:34:53.290961] mDNSsearchCallback:383 [ACTIVE] host 10.0.14.58, srv 10.0.14.58, name Google-Home-Mini._googlecast._tcp.local 
[19:34:53.291012] AddCastDevice:614 [0x10741b240]: adding renderer (Office Speaker)
[19:34:53.291078] AddCastDevice:620 [0x10741b240]: creating MAC 741b24a
[19:34:53.291671] mDNSsearchCallback:379 ----------------- round ------------------
[19:34:53.291698] mDNSsearchCallback:383 [ACTIVE] host 10.0.14.57, srv 10.0.14.57, name Google-Home-Mini._googlecast._tcp.local 
[19:34:53.291714] AddCastDevice:614 [0x10741bae0]: adding renderer (Master Bedroom Speaker)
[19:34:53.291773] AddCastDevice:620 [0x10741bae0]: creating MAC 741baea
[19:34:53.293208] mDNSsearchCallback:379 ----------------- round ------------------
[19:34:53.293222] mDNSsearchCallback:383 [ACTIVE] host 10.0.14.57, srv 10.0.14.57, name Google-Cast-Group._googlecast._tcp.local 
[19:34:53.293232] AddCastDevice:614 [0x10741c380]: adding renderer (Upstairs)
[19:34:53.293237] AddCastDevice:620 [0x10741c380]: creating MAC 741c38a
[19:35:08.402865] Stop:713 terminate search thread ...
@philippe44
Copy link
Owner

I'm not sure I'm following - It cannot see them when you are on a different subnet (according to log), why do you think it sees them?

@1activegeek
Copy link
Author

So the first block of log, is from the local subnet. When I start it this way, the AirPlay entities don't show up on the local iOS devices. But it does seem from the logs that your app is able to SEE the devices. What is missing though, is the second piece as shown in the second log where it Adds the CastDevice. So it would seem to me it's finding the device via mDNSsearch, but maybe not getting something it needs back?

I'm trying to isolate and understand why it seems to discover the mDNS entries (at least I assume that's what the line is), but it's not adding the device. This way I can hopefully isolate what may be breaking the connection.

@philippe44
Copy link
Owner

oh, I see the misunderstanding. No they are not seen. What you have in the first block is a set of mDNS queries which do not return anything. I had discussions in the past with somebody else using a mDNS repeater and it worked. I had to do a change in the mDNS search to allow "on behalf of" mDNS announces, but that was a while ago

@philippe44
Copy link
Owner

actually I shall stand corrected. I did that modification in a similar application (Chromecast for LogitechMediaServer) but not on AirCast. I've backported that in 0.2.9.0, let me know if it works

@1activegeek
Copy link
Author

Preliminary test looks good! Using my laptop since I can swap between WiFi networks easily. Now I just need to test running it on my server. May have to custom build a docker container as I think the ones out there all use static versions. The main one is on 0.2.2.2 currently.

I think we can close for now, as its working locally on at least one system. Thanks for the help. Wish I'd posted the issue earlier, rather than racking my brain trying to adjust my network! 😛

@1activegeek
Copy link
Author

Thanks so much for the update! Its working great now in a new container I created to run it on my server. In case you'd like to check it out or anyone else looking for an always updating container to your latest builds: https://github.com/1activegeek/docker-airconnect

@philippe44
Copy link
Owner

Thanks! I've updated my README to point to your repo

@kavehv
Copy link

kavehv commented Aug 25, 2019

@1activegeek I'm doing the same thing (with the same Unifi gear) but I cannot get audio to work when attempting to airplay to my Chromecast devices. I'm using your docker image running on a computer on the main network with access to the IoT network. All devices show up and I even hear the startup tone through the chromecast device (roughly half the time), but I cannot get any audio. Did you run into this?

EDIT: I can get it to work if I open up ports 32768-61000 for TCP across the vLANs to the computer hosting AirConnect, but is there a way to use a more tailored firewall rule to allow the Chromecasts to pull from AirConnect as they need to?

@1activegeek
Copy link
Author

@kavehv I believe the main point was to enable the mDNS reflector on the Unifi side. If this isn't running, then the broadcasts aren't working properly across the VLANs. I also found I had something else causing some funk in my config in that I left the default LAN domain as "local". I believe this was further complicating things. Since shifting away from that, I've had an easier time with many things beyond just this working across VLANs.

@kavehv
Copy link

kavehv commented Aug 27, 2019

@1activegeek I already have the mDNS repeater service running on my gateway, but given that this docker container is running on my NAS, which is on the private network and not the IoT network, I had to open up that range of ports from the IoT network to the NAS’ IP. I have a firewall rule that prevents new connections from the IoT vLAN to the private vLAN. I was just wondering if you had any luck doing it a different way.

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