Sonos ONE, Alexa, voice?

I have a Sonos ONE with Alexa. Is there any tutorials on how to configure Sonos with OpenHAB, and the Alexa piece, and get voice controls so even at a basic level Alexa can say hi when my presence detection is tripped?

Thanks.

JR

Like This?

Yep, I’ve seen this but looking for the whole picture. Or maybe it is? Won’t this just get my speaker recognized, not Alexa built in or the ability to do text to speech. Or don’t think so but maybe it does do everything?

Note right now I have the Sonos independently setup and integrated into Amazon Alexa. No OpenHab tie yet.

Thanks.

Steve

There are several ways to rome.
You actually have two devices, a Sonos Player and Alexa.
For the Sonos openHAB has a binding which would enable you to send the output of an tts service to the device. However Alexa has its own tts service. You can play songs from your local storage on the Sonos via openHAB, which is impossible for Alexa (atm).
Alexa itself can be integrated into openhab in different ways. None of which would totally integrate the Sonos.
So you got to take your mix a decisions.

1 Like

Thanks Jürgen,

One big item I’m trying to do is ask Alexa to play my local songs or albums or artists. Apparently because of limited API support in Alexa built into the Sonos ONE I can’t do that. I don’t like to pay for online services and have my own music library. Everytime my family asks to play a song we get Amazon Music playing 15 seconds and asking to buy it. They get annoyed that this whole smart home thing is going to turn into a big advertisement thing. Is there any way to automate this with Alexa and OpenHab? Or are you basically saying I could start a song playing on the Sonos with an app and then control it with openHAB controls on my phone or otherwise?

Also note I’ve installed the Sonos Binding and all seems good there. Have lots of controls now. Couple other things:

  1. If I want to have Alexa greet me when I walk in (have presence setup) the door can I do that without another cloud integration or is that required. See people reference some TTS service.

  2. To do this I’m going to assume I need my OpenHAB system to be able to “see” Alexa exists. Right now just sees Sonos but not the integrated Alexa. Besides the Alexa skill to see my OpenHAB devices, I assume I need to install the Alexa Binding so OpenHAB is aware of Alexa? I never see anyone talk about installing any bindings with any OpenHAB/Alexa integration tutorials.

Thanks

JR

FROM THE SONOS DOCUMENTATION

You can use Alexa to start playing from Amazon Music, Amazon Music Unlimited, Pandora, iHeartRadio, SiriusXM, TuneIn Radio, and we’re working to bring Spotify controls in the future too. Alexa doesn’t have access to your local music library.

You may be able to create SONOS Playlist that contain music from your local library and then get ALEXA to stop and start those playlist.

To make this happen you will need to create a rule that when presence is detected do something…

Something along the lines of this…

(This is what I use to announce when my front gate is closed)

rule "GateClose"
when
	Item GateStatus changed from OPEN to CLOSED
then 
	say("The Front Gate is Closed")
end

You will need to have installed and correctly configured one of the TTS services doe this to work. I prefer the Google TTS.

Squid

Thanks. Is the Google TTS service the Cloud Text to Speech Voice option under Voice? Doesn’t have any links to setup or anything so hopefully it’s clear. Also this works OK with Alexa?

Also in case I’m going the wrong path for the voice thing, should I be trying to talk thru Alexa or can you talk directly thru the Sonos speakers? Saw some really custom stuff from a couple years ago using node.js to do voice thru Sonos.

Thanks

JR

No, such TTS setup in OpenHAB would allow to use any recognised audiosink to play the output. In other words the Sonos would play it.
Since your Sonos has a Alexa integrated you should also be able to use the Alexa TTS channel and send the string directly to Alexa ( not using the selected TTS of openHAB) which would also play the text on your Sonos.
Confused? Understandable!

Yeah, would be nice if there was a total walkthru on setup. Once I see basic example I can rock and roll. Right now getting bits and pieces. Today my system knows about Sonos but not Alexa. Assume that will remain until I install the Amazon Echo Control Binding. If I route this thru Alexa, will it use her voice or the voice of the TTS engine that it’s set to? Also if I use Alexa will it work local or route thru Amazon vs using the Sonos? Ideally I started this project to do everything locally but looks like that went out the window the minute I wanted voice anything. :slight_smile:

JR

1 Like

Yes, one of your Sonos Speakers can act as an “audio sink” for TTS. Think of an audio sink as a playback device/speaker.

Squid

Guess this was all pointless. After a few days with my Sonos ONE. Found all it’s limitations around API support and things the dot can do it can’t do. Plus within days twice Alexa stopped responding. First time I had to remove and add the skill again. This time not sure, don’t care. The Sonos ONE is seriously flawed for two hundred US dollars.

JR

I would love to know more about this as well. i would like to know what other parts I need to turn on in the PaperUI area. do I need a ADD-ON? how do I turn on the Voice? Can I pick a Voice?

If you get some good info please share.

How should anybody know what you need to turn?
We can assume you have openHAB, we can also assume you have a Sonos device, anything else is in the dark!
Reading the documentation you would have noticed that with the Sonos bindings your device(s) would be recognised as an audio Sink. If interested in TTS reading the reading the parts about Voice services would reveal what to setup of such.

In other words: All the “good info” is shared in the documentation!