Chromecast on separate subnet [#15834]

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Chromecast on separate subnet [#15834]

Re: Chromecast on separate subnet [#15834]

by Linwood » Mon Aug 05, 2019 11:36 am

@Peke, sorry, I needed to wake up more before answering.

Sorry, that's what I get for typing too soon after waking up.

192.168.130.0/24 for PC's.
192.168.131.0/24 for Video (not related to this)
192.168.132.0/23 (not /22) for Chromecasts
192.168.134.0/24 for guests (not related to this).

There is a router in between these.

Re: Chromecast on separate subnet [#15834]

by Peke » Mon Aug 05, 2019 11:01 am

Hi,
As I replied in ticket you can't access other subnet if you limit current one to /24 (255.255.255.0) but you need to change it to /22 (255.255.252.0) see this list in order to see the other subnets.

Re: Chromecast on separate subnet [#15834]

by Linwood » Mon Aug 05, 2019 10:36 am

I put in a ticket so I could attach the log file, VIX-524-77199.

Re: Chromecast on separate subnet [#15834]

by Linwood » Sun Aug 04, 2019 1:16 pm

Ludek wrote: Sun Aug 04, 2019 12:50 pm So should I understand that it works when you connect your PC to the network where all the cast devices resides, but does not never work when the PC is outside of the network (subnet)? But my understanding was, that it worked, but sporadically? Which could be related to the dynamic IP address assignment?
I'll get a log.

It is not dynamic addresses -- I use reservations internally, exclusively. Also the sporadic nature was over minutes, not hours or days.

And yes, I just changed the VLAN for my PC and it worked perfectly on my automation VLAN, but not when it was on a separate VLAN I use for my computers. And again, all this is wired, not wifi, so it's not intermittent connectivity (the chromecast is Chromecast Ultra which has wired ability).

I can't do it right now, but will set it all up and get a log of the trial.

Re: Chromecast on separate subnet [#15834]

by Ludek » Sun Aug 04, 2019 12:50 pm

Hi,
hard to guess what is going on without seeing a debug log, could you generate the log (item 4b here https://www.mediamonkey.com/forum/viewt ... 30&t=86643 ) ?

As for the mDNS -- this is used just for discovery, I believe that the only and the most important is the IP address when adding the device entry manually.
Maybe your devices gets dynamic IP address from your router everytime?
So I decided to test this more methodically, and I redid some networking so I could trunk the other subnet (which had all the cast devices) into my PC, and use it directly for a bit.
So should I understand that it works when you connect your PC to the network where all the cast devices resides, but does not never work when the PC is outside of the network (subnet)? But my understanding was, that it worked, but sporadically? Which could be related to the dynamic IP address assignment?

Probably a log showing both the working and non-working state (to compare) would shed some light on this.

Re: Chromecast on separate subnet [#15834]

by Linwood » Thu Aug 01, 2019 1:16 pm

So I decided to test this more methodically, and I redid some networking so I could trunk the other subnet (which had all the cast devices) into my PC, and use it directly for a bit.

In that mode (and with me removing all setup from the persistent.json first), everything worked. I got lots of cast devices showing up (and also lots of request from TV's and such for access to MM5). When I started playing and picked a cast device it went there promptly and started after a mild delay (maybe 10 seconds) and was controllable and worked fine.

I tried switching around, stopping and starting -- everything worked.

I exited, went into persistent.json and set long term future dates in there for all the devices (which now had all the proper filled in info from the discovery). Put the PC back on the network it normally uses, and fired up MM5.

Doesn't work right. It can "see" the devices, it can start the cast process (the device comes on, takes over the HDMI connection, shows the title/artist/etc) but then won't play. I presume if I keep kicking it as last night it will eventually work.

It appears there is some aspect of being on a different subnet that does not work correctly for MM5, not sure if it's still depending on mDNS for some aspect or...? But doesn't seem to work for Chromecast.

Now that said -- I had three Google Mini's in there also. The first I tried worked immediately. The second failed several times. The third worked on the second try. I came back to the first (the one that had previously worked) and it failed.

There's just something not right in there when playing to a separate subnet. I thought it may relate to the made-up UDN I used, but I have them right now from discovery while on the right subnet.

Re: Chromecast on separate subnet [#15834]

by Linwood » Wed Jul 31, 2019 9:49 pm

I may need the proper UDN?

I tried this, and it does take over the CAST device and I see "Default media receiver" and it shows the song title and album and artist, but then just a spinning wheel and a bit later says "is turned off or inaccessible".

If I switch to internal player the cast symbol goes grey but still is functioning as the internal player won't play, and a bit later I get another popup with the same message. After that the internal player works.

If I turn off the cast (i.e. tell google to turn it off, so it's output goes off, not the device itself), the TV goes off (correct). If I select the cast device again it puts up the title again, but won't play.

Any ideas?

This one is a wired one.

Hmmm... wait... as I was typing this in, maybe a minute or so into it spinning, it suddenly started playing.

Went back to internal and tried again. About 30 seconds in I get the error -- say "ok", let it keep going. At about 60 I get another error -- said OK. Lots and lots of errors, the screen showing a different title (but changing periodically) than the player on the PC. Lots more errors.

Closed MM5, started over -- it came up connected (is that intended?) but won't play.

Lots and lots of clicking and I finally got it playing again, but I have no idea what the magic combination was, I had turned it off and on a half dozen times.

Once it is playing I can stop and start it instantly from the PC -- no delay. What I can't do is change what it is playing from the PC. If I double click on another song the name appears in the player at the bottom of the PC, but it keeps playing the song it was playing before. I can stop and start it -- it stops and starts what was playing before, not the one on the screen.

So the setup is working but not reliably.

Any ideas?

PS. This Chromcast is an Ultra, and is hardwired not wifi, so there's a good, solid connection.

Re: Chromecast on separate subnet

by Ludek » Fri Jul 19, 2019 7:51 am

Hi,
I am tracking this feature request as https://www.ventismedia.com/mantis/view.php?id=15834

Actually it is already possible by editing your persistent.json file.

1) close MM5
2) Locate the persistent.json file (resides either in the /Portable/ folder or <user>/AppData/Roaming/MediaMonkey5/ depending on install type)

Find the key "LAST_REMOTE_PLAYERS" -- or create it if not included and edit it like this:

Code: Select all

"LAST_REMOTE_PLAYERS": [
        {
            "udn": "6148f373-bfee-b1fe-2780-7ab564e338ad",
            "name": "Chromecast obývací pokoj",
            "last_seen": "2121-01-01 00:00:01",
            "ip": "http://192.168.0.14:8009/",
            "protocol": "google.cast"
        }
    ],
Just ensure that
a) last_seen is a future date -- otherwise players not seen in the last week are auto-deleted from the list.
b) udn is unique, ideally the real and valid udn of the google cast device (if you know it), but should work with any
c) ip is the valid ip of the subnet where the cast device operates

3) start MM5 and click the cast icon on the player, the manually added chromecast will be shown in the list and usable for playback.

Hope this works for you.

Chromecast on separate subnet [#15834]

by Linwood » Thu Jul 18, 2019 9:03 pm

Is it possible to specify the IP address of chromecasts so they can be found on other subnets?

With more and more home automation, some of us are segmenting our home networks. In my cast MM is running on a different subnet than Chromecast. Some tools (for example Home Assistant) lets you use an IP in the config file rather than depending on broadcast traffic to find chromecast devices.

Thanks, Linwood

Top