[SOLVED] [Google TTS] Chromecast Audio Sink not working

Hi! I’m doing my first script and I need help. I do all the steps to configure Google TTS and add the Chromecast binding.

I using a simple rule for say something:

rule "Say Hello"
when
  Item Test changed from OFF to ON
then
  logInfo("default.rules", "Trying to say Hi!")
  say("Hi", "gtts:esESStandardA", "chromecast:chromecast:fc070cef4c0727c90482fabdccf82384:control")
  logInfo("default.rules", "END HI")
end

rule "Say goodbye"
when
  Item Test changed from ON to OFF
then
  logInfo("default.rules", "Try to say Bye!")
  say("Bye", "gtts:esESStandardA", "chromecast:chromecast:fc070cef4c0727c90482fabdccf82384:control")
  logInfo("default.rules", "END BYE")
end

But nothing happens. In the console log:

23:03:56.572 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Test' received command ON
23:03:56.573 [INFO ] [smarthome.event.ItemStateChangedEvent] - Test changed from OFF to ON
23:03:56.574 [INFO ] [.smarthome.model.script.default.rules] - Trying to say Hi!
23:03:56.574 [INFO ] [.smarthome.model.script.default.rules] - END HI

What I am doing wrong?

Thanks!

I don’t use Chromecast yet (mine is on the way… I ordered it recently :slight_smile:)

can you check the name of the Audio sinks using the openHAB2 console:

openhab-cli console
smarthome:audio sinks

how does it appear there?

Ps: When posting configs, plz use: Code Fences (it makes it easier to read and doesn’t distort some characters)

additionally, this is wrong:

gtts:esESStandardA

it should be:

googletts:esESStandardA

check all available voices using the console and the command: smarthome:voice voices

Please use the code fences when publishing code, thanks

Hi Dim,

Sorry about the code, its changed now.

I did it and I took gtts:esESStandardA but maybe I took it from other column. I will check it later.

It’s not just a Chromecast, is a Googlr Home Mini and I’m trying to send it a command.

Actually, beside the voice, also the sink name is wrong.
You are using the control channel and this is not the case.
You Google Home Mini sink shoud be chromecast:chromecast:fc070cef4c0727c90482fabdccf82384 - without :control.
Check the available sinks as @Dim said.

1 Like

Ouch! I will change it later and tell you the result.

Thanks!

Hi @Dim

I’ve tried and shows an error saying no TTS service. If I use smarthome:voide voices then I can read:

gtts:esESStandardA es-ES-Standard-A - español (España)

So I think that this is not the problem.

About @Mihai_Badea says, I change it but nothing happens, only one “beep” and nothing more.

OH2 version, platform and java being used?

openHAB 2.3.0 Release Build, Windows 10 and java version “1.8.0_181” with
Java™ SE Runtime Environment (build 1.8.0_181-b13)

How did you deploy Google TTS on OH2.3?

I found it in the community with the name of “org.openhab.voice.gtts-2.4.0-SNAPSHOT”. After download, I put it in the addons folder.

It won’t work on OH2.3.0 core
If it’s not too much trouble: boost your core to OH2.4.0.M6 and use the included voice addon

Ok, I’m going to update.

1 Like

Hi @Dim,

I’ve updated the runtime. Now I’m in the openHAB 2.4.0.

I retry it and I can see in my Thing Google Home that the status is OFFLINE - COMMUNICATION ERROR Waiting for response timed out.

In the logs:

20:52:11.002 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Test' received command ON
20:52:11.004 [INFO ] [smarthome.event.ItemStateChangedEvent] - Test changed from OFF to ON
20:52:11.006 [INFO ] [.smarthome.model.script.default.rules] - Trying to say Hi!
20:52:41.226 [INFO ] [.smarthome.model.script.default.rules] - END HI
20:52:41.228 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:fc070cef4c0727c90482fabdccf82384' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Waiting for response timed out

I would try to delete the existing chromecast thing and re-discover it
maybe? the latest version of the binding has some changes to the way it handles the chromecast things (not sure since I don’t use currently this binding)

did you go to OH2.4 M(ilestone) (build #?) or S(napshot) (build #?) ?

openHAB 2.4.0 Build #1446

Yes, I did it.

I can see this warn when start openhab:

20:58:41.155 [WARN ] [.voice.gtts.internal.GoogleTTSService] - Audio format OGG_OPUS is not yet supported.

that’s harmless. it’s just a warning that all of us have with Google TTS Addon.

Make sure that you don’t have any old TTS jar and/or chromecast jar in your addons folder and use the bindings from PaperUI. Clean tmp&cache also.

21:10:42.301 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Test' received command OFF
21:10:42.302 [INFO ] [smarthome.event.ItemStateChangedEvent] - Test changed from ON to OFF
21:10:42.334 [INFO ] [.smarthome.model.script.default.rules] - Try to say Bye!
21:10:45.526 [INFO ] [smarthome.event.ItemStateChangedEvent] - chromecast_chromecast_fc070cef4c0727c90482fabdccf82384_control changed from NULL to PLAY
21:10:45.528 [INFO ] [smarthome.event.ItemStateChangedEvent] - Google_Home changed from NULL to PLAY
21:11:14.414 [INFO ] [.smarthome.model.script.default.rules] - END BYE
21:11:14.414 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:fc070cef4c0727c90482fabdccf82384' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Waiting for response timed out
21:11:29.133 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'chromecast:chromecast:fc070cef4c0727c90482fabdccf82384' changed from OFFLINE (COMMUNICATION_ERROR): Waiting for response timed out to ONLINE
21:12:10.543 [WARN ] [okhttp3.OkHttpClient                 ] - A connection to https://myopenhab.org/ was leaked. Did you forget to close a response body?

But only sounds a “beep”

audio sinks
voice voices

rule contents plz