SmartThings Community

[RELEASE] cast-web v1.2.1 - Chromecast Device Handler & SmartApp

Sure, as long as it’s on your local network.

What exactly are you trying to achieve with that? Yes you can integrate your GHome into ST as a standard speaker. Not sure how DLNA should play into that, just let me know.

Goal is to get a Google home (via assistant) to be able to play media from a dlna source. Currently setting up Phlex but not wanting to add the Plex dependenxy

@vervallsweg

Thanks for your answer. Last question, will it be able to read out loud notification in another language than English (Canadian French is what I need)

Thanks!

nobody has made an image publicly available yet

I just published my Dockerfile on Docker Hub: https://hub.docker.com/r/janwer/cast-web-api/

3 Likes

is this for x86 only? I cant get the docker image to tun on my pi.

standard_init_linux.go:195: exec user process caused "exec format error"
-bash: standard_init_linux.go:195:: command not found

Yes, this is x86 only, sorry. Docker Hub does not support auto-building container images for other architectures.

It’s no a big issue, however. Just download the Dockerfile from Github and run the following command in the directory you downloaded the Dockerfile to:

docker build -t cast-web-api .

This creates a local image called cast-web-api on your Pi.

@vervallsweg - do you know a way to program an alarm clock that can play a preset station either to a specific GH device, or to a group of them?

(Stopping the preset playback is probably an easy automation to set up.)

I had a little trouble setting it up on my Windows 10 machine (mostly because I’m nowhere as tech savvy as everyone here) but I eventually got it working after some web searching and tinkering around. Thank you, Tobias, for putting together such an awesome way to use my Google Home speakers via my SmartThings hub!

Setting up a CoRE piston, I’m able to set up a task to Speak, Speak Text, Speak Text and Restore, or Speak Text and Resume. I noticed that the Speak Text and Resume task doesn’t seem to continue playing whatever music may have been playing on that speaker. Is that expected?

I’d love to hear what other use cases people are using for this integration. What tasks do you have set?

I’m sorry I don’t think that this is going to work. In theory it might be possible since DLNA is as far as I know in the end just playing back standard http urls, but I don’t think that will be an easy solution.

If you get an URL that points to a standard voice file that should work. However using Speaker companion or WebCoRE it is not possible. Samsung provides the Text to speech (TTS) service and it only supports the current voice ‘Polly’. I saw some hints for multiple TTS voices in some old ST smartapps, but it seems like this project has been abandoned.

Create a Routine in the mobile app that at a certain time turns on either specific devices or a group. All cast-web devices act like a standard switch.

You can set up the switch behavior be selecting the device in the mobile app and then clicking the settings wheel. Here you have a menu where you can select what switch on or off does.

1 Like

Thanks @vervallsweg, I already figured that out before seeing your response.

If I may suggest an improvement for the DTH- “Next” and “Previous” song switches should select the next or previous presets as though it were a carousel of presets.

E.g. if the DTH is playing:

  • Preset #3, the “Next Song” switch will play Preset #4.
  • Preset #6, the “Next Song” switch will play Preset #1.
  • Preset #4, the “Previous Song” switch will go to Preset #3.
  • Preset #1, the “Previous Song” switch will play Preset #6.
1 Like

@kebel871- I have been using Ulises Mujica’s “Media Renderer Events” smartapp to send rendered TTS messages to my cast-web-api connected Google Home speakers. My kids love it as I have it play a special personalized message for them each night at bedtime.

The TTS settings I use in the Smartapp-

  • Mode: SmartThings (misspelled in the repo as “Smartings”)
  • Voice: en-US Salli - for French Canadian there is fr-CA Chantal, but there are also fr-FR Celine & fr-FR Mathieu available.
  • Google Voice, RSS Language,Voice RSS Key, Alexa Access Key - you can probably leave these with their default settings.
2 Likes

I’ll have a look into this, thanks a lot. I’ll get back to you as soon as I’ve tried to make it work. I should be able to grab a GH mini this weekend if they’re back in stock.

I’m trying out the docker container, and in a web browser I get a response “cast-web-api version 0.2.2” but from the smart app if I do Test API it just spins forever… Any ideas?

Edit: updating IP to IP:Port seems to have helped a bit… it still just spins away though… unsure the issue.

What kind of delay should I expect? Let’s say I open a door which makes WebCoRE fire a piston that lead to the execution of action needed for TTS in French. Do you think the notification will be heard reasonably quickly?

As of now, I’m using a dumb speaker coupled with LANnouncer (+an old android) and it’s been solid and snappy. I just wish I could replace this with a Google Home.

There is perhaps a 2-3 second delay when I trigger it. Not sure what delay a WebCore piston would introduce.

Thanks for the info. Webcore would add anywhere between 100 to 500 ms in my experience.

A 2-3 seconds delay is acceptable for my needs. The only use case it might be too long is the reminder to take out thrash when front door opens on thursdays.

Docker networking should be configured as host. If you have other containers running on port 3000 (e.g. homebridge) these will conflict since both use port 3000 and latest to start will exit.

I had it on bridge and switched to host. Still no change… nothing else other then grafana on that port. Which I disabled prior to testing.

EDIT: Nevermind, host did work. Thanks!