Cast-web porting help - SOLVED

Sure thing, check out my repo above. I got this error fixed as well to the point of controlling devices and seeing their state.

The child device doesn't accept a hub id. Also sending the label caused some weird issues, so I removed it too:

addChildDevice("vervallsweg", "cast-web-device", it, ["apiHost": getDataValue("apiHost")])

Thank you so much, I went to your repo and updated the drivers and apps. Working GREAT! Now to play around with all the options. Thanks again!


If working, would you share the ported app please?

It's all in his repo.


Thanks. This resolved my issue with adding my Google Home devices.
PlayText and Speak functions still did not work for me.
I was getting the following error in Hubitat for the device when I tried these functions:
errorgroovy.lang.MissingMethodException: No signature of method: dev15316173436921026341192.textToSpeech() is applicable for argument types: (java.lang.String, java.lang.Boolean) values: [Testing, true] on line 418 (speak)

Line 418 in cast-web-device was the following:
return playTrack( textToSpeech(phrase, true).uri, 0, 0, true )
I modified to:
return playTrack( textToSpeech(phrase).uri, 0, 0, true )

and it is now working.

def speak(phrase, resume = false) {
    if(settings.googleTTS && settings.googleTTSLanguage){
        if(settings.googleTTS==true) {
            return playTrack( phrase, 0, 0, true, settings.googleTTSLanguage )
    //return playTrack( textToSpeech(phrase, true).uri, 0, 0, true )
    return playTrack( textToSpeech(phrase).uri, 0, 0, true )

Since I already have Google Assistant Relay working, I found this a bit more involved then I needed.
If anyone is looking for an alternate choice, I instead downloaded the latest nightly for MacOS VLC Player 3.0.4 which is able to Cast and have the HTTP web interface active at the same time.

NOTE: To get this working, I found it was necessary to first disable the HTTP web interface then quit and restart VLC Player. Once it's running again, set the cast device, and then go into the preferences and re-enable HTTP web interface.

Works great, and I now have both my door chime and a verbal announcement of the door that has been opened.

[Edit} I forgot to include something I did previously, and for some time couldn't get this working again. There's an important step after re-starting VLC Player, selecting the Cast device, and then re-enabling HTTP. You then must then go to the VLC menu, choose "Add Interface" and select "Web". It should then work to play a track from Hubitat.

Just wanted to say thanks to @jp0550. This is a nifty feature to have available. Thanks for porting over and sharing.



If I'm listening to a Google Music radio station and an announcement happens...How do I get it to continue playing the radio station after the announcement?

Hi putnamjwp,
thanks for porting this over to Hubitat. Installed the app & drivers from your repo but can't seem to get the dropdown populated with my cast devices.

  • My cast-web-api node server is working fine - I used it before for cast-web-api on ST
  • The Hubitat app doesn't even hit the node server - not for Test API connection and neither for Discover Devices

The log is inconclusive:

Would appreciate any hints.


Edit: bptworld -> putnamjwp :wink:

All credit goes to @jp0550. :smile: (I don't even have a repo)

Hi @jp0550,

I'm not sure if you received a notification for my first post a few days ago because I initially used the wrong recipient.

I'd be glad if you could give me a hint what might be wrong if Cast web - service manager doesn't list any devices, even though cast-web-api actually found the devices:


Would be glad if you could give me a hint.


I don't have this installed anymore so I'm not sure off the top of my head. The big thing about it not populating before was this code below which should be in the repo now:

def options = [:]
state.devicesMap.each {
     options[it.key] = it.value   
input "selectedDevices", "enum", required:false, title:"Select Cast Device ("+ state.devicesMap.size() +" found)", multiple:true, options: options

For the chromecast fans out there, I finally got some time to poke at our chromecast integration again.
What I have so far is play/pause/stop/set volume, mute/unmute.

The only other possible rev 1 inclusion would be speak (ie TTS), however I have no time to dig into play track, restore/resume types of functionality at this time.

So if I add speak, and you have something already running and you send a speak command, it will not be restored.

Add it?, leave it out, thoughts?


Add it please.

1 Like

Add TTS please

I use the Google Home Assistant Relay for voice announcements but adding it to the in house app would be a huge plus.

1 Like

Vote yes on TTS!

If it’s added, would it not act the same as Chromecast does right now with alert tones? Where it disconnects after five minutes, and then there is the long delay, and then a tone and finally the tone or in this regard, the TTS message?

Add it!

Ive not heard anything like this, no idea what that's about.

Speak with our TTS takes somewhere between 200 and 800ms depending on if another app is using the device and we have to wait for that app to quit or not.