SmartThings Community

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

I also had to clear my npm cache as I couldn’t even install “forever”. It was a real PITA. So, that could have been contributing to it as well.

Is anyone experiencing syncing issues? I have been running for a few weeks without issues. All of a sudden the app doesn’t sync. I have preset 1 as classic rock, preset 2 as country. If I select classic rock I get the green playing circle, when I hit forward it plays country but I have to hit the gear key and save my config. Then I get the green circle on the country presets. I found this because my action tile quit working because It is not synced with the app. I have to open the app and save the config to sync with action tiles. I’m hoping there is an easy fix. I tried deleting all DH and app and starting over. Any help would be greatly appreciated

Are you using Smartthings Classics or the new app?

Using the classic app

I do have the new app loaded on my phone but never use it. I’ll remove the new app and see what happens

Don’t know what else to try. Deleted the new smartthings app, wiped the pi and started over, deleted all DH and app, tried to configure the cast-web on both Samsung tablet and Samsung s9. I wish I knew what broke. It worked flawless for several weeks.

Looking at it closer I can make everything work by saving the config. I hit play, gear key and save. Then I can do one more command like pause, next track, etc. Then I cant do anything else until I hit gear key and save

Has any one had the new version running on an android yet using nodeJS?

I’m sorry if this has been asked before, but I couldn’t find it on the website or on this thread.
I understand that with the latest version, I can trigger a Broadcast on all my google home devices.

However, I couldn’t find if it also allows me to send other kind of “assistant commands”, for example if I wanted to trigger a Google Assistant routine called “Late Morning”, I would just need to give the Assistant this message and it should work. If it’s possible, how do I use it on webCoRE?

Thank you very much!

1 Like

Do a search for an app called “Assistant Relay”. That will allow you to pass custom commands to GH.

I have, but it seems less updated than cast-web, and I thought that with the new update maybe this was possible?
In any case, is it possible to have both cast-web and assistant relay running at the same time on my raspberry pi?

Thank you

Im just going to leave this here, maybe some future user will find it useful
I fought and fought getting google assistant to work with cast-web, even through I had it

A) originally working till I changed my priviledged user
B) have it working it relay assistant (same client/secrets)

The only consistent way I have found to get it to initially configure, is

A) go through the web steps
A.1) Broadcast would never work, start, stop, resync, etc
A.2) Clicking on the cast-web-api device ‘assistant’ setting, would come back false
B) using webcore, I initiated the checkAssistant() action
C) Everything works, A.2 then says TRUE

Not sure if there is a way to command line initiate that check call (@vervallsweg) or if there is a bug that can be ironed out overall … or Im just doing something F’d up. But its confirmed working on a Mac with brew install node@8 …

This is a really slick integration, and I thank you for the support!

Keywords: Google Assistant, installing google assistant, configuring google assistant, broadcast

1 Like

It is and I used to do this. The only thing you have to do is to change the default port for one of them. They both use 3000 as default.


Looking at it closer I can make everything work by saving the config. I hit play, gear key and save. Then I can do one more command like pause, next track, etc. Then I cant do anything else until I hit gear key and save

I’m wondering if this has anything to do with having to use the old preset generator. I’m wondering if the old generator is not saving or syncing the settings

@Gietlt Does the old generator actually save? Or do you still need to copy/paste into the interface? I wrestled with the new generator output (which you need to copy/paste) not working until I just found a working snippet (in this thread) and manually changed to my presets and saved into the interface, it has since worked.

Everything (other than the presets) worked fine, when I was putting in a bogus preset snippet - so Id lean a bit away from it being an issue with the generator, and more towards something on your side.

Have you just reverted back to the default presets and see if everything works, and then slowly add in presets?

Last night Broadcast was working, this AM it just stopped. I thought it was that the API went to sleep, but after it did start to respond, its still not broadcasting, but it is sending notifications to specific GH devices …

The weird part is, when broadcast permissions were hosed, it usually didnt get past that action in Webcore, and would not send the next action to the device –

I tried my trick of first calling checkAssistant() and that didnt help

Maybe Google broke broadcast? More likely I broke something, although I didnt change anything.

On a related note, where do the API logs go? I can increase the level, but I dont see anything in the drill down in the ST interface, wondering if it is somewhere where the API is living, and not the screen output as with my Docker, I dont get to see that


I am seeing message broadcast: true on the screen output (docker starting spewing it) … so, I dont know if that means its sending, but nothing is broadcasting from the GH

Resolved – I had blocked internet ports to the device that the API is running … not smart, but for a reason – appears the API needs to continually check authorization against google, which makes sense (still allowed, which devices, etc etc) — thanks for playing along!

1 Like

Sorry to be a pain, but I tried everything and here is what I did tonight in order.
1.deleted both DH
2.deleted smartapp
3.formated sd card
4.reloaded pi and cast-web-api
5.loaded both DH
6.loaded smartapp
7.used preset generator for preset 1 only. Saved and copied to clipboard.
8. Copied and pasted into the cast-web service manager in the family room speaker.

Still no luck. I still have to hit the gear key and save after every command. Here is my preset

{“preset1”:{“mediaTitle”:“Classic rock”,“mediaSubtitle”:“Rock”,“mediaType”:“audio/mp3”,“mediaUrl”:“;stream",“mediaStreamType”:“LIVE”,“mediaImageUrl”:""},“preset2”:{“mediaTitle”:“Country”,“mediaSubtitle”:“Country”,“mediaType”:“audio/mp3”,“mediaUrl”:“;stream”,“mediaStreamType”:"",“mediaImageUrl”:""},“preset3”:{“mediaTitle”:“X-mas”,“mediaSubtitle”:“X-mas”,“mediaType”:“audio/mp3”,“mediaUrl”:“;stream/1”,“mediaStreamType”:“LIVE”,“mediaImageUrl”:""},“preset4”:{“mediaTitle”:"50s and 60s rock”,“mediaSubtitle”:“50s and 60s rock”,“mediaType”:“audio/mp3”,“mediaUrl”:“;stream/1",“mediaStreamType”:“LIVE”,“mediaImageUrl”:""},“preset5”:{“mediaTitle”:"Preset 5”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""},“preset6”:{“mediaTitle”:“Preset 6”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""}}

Any help would be greatly appreciated

push that JSON block through the linter: … it failed for me, but there may be a copy/paste issue … if it works, report back here, if it doesnt, fix it and see what happens

1 Like

I came back as a valid json

Just to catch me up …

  • before you add the presets, everything works as intended? Such as on another device that has no presets?
  • Have you tried adding a preset, manually entered, of one of the examples found in this thread, and it behaves the same?
  • by ‘every command’ can you clarify, like, anything regarding the speaker (stop, play, etc) or just clicking presets?
  • by ‘gear key’ you mean for the individual google home device, correct?