Question

Google home integration with Sonos through Harmony


Hello! I like to be waiting for the integration of google home and sonos, however was thinking if there is an integration with harmony I can use in the short term?
Thanks!

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.

23 replies

Userlevel 2
Got sent this yesterday from Sonos.


Search support
Search
Google Home and Sonos

While Google Home Smart Assistant doesn’t work with your Sonos system natively, it can be connected with an audio cable allowing you to play music on Sonos by asking your Google Assistant.

How can I use Google Home with Sonos?
Certain Sonos products have a Line-In port which allows you to connect an external audio source such as a phone, computer, or Chromecast Audio to your Sonos system.

What you need to get started:

Google Home
Google Chromecast Audio (more than one if you wish to have individual speaker control)
A Sonos product with line-in: PLAY:5 (gen1 and gen2), CONNECT or CONNECT:AMP
Line-In cable. Either:
an ⅛ inch (3.5mm) audio cable for PLAY:5 (gen1 and gen2)
an ⅛ inch (3.5mm) to RCA Y-audio cable for CONNECT and CONNECT:AMP
Userlevel 7
Badge +22
Pretty stock reply.

Yes you can setup activities on the harmony that can stop start Sonos and play playlists. Then those activities you should be able to trigger from google home.
Userlevel 3
Badge +7
Got sent this yesterday from Sonos.


Search support
Search
Google Home and Sonos

While Google Home Smart Assistant doesn’t work with your Sonos system natively, it can be connected with an audio cable allowing you to play music on Sonos by asking your Google Assistant.

How can I use Google Home with Sonos?
Certain Sonos products have a Line-In port which allows you to connect an external audio source such as a phone, computer, or Chromecast Audio to your Sonos system.

What you need to get started:

Google Home
Google Chromecast Audio (more than one if you wish to have individual speaker control)
A Sonos product with line-in: PLAY:5 (gen1 and gen2), CONNECT or CONNECT:AMP
Line-In cable. Either:
an ⅛ inch (3.5mm) audio cable for PLAY:5 (gen1 and gen2)
an ⅛ inch (3.5mm) to RCA Y-audio cable for CONNECT and CONNECT:AMP


So much for those of us withOUT play 5 or connect.
Why? Amazon integration is coming this year, we're told. It's hard to imagine that they wouldn't want to do Google Home soon thereafter, assuming that Google has the resources to dedicate to the issue at the same time.
Userlevel 7
Badge +22
Google has to have the API infrastructure to support it. Just because Sonos has there part done doesn't mean Google would have their part available.
Chris what infrastructure are you referring to that is the missing piece. Didn't Google aquire api.com. I'm surprised Sonos did not get in there beta like Netflix did. But it seems their conversational actions are open now.

https://api.ai/google-assistant/
I use a work around currently with Google Home and Sonos until there is an official release. I use IFTTT and jishi/node-sonos-http-api. I setup a node.js server and use the Google Assistant and Maker services from IFTTT. It takes a bit of practice to land the commands the way you want but I can use voice commands to play, pause, stop, mute, next, previous, join speakers, unjoin, ask to play playlist that are saved in sonos. There is much more you can do but you have to build out the applets. Its very responsive from what I have seen so far.
Badge +3
Why? Amazon integration is coming this year, we're told. It's hard to imagine that they wouldn't want to do Google Home soon thereafter, assuming that Google has the resources to dedicate to the issue at the same time.

haha soon? alexa integration has been "coming soon" for almost a year now. By the time google home integration comes out we'll be on google home 5.... not sure why sonos isn't keeping up with their competition
So Bose, LG, Denon, Samsung, Bluesound, etc. have released voice control and Sonos hasn't kept up?

Could have fooled me. So far, only Denon has announced voice control as an "us too" announcement after Sonos. Said it would be ready 1st Q 2017. Then again, they said they'd release Google Cast and a Windows mobile app a couple years ago. Still waiting.
I use a work around currently with Google Home and Sonos until there is an official release. I use IFTTT and jishi/node-sonos-http-api. I setup a node.js server and use the Google Assistant and Maker services from IFTTT. It takes a bit of practice to land the commands the way you want but I can use voice commands to play, pause, stop, mute, next, previous, join speakers, unjoin, ask to play playlist that are saved in sonos. There is much more you can do but you have to build out the applets. Its very responsive from what I have seen so far.

