Skip to main content

In Google Home I currently play different music each day via amp as part of my morning Google home routine.  Daily routines have a custom command "play chillout music on bar", which plays on Monday for exanple   It works but messy to maintain multiple routines. 

I'm currently attmpting to shift my music routines to Google script.  

I can play music to a nest speaker via script but when attempting to play on amp there are limited functions available, stop/start etc.  There doesn't appear to be away to tell sonos which music to play like you can with a nest speaker. 

Has anyone successful been able to tell sonos which music to play via script? 

 

Current Script:

metadata:

name: Play music on bar

description: Play music on bar

automations:

- starters:

- type: assistant.event.OkGoogle

eventData: query

is: Play Christmas music on the bar

actions:

- type: assistant.command.OkGoogle

devices:

#sonos amp name. Works with nest speaker, but okGoogle actuon not supported with amp

- Bar - Foody

okGoogle: Play music on the bar

Error :

  • lassistant.command.OkGoogle] is not supported by device bBar - Foody]. The list of supported commands: cdevice.command.MediaStop, device.command.MediaNext, device.command.MediaPrevious, device.command.MediaPause, device.command.MediaResume, device.command.MediaShuffle, device.command.SetVolume, device.command.Mute, device.command.SetInput, device.command.NextInput, device.command.PreviousInput].

 

Appreciate any help.  Cheers yd

 

Hello @ListeningOnAStorm, welcome back.

This is something that Sonos can’t really help you with. On a first glance, it appears that this feature is not supported for Google Assistant on Sonos.

I can see you’ve posted something similar to the Google Community, I hope you can get some answers there.

Please feel free to reply here with any updates in regards to this for anyone else who would want to use Google Scripts in the same way.