aircast icon indicating copy to clipboard operation
aircast copied to clipboard

Multiple Chromecast support

Open lars18th opened this issue 8 years ago • 2 comments

Hi,

I have two Chromecasts: one Audio and one regular (for TV).

At time, only one of them are used... and I like to select (force) the Audio device. So, this line: http://github.com/ains/aircast/blob/master/src/cast.py#L19 needs to be improved for supporting multiple devices.

I suggest to publish all of them, or more simple, add the option for force the use of one of them. Please, can you add this support? Thank you!

lars18th avatar Dec 29 '16 11:12 lars18th

Hi,

One fork has this implemented: https://github.com/gtg922r/aircast/commit/ec69731938bb49a03c9354e7280cb5d854b77773

Please, join efforts!

lars18th avatar Dec 29 '16 12:12 lars18th

Hi,

If you like to "disable discovering" and use "direct IP connect", then here is the info:

  • Remove the call to "pychromecast.get_chromecasts_as_dict()" at http://github.com/ains/aircast/blob/master/src/cast.py#L12

  • Remove the call to "pychromecast.get_chromecast(friendly_name=)" at http://github.com/ains/aircast/blob/master/src/cast.py#L23

  • Replace it with "self.chromecast = pychromecast.Chromecast(chromecast_name)" setting in the var the IP of your device, like "chromecast_name = "192.168.1.47"

So, I hope someone implements this: if "chromecast-ip" parameter is set then overcome the discovery phase and use this IP as target.

Regards!

lars18th avatar Dec 29 '16 13:12 lars18th