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
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.
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 #?) ?
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?