Google Home - Chromecast binding - how to select special GH for audio output

Hello guys,

I have several Google Home Mini Speakers in my house and use the “Chromecast Audiogroup” as default sink for my audio output.The say command works perfect when using the default audio sync.

Here are my things settings:

chromecast:audio:Flur             [ ipAddress="192.168.0.220" ]
chromecast:audio:Schlafzimmer     [ ipAddress="192.168.0.219" ]
chromecast:audio:Wohnzimmer       [ ipAddress="192.168.0.218" ]
chromecast:audio:Buero		  [ ipAddress="192.168.0.217" ]
chromecast:audio:Bad		  [ ipAddress="192.168.0.216" ]

/* Chromecast Audio Group for my Google Home Mini's */
chromecast:audiogroup:Haus	  [ ipAddress="192.168.0.220", port=42576]

Now I want to say something when motion is detected in a special room. See this example:

say("Hello, you are in the bathroom now","voicerss:deDE","chromecast:audio:Bad")

But I do not get any audio output.

When I do the default say command:

say("Hello, you are in the bathroom now")

this ouput works (of course then on all my Google Home Speakers).

Does anyone of you have figured out how to say something on just one Google Home (Chromecast) device?

Thanks

I am running OH2 release 2.2

Hey Ronny,

yes, I use chromecast devices, audiogroups and other devices selectively. Have you had a look in the karaf shell and list the sinks? I assume that - even if you set friendly, readable names in your textual config - the internal name of the sink is still the auto-generated ID or something else:

openhab> smarthome:audio sinks
chromecast:audio:1281579206d63e7280a8603bea40a8c
chromecast:audio:b890dc09903e4a3ae75f4c222af4190
kodi:kodi:ba68d5d5-0711-5277-1bc9-1fd19c6151d
chromecast:chromecast:fdbef59fb5a7c259ae076b57fb21b7d
enhancedjavasound
chromecast:chromecast:4a183c6d0d04de7b9e9c1165fb7390b
javasound
webaudio
chromecast:chromecast:751f8c4d0c382ae1d44d0b7326e2d6c
chromecast:audiogroup:c77b4b8-d2a7-4176-a7cc-e8d8a2d64ec1

This is how my devices are named. Though, I added them through the PaperUI.

Hahaha :+1: that was a funny example. You announce when you’re in the bathroom :). I believe Chromecast accepts a URL to play it.

Hi SiLex,

thanks for the hint - this is how my Audio Sinks are listed:

openhab> smarthome:audio sinks
chromecast:audio:Buero
chromecast:audiogroup:Haus
enhancedjavasound
chromecast:audio:Flur
javasound
webaudio
chromecast:audio:Wohnzimmer
chromecast:audio:Schlafzimmer
chromecast:audio:Bad

Could you please post one example of your “say” command.

@luckymallari Of course late I would like to play more usefull things like the time of the day or a newscast, but for testing I choose a useless sentence :wink:

Thanks for the help guys!

One more finding regarding the Audio Sinks.
They seem to be correct as the playSound() command is working.

playSound("chromecast:audio:Bad","mysong.mp3")

So it is either a bug in the say() implementation or I have and configuration issue which I am not seeing yet.

Here is the API documentation of:
playSound()
and
say()

Interesting is the fact that the parameter for the Audio Sink is at the beginning for “playSound”, but at the end for “say”.

I also did check the Console for the voices:

openhab> smarthome:voice voices
voicerss:zhCN VoiceRSS - Chinesisch (China)
voicerss:nlNL VoiceRSS - Niederländisch (Niederlande)
marytts:cmuslthsmm cmu-slt-hsmm - Englisch (Vereinigte Staaten von Amerika)
voicerss:esMX VoiceRSS - Spanisch (Mexiko)
voicerss:ptBR VoiceRSS - Portugiesisch (Brasilien)
voicerss:itIT VoiceRSS - Italienisch (Italien)
voicerss:enUS VoiceRSS - Englisch (Vereinigte Staaten von Amerika)
voicerss:deDE VoiceRSS - Deutsch (Deutschland)
voicerss:frFR VoiceRSS - Französisch (Frankreich)
...

and my voice parameter used is listed.

Any ideas?

Sorry, just saw this now. Feel free to @mention people you answer to, so they get notified :slight_smile:

Even worse, I don’t have a good answer. I only use playSound and these - as you already found out - work fine. Never tried say because there are very few sentences that I generate for very low prices at online services and save them as mp3 files for openHAB to play.

Hi Ronny,

I had the same problem. Now I use the the thing id e.g.

chromecast:chromecast:07xx2xxxxxxxxxx10c690434f532399bxxx

Instead of the sink Id. Now it works.

Regards

Interesting - I will try this as well.