could you give a bit more detail about that? Ive some experience with IFTTT, but not with "jishi/node-sonos-http-api" what is that? Any tips would be great. Just got Google Home and its driving me crazy that it's not part of the Sonos network...
I use a work around currently with Google Home and Sonos until there is an official release. I use IFTTT and jishi/node-sonos-http-api. I setup a node.js server and use the Google Assistant and Maker services from IFTTT. It takes a bit of practice to land the commands the way you want but I can use voice commands to play, pause, stop, mute, next, previous, join speakers, unjoin, ask to play playlist that are saved in sonos. There is much more you can do but you have to build out the applets. Its very responsive from what I have seen so far.

Have you thought of sticking your code up on github? (Can be hacked together to work for just you but would be fun to fork and have a play around with 😃 )
Badge +1
Here's an excellent article that makes use of a rather hidden Sonos feature called "Line-In | Autoplay Room" to make controlling Sonos using the Google Home a practical reality! http://www.sam-mallery.com/2017/01/how-to-use-google-home-with-sonos/
Having got Google Play working on Sonos yesterday, obviously native app casting isn't enough now:-).
I have a CC Audio I can lay my hands on, and line in jacks on two Connect Amp that are easily accessed. But as I see it, voice control for Sonos via the CCA will be limited to what commands the CCA can deliver via line outs to Sonos which will be limited to playing around with that the CCA device can do. I can't see it allow the selection of tracks/playlists in a NAS that is part of the Sonos music library. So this ought to just mean selection/stop/start of music streamed to CCA and volume level changes.
The Alexa integration ought to do a lot more, even in its first release. One hopes. Including playing Apple Music, Google Play etc, if these are in the Sonos source list to start with.
For those who own a sonos device that do not have an audio jack to connect ChromeCast Audio:

I've connected my playbase to my TV via the optical input. Additionally, I am using the Google ChromeCast Video device on my TV. If you have installed your Spotify (or other music streaming service) in the Googe Home App you may use Chromecast as a medium to voice control your Sonos System:

Since I've installed my Sonos PlayBase to be the standard audio output of my TV, the chromecast video can steer the music.
Hence, you need to give your chromecast video device a reasonable name, such as "TV" (Also in the Google Home App).

If you now give the voice command: "Play my music on the TV", the TV will turn on and start Spotify via the chromecast device.

Issues here may be that you may need a smart TV, that both TV and Playbase need to be switched on all the time, and that you can barely control the volume via voice control.

Nevertheless, I was happy when I found out as I am still desperately waiting for the Sonos Update to be more compatible.
Home Server Setup or if you do not have a home server you can use Glitch.com host and import the code from github.
jishi/node-sonos-http-api

IFTTT setup:
I use the google assistant applet "Say a phrase with a text ingredient"

Example google command "tell kitchen sonos to $"

Then I use the Webhooks applet.

url example without a log in: http://your ip address:your port/your sonos speaker name/{{TextField}}

url example with a log in: (only use this one if you setup jishi to use a password: warning this method is not secure because the password is being sent in clear text. Anyone sniffing your traffic will be able to see it.)
http://username:password@your ip address:your port/your sonos speaker name/{{TextField}}

Method is: GET

Content Type: application/json

This example will allow you to play, stop, pause, mute, next, previous on one sonos speaker. So far I have commands to join another speaker, increase and decrease volume.

Other examples
Ok Google, tell Master bedroom sonos to join in.
Join Speaker - http://your ip address:your port/"sonos speaker name you want to join in"/join/"other sonos speaker name"
Ok Google, tell kitchen sonos to increase volume by 3.
Volume increase - http://your ip address:your port/{{TextField}}/volume/+{{NumberField}}
Volume decrease - http://your ip address:your port/{{TextField}}/volume/-{{NumberField}}

I use harmony hub to kick of my saved playlist or favorites but you can write url commands to control playlist and favorites if you do not have a harmony hub.

I take no credit. This is all possible through jishi's sonos code and the use of IFTTT's Google Assistant applet and the Webhooks applets. I just put two and two together. LOL.
Home Server Setup or if you do not have a home server you can use Glitch.com host and import the code from github.
jishi/node-sonos-http-api

IFTTT setup:
I use the google assistant applet "Say a phrase with a text ingredient"

Example google command "tell kitchen sonos to $"

Then I use the Webhooks applet.

