Skip to main content
Answered

Google Script

  • November 30, 2023
  • 1 reply
  • 140 views

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 :

  • [assistant.command.OkGoogle] is not supported by device [Bar - Foody]. The list of supported commands: [device.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

 

Best answer by Sotiris C.

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.

View original
Did you find what you were looking for?
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.

1 reply

Sotiris C.
Forum|alt.badge.img+15
  • Sonos Staff
  • 736 replies
  • Answer
  • December 4, 2023

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings