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

RFE - Support for Multiroom feature of Chromecast Audio #65

Closed
michaelwingender opened this issue Dec 12, 2015 · 6 comments
Closed

RFE - Support for Multiroom feature of Chromecast Audio #65

michaelwingender opened this issue Dec 12, 2015 · 6 comments

Comments

@michaelwingender
Copy link

Hi,
it would be great if you support the new Multiroom feature for Chromecast Audio. It was just released. pychromecast is already recognizing something but not yet in a usable way. If I create a group within the Chromecast App an my mobile I see another Chromecast.

pychromecast.get_chromecasts()
[Chromecast(192.168.42.36, zermeiggern, Chromecast Audio, Google Inc., api=1.0), Chromecast(192.168.42.36, zermeiggern, Chromecast Audio, Google Inc., api=1.0), Chromecast(192.168.42.37, furgstalden, Chromecast Audio, Google Inc., api=1.0)]

As you can see it is currently two times the same device. I assume this is something like a master controller for the group. As soon as I remove the group, the second one disappears.

Br
Michael

@am0s
Copy link
Contributor

am0s commented Dec 20, 2015

Hi,

I just got myself two audio devices so I will have a look and see what needs to be done to support multiroom.
As for seeing the device twice is half-way correct, the group should appear together with the individual devices, just like it does in Apps that supports them.
But there is some missing code in terms of getting the correct name and connecting to the group device.
The group device seems to use a different port than the normal ones so we need add support for that.

I think I should have something working soon.

@am0s
Copy link
Contributor

am0s commented Jan 23, 2016

Multi room support is now completed, check out release v0.7.
https://github.com/balloob/pychromecast/releases/tag/v0.7

@am0s am0s closed this as completed Jan 23, 2016
@michaelwingender
Copy link
Author

Works like a charm with python2.7. Thanks a lot!!!

There seems only to be an issue with python3. Is it related to the multiroom feature or is it another issue?

mickey@egginerjoch ~/pychromecast-master $ python3
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.

from future import print_function
import time
import sys
import logging
import pychromecast
pychromecast.get_chromecasts_as_dict().keys()
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.4/dist-packages/zeroconf.py", line 1063, in run
handler(self.zc)
File "/usr/local/lib/python3.4/dist-packages/zeroconf.py", line 1014, in
state_change=state_change,
File "/usr/local/lib/python3.4/dist-packages/zeroconf.py", line 931, in fire
h(*_kwargs)
File "/usr/local/lib/python3.4/dist-packages/zeroconf.py", line 989, in on_change
listener.add_service(_args)
File "/home/mickey/pychromecast-master/pychromecast/discovery.py", line 49, in add_service
model_name = model_name.decode('utf-8')
AttributeError: 'NoneType' object has no attribute 'decode'

dict_keys([])

@am0s
Copy link
Contributor

am0s commented Jan 23, 2016

There's a fix in the master branch, seems to be doing the trick.
Could you try it out?

If there are no more problems I'll make a 0.7.1 release.

@michaelwingender
Copy link
Author

It is working fine. Thanks again. :-)

@balloob
Copy link
Collaborator

balloob commented Jan 24, 2016

I did a quick pass through the code, it looks all good now.

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