Google Mini / Chromecast, adjusts volume, but no sounds

  • Platform information:

    • Hardware: VM on ESX 6.7 (2x Xeon 5650/128GB)
    • OS: Ubuntu 20.04.2 LTS
    • Java Runtime Environment: openjdk 11.0.10 2021-01-19 LTS
    • openHAB version: 3.0.1
  • Issue of the topic: Google Mini won’t play sound (but does adjust volume!)

  • Please post configurations (if applicable):

openhab> openhab:audio sinks                                                                                                                                                                                      
  Bonus Room speaker (chromecast:chromecast:f57ac2f4b8c78488fd280d22801dbe76)
  [CC]Bonus Room TV  (chromecast:chromecast:5aacd42ac538fd6c28be3aec5e23659b)

* System Speaker (enhancedjavasound)
  Web Audio (webaudio)
openhab>     
openhab> openhab:audio play chromecast:chromecast:f57ac2f4b8c78488fd280d22801dbe76 cruise-ship-horn-sound.mp3 75        
openhab> openhab:audio play chromecast:chromecast:f57ac2f4b8c78488fd280d22801dbe76 doorbell.mp3 75
openhab> openhab:audio play chromecast:chromecast:f57ac2f4b8c78488fd280d22801dbe76 barking.mp3 75     
openhab> openhab:audio play chromecast:chromecast:f57ac2f4b8c78488fd280d22801dbe76 foo.mp3 75                                                                                                                 
File '/etc/openhab/sounds/foo.mp3' not found!

The Google Mini just makes a “volume control” sound (i.e. the sound of the volume being adjusted), but it never plays the actual sound (doorbell, barking, cruiseship).

I started off trying to get pollytts to work (hence the comments and rule names, etc)

rule "Polly"
when Item PollySays received command ON
then
    logInfo("pollytts", "We are speaking up!")
    playSound("chromecast:chromecast:f57ac2f4b8c78488fd280d22801dbe76","cruise-ship-horn-sound.mp3",new PercentType(40))
//    say("Hello world!", "pollytts:Joey", "chromecast:chromecast:f57ac2f4b8c78488fd280d22801dbe76")

end

When I try to use the Chromecast on the TV, the sound is adjusted, the words “Default Media Receiver” come up on the screen with the word “Notification” In the bottom right hand corner there is a “bar” that looks like it would be for the duration of the MP3 clip, and it goes from 0:00 to 0:00, which would seem to indicate the MP3 isn’t getting to the device?

Any advice?

I can’t get the Chromecast or the Google Mini to playSound!

Thanks!

SixO

  • If logs where generated please post these here using code fences:
2021-04-08 22:21:27.588 [INFO ] [g.openhab.core.model.script.pollytts] - We are speaking up!

You should check the bindings’ parameter callbackUrl.
Could be a firewall issue (maybe port 8080 is blocked) or you could have multiple IPs and the openHAB server listens to another one…
Stuff like that… :smile:

1 Like

The Chromecast binding requires a callbackURL for this functionality to work. For whatever reason, it wasn’t clear to me that the callbackURL should be the IP and port of the OpenHAB server. I added

binding.chromecast:callbackUrl=http://<openhab IP>:8080

to runtime.cfg and everything work!

Thanks for the tip @Mihai_Badea

SixO

1 Like