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

Night_mode and dialog_mode not supported on Playbase #633

Closed
arsaboo opened this issue Sep 1, 2018 · 1 comment
Closed

Night_mode and dialog_mode not supported on Playbase #633

arsaboo opened this issue Sep 1, 2018 · 1 comment

Comments

@arsaboo
Copy link

arsaboo commented Sep 1, 2018

I just tried changing the night_mode and dialog_mode on my Playbase, but get an error for both as not supported. I can change these modes from the Sonos app, so looks like it is a SoCo limitation.

>>> my_zone
SoCo("192.168.2.253")
>>> my_zone.get_speaker_info()
{u'display_version': '9.1', u'player_icon': '/img/icon-S11.png', u'uid': 'RINCON_XYZ', u'software_version': '45.1-56150', u'mac_address': u'MA-CA-DD-RE-S-S', u'hardware_version': '1.14.1.11-1', u'model_number': 'S11', u'serial_number': 'MA-CA-DD-RE-S-S:1', u'zone_name': 'Family Room', u'model_name': 'Sonos Playbase'}
>>> my_zone.night_mode = True
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/soco/core.py", line 813, in night_mode
    raise NotSupportedException(message)
soco.exceptions.NotSupportedException: This device does not support night mode
>>> my_zone.dialog_mode = True
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/soco/core.py", line 851, in dialog_mode
    raise NotSupportedException(message)
soco.exceptions.NotSupportedException: This device does not support dialog mode

Let me know if you need any other details

@arsaboo
Copy link
Author

arsaboo commented Sep 1, 2018

Looks like these lines in the core.py are causing the issues:
if 'PLAYBAR' not in self.speaker_info['model_name']:

Firstly, Playbase or Beam are not listed in core.py. Second, the case for speaker_info has changed - instead of all caps that is currently being used, it is Playbase. I suspect the night_mode and speech_enhance are currently broken for everyone (not just Playbase users). Changing those lines to

if self.speaker_info['model_name'] not in {'Sonos Playbase', 'Sonos Playbar', 'Sonos Beam'}:

worked in my case. If this approach is acceptable, I can create a PR.

arsaboo added a commit to arsaboo/SoCo that referenced this issue Sep 9, 2018
pmac added a commit to pmac/SoCo that referenced this issue Sep 19, 2018
Fix support for Playbar, and add for Playbase and Beam.

Fix SoCo#633
pmac added a commit to pmac/SoCo that referenced this issue Sep 19, 2018
Fix support for Playbar, and add for Playbase and Beam.

Fix SoCo#633
pmac added a commit to pmac/SoCo that referenced this issue Sep 19, 2018
Fix support for Playbar, and add for Playbase and Beam.

Fix SoCo#633
pmac added a commit to pmac/SoCo that referenced this issue Sep 19, 2018
Fix support for Playbar, and add for Playbase and Beam.

Fix SoCo#633
@ghcs27 ghcs27 added the Has PR label Sep 20, 2018
@pmac pmac mentioned this issue Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants