Chromecast problems with playSound and say

Hello,
my problem is using the following functions

playSound("chromecast:chromecast:5aaf8e9ecbf134e1ab25eca122ee38b4", "doorbell2.mp3")
or
say("Die Rolladen gehen in " + WaitTime.toString + " Minuten herunter!", "voicerss:deDE", "chromecast:chromecast:5aaf8e9ecbf134e1ab25eca122ee38b4")

I get the following log entries

2020-12-28 09:45:01.927 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'CastGH_title' changed from UNDEF to Notification
2020-12-28 09:45:02.202 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'chromecast:chromecast:5aaf8e9ecbf134e1ab25eca122ee38b4' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Unable to load media
2020-12-28 09:45:02.230 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'CastGH_title' changed from Notification to UNDEF
2020-12-28 09:45:02.262 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'chromecast:chromecast:5aaf8e9ecbf134e1ab25eca122ee38b4' changed from OFFLINE (COMMUNICATION_ERROR): Unable to load media to ONLINE

and nothing happens. playStream with a static address is still working. Changing the volume to my Google home minis is also still working.

Platform information:

I’ve changed my enviroment due the migration from OH2.5.11 to OH3, so I don’t know if it is a problem because of the new environment or because of the new OH-version.
With my old configuration (Raspberry Pi4, OH2.5.11 with openhabian image) there wasn’t problems to use the function “playSound” and “say”.

For OH3 I’ve changed to Synology DS920+ with Docker and the functions aren’t available anymore. I’ve mounted shared folders “…/conf”, “…/userdata” and “…/addons” from the DS920+ into the container, so the file “doorbell2.mp3” is in the directory “/conf/sounds”.

I’ve also tested with a Callback URL (none or “DS920plus:8080” or “192.168.2.167:8080”) or changing voice from VoiceRSS to MaryTTS.

Could anybody give me an information what’s my mistake, please.

Hi there,
does nobody have any idea how this problem can be solved?
Any idea can help.
Kind regards.

If OH3.0 is running under debian then “chromecast say” works fine.
Restored Synology Docker OH3.0 for backup.
Chromcast is down and Thing will be offline.

https://docs.openhab.org/v2.2/addons/bindings/chromecast/readme.html

Creating services.cfg solved the problem for me.

Thx for your support, but I don’t understand you. My Things are all defined in the MainUI, so if have no file definition for it. Beside that the link you post is from OH2.2.

I have set the log to DEBUG and here is the result:

==> /var/log/openhab2/openhab.log <==
2021-01-24 10:40:16.582 [DEBUG] [omecast.internal.ChromecastCommander] - Application launched: Application{id: CC1AD845, name: Default Media Receiver, sessionId: 573fd7bf-c446-4661-830b-15f42454e777, statusText: Default Media Receiver, transportId: 573fd7bf-c446-4661-830b-15f42454e777, isIdleScreen: false, launchedFromCloud: false, namespaces: [Namespace{urn:x-cast:com.google.cast.cac}, Namespace{urn:x-cast:com.google.cast.debugoverlay}, Namespace{urn:x-cast:com.google.cast.broadcast}, Namespace{urn:x-cast:com.google.cast.media}]}

==> /var/log/openhab2/events.log <==
2021-01-24 10:40:16.869 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'CastGH_GF_Office_title' changed from UNDEF to Notification
2021-01-24 10:40:16.979 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'chromecast:chromecast:36110cd309b09f2c0b140e79979ea07d' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Unable to load media
2021-01-24 10:40:16.995 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'CastGH_GF_Office_title' changed from Notification to UNDEF
2021-01-24 10:40:17.022 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'chromecast:chromecast:36110cd309b09f2c0b140e79979ea07d' changed from OFFLINE (COMMUNICATION_ERROR): Unable to load media to ONLINE

==> /var/log/openhab2/openhab.log <==
2021-01-24 10:40:16.868 [DEBUG] [ast.internal.ChromecastStatusUpdater] - MEDIA_STATUS MediaStatus{activeTrackIds: <null>, mediaSessionId: 1, playbackRate: 1, playerState: IDLE, currentItemId: 1, currentTime: 0.000000, customData: <null>, loadingItemId: null, items: <null>, preloadedItemId: null, supportedMediaCommands: 274447, volume: Volume{level: 1.0, muted: false, increment: 0.05, stepInterval: 0.05000000074505806, controlType: null}, media: Media{url: DS920plus:8080/audio/b650f617-bf52-49fd-ae85-64e415f04847, contentType: audio/mpeg, duration: null}, repeatMode: REPEAT_OFF, idleReason: null}
2021-01-24 10:40:16.979 [DEBUG] [omecast.internal.ChromecastCommander] - Failed playing media: Unable to load media
2021-01-24 10:40:16.994 [DEBUG] [ast.internal.ChromecastStatusUpdater] - MEDIA_STATUS MediaStatus{activeTrackIds: <null>, mediaSessionId: 1, playbackRate: 1, playerState: IDLE, currentItemId: 1, currentTime: 0.000000, customData: <null>, loadingItemId: null, items: <null>, preloadedItemId: null, supportedMediaCommands: 274447, volume: Volume{level: 1.0, muted: false, increment: 0.05, stepInterval: 0.05000000074505806, controlType: null}, media: null, repeatMode: null, idleReason: ERROR}

==> /var/log/openhab2/openhab.log <==
2021-01-24 10:40:22.190 [DEBUG] [omecast.internal.ChromecastScheduler] - Canceling connection
2021-01-24 10:40:22.190 [DEBUG] [omecast.internal.ChromecastScheduler] - Scheduling connection

May be the problem is the device for audio in the Synology docker.

The problem is solved, but I’m not sure what caused it.
I made two changes:

  1. Connect a USB sound card to my Synology and share it with the container
  2. The optional callback URL in the Chromecast binding changed from “<DNS-Name>:8080” to “http://<ip-address>: 8080

Now it’s going according to plan. :grinning: