Question

Control Playbar volume via OSX

  • 3 March 2014
  • 3 replies
  • 1313 views

I want to use my Playbar as the external speaker on my Mac (instead of connecting the playbar to a TV). The problem is with an optical connection is you lose the volume controls on the keyboard. So the only way to control the volume will be to reach over to the physical buttons on the Playbar. Or switch to the OSX Sonos app and adjust the volume from there, but that is not very quick and you lose the focus on the current app. Is there any way to get universal keyboard shortcuts on the Mac to control the Playbar volume. I was thinking maybe some action script or similar to pick up the volume controls from the Sonos Mac app. Any ideas?

This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

3 replies

Userlevel 4
Badge +3
Hi Vince, 

I am not aware of any script but will leave this thread open for other users who might have an idea. 

Regards, 

Daniel H. 
Badge
I have this setup and was able to set up hotkeys which trigger automator scripts which interface with the Sonos App volume controls. Although not proper system volume control it seems to work as a good hack!

* Download the Sonos OSX app.
* Create automator scripts as apps for each for the three functions mute, vol up, vol down (see snippets below)
* Open security & privacy settings pane > privacy click the + and allow each of the three scripts privacy override
* Download and install apptivate (I couldn't assign through normal keyboard shortcuts for some security reason)
* Assign the app scripts to your preffered keyboard shortcut (I used fn+0 for mute fn+-/+ for vol up/down)

There you go! Keyboard hotkey controls for your Playbar.
Below are the snippets of the automator scripts required to interface with the Sonos App this works at time of writing. I'm not going to update this though so it may go out of date when they update the Sonos App!

=====Mute=====
tell application "System Events"
tell process "Sonos"
click button 1 of window 1
end tell
end tell

=====Volume Down====
tell application "System Events"
tell process "Sonos"
set value of slider 1 of window 1 to get (value of slider 1 of window 1) - 2
end tell
end tell

===== Volume Up =====
tell application "System Events"
tell process "Sonos"
set value of slider 1 of window 1 to get (value of slider 1 of window 1) + 2
end tell
end tell
Userlevel 5
Badge +6
Sonos should have this stuff sorted out of the box. Why can't the Sonos Controller desktop app, when running, put a volume controller icon on the top bar. It's not hard!!! 😠