Skip to main content
Contributor I
May 12, 2017
Question

Google home integration with Sonos through Harmony

  • May 12, 2017
  • 23 replies
  • 32945 views
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

Lyricist I
July 15, 2017
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 😃 )
Producer I
July 26, 2017
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/
July 28, 2017
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.
Lyricist I
August 26, 2017
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.
Lyricist III
September 14, 2017
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.
Lyricist II
December 6, 2017
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?
Lyricist III
December 6, 2017
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.
Lyricist II
December 6, 2017
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...
Lyricist III
December 6, 2017
Sounds like you need to setup port forwarding on your router.
Lyricist II
December 6, 2017
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!