url example without a log in: http://your ip address:your port/your sonos speaker name/{{TextField}}

url example with a log in: (only use this one if you setup jishi to use a password: warning this method is not secure because the password is being sent in clear text. Anyone sniffing your traffic will be able to see it.)
http://username:password@your ip address:your port/your sonos speaker name/{{TextField}}

Method is: GET

Content Type: application/json

This example will allow you to play, stop, pause, mute, next, previous on one sonos speaker. So far I have commands to join another speaker, increase and decrease volume.

Other examples
Ok Google, tell Master bedroom sonos to join in.
Join Speaker - http://your ip address:your port/"sonos speaker name you want to join in"/join/"other sonos speaker name"
Ok Google, tell kitchen sonos to increase volume by 3.
Volume increase - http://your ip address:your port/{{TextField}}/volume/+{{NumberField}}
Volume decrease - http://your ip address:your port/{{TextField}}/volume/-{{NumberField}}

I use harmony hub to kick of my saved playlist or favorites but you can write url commands to control playlist and favorites if you do not have a harmony hub.

I take no credit. This is all possible through jishi's sonos code and the use of IFTTT's Google Assistant applet and the Webhooks applets. I just put two and two together. LOL.


This works very well on my localhost, I'm able to sent all kinds of commands to my Sonos system through urls. However my webhooks weblet fails because it can't access the page. What do you use for a Home Server Setup?
Home Server Setup or if you do not have a home server you can use Glitch.com host and import the code from github.
jishi/node-sonos-http-api

IFTTT setup:
I use the google assistant applet "Say a phrase with a text ingredient"

Example google command "tell kitchen sonos to $"

Then I use the Webhooks applet.

url example without a log in: http://your ip address:your port/your sonos speaker name/{{TextField}}

url example with a log in: (only use this one if you setup jishi to use a password: warning this method is not secure because the password is being sent in clear text. Anyone sniffing your traffic will be able to see it.)
http://username:password@your ip address:your port/your sonos speaker name/{{TextField}}

Method is: GET

Content Type: application/json

This example will allow you to play, stop, pause, mute, next, previous on one sonos speaker. So far I have commands to join another speaker, increase and decrease volume.

Other examples
Ok Google, tell Master bedroom sonos to join in.
Join Speaker - http://your ip address:your port/"sonos speaker name you want to join in"/join/"other sonos speaker name"
Ok Google, tell kitchen sonos to increase volume by 3.
Volume increase - http://your ip address:your port/{{TextField}}/volume/+{{NumberField}}
Volume decrease - http://your ip address:your port/{{TextField}}/volume/-{{NumberField}}

I use harmony hub to kick of my saved playlist or favorites but you can write url commands to control playlist and favorites if you do not have a harmony hub.

I take no credit. This is all possible through jishi's sonos code and the use of IFTTT's Google Assistant applet and the Webhooks applets. I just put two and two together. LOL.


This works very well on my localhost, I'm able to sent all kinds of commands to my Sonos system through urls. However my webhooks weblet fails because it can't access the page. What do you use for a Home Server Setup?



I am using a base Windows 10 computer running jishi/node-sonos-http-api as the server.
I was using a Mac computer running jishi/node-sonos-http-api, and the http requests worked great (with the url in the browser is 192.X.X.X:5005 / localhost:5005, but both addresses give an error when I try to make my weblet.. Replacing it with my public IP address didn't work either. If I do a http request with my public IP address it takes forever to load and eventually fails...
Sounds like you need to setup port forwarding on your router.
Awesome, that worked! Followed a guide to set my Port Forwarding up on my router. Noticed that you can't test the port forwarding while you're on your home network, but I managed to get it all working. Thanks for the help!
Pretty stock reply.

Yes you can setup activities on the harmony that can stop start Sonos and play playlists. Then those activities you should be able to trigger from google home.
I’m controlling a Harmony Hub with Google Home. Do you know if a playlist created in Apple Music and subsequently placed in My Sonos as a new playlist will play normally if setup as an Activity on Harmony?
I’m controlling a Harmony Hub with Google Home. Do you know if a playlist created in Apple Music and subsequently placed in My Sonos as a new playlist will play normally if setup as an Activity on Harmony?

Yes. Setup the activity in Harmony and then use IFTTT to have google assistant start the harmony activity. You can also use the google home app to setup a shortcut to harmony.