SmartThings Community

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

Thanks for the reply.

100% script-kitty. I have no idea what i’m doing! :blush: I would like to cast a playlist to the home.

I have found some web Mp3 URLs that I was able to cast.
Can I I just make a playlist on my device and cast from that playlist folder?
Or would I need to make a media URL?
I am sorry for the dumb questions… Cant thank you enough for building this.

Im trying to creat a preset. Can some one spot the issue
{“preset1”:{“mediaTitle”:“Greatest showman”,“mediaSubtitle”:"",“mediaType”:“video/mp4”,“mediaUrl”:“",“mediaStreamType”:“BUFFERED”,“mediaImageUrl”:“”},“preset2”:{“mediaTitle”:"Preset 2”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""},“preset3”:{“mediaTitle”:“Preset 3”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""},“preset4”:{“mediaTitle”:“Preset 4”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""},“preset5”:{“mediaTitle”:“Preset 5”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""},“preset6”:{“mediaTitle”:“Preset 6”,“mediaSubtitle”:"",“mediaType”:"",“mediaUrl”:"",“mediaStreamType”:"",“mediaImageUrl”:""}}

Ok no problem, I just created a batch shortcut and put it in the startup folder, easy peasy. I’ll be testing this out tonight, but so far everything’s working on my windows box. Thanks!

1 Like

any advice on creating presetes, what should i be putting in the builder im trying to stream from a nas, ive tryed (below) and it just crashed the node/js, i have to keep restarting it

also, what id the differance between your and this [Release] Google Assistant Relay - Google Home Audio Notifications!

No the content needs to be on some kind of http server.

It can be on your local network but needs to be hosted on a http server. So either upload it somewhere with direct file access (not many hosters allow for that and due to copyright a bad idea) or install some kind of software that serves your music folder via http on LAN.
Apache would be my first thought but there’s a lot of server software out there :slight_smile:

The thing you posted is completely broken, there are duplicate entries and required fields just missing. It doesn’t even parse to valid JSON. Will probably be overwritten to default on import.

Yes. I don’t know the specifics of your media so I can just guess. First: check the urls you’re using. Just paste them into a browser window. If they don’t start playback immediately without changing the address or requiring login, they’re trash.

Once you settled for one of the links you posted, these would (probably) be the settings for it:

Media title: Greatest showman
Media subtitle: Celebrates the birth of show business, and tells of a visionary who rose from nothing to create a spectacle that became a worldwide sensation.
Media type: video/mp4
Media URL: http://placeholder/
Media streamtype: BUFFERED
Media image URL:

Here’s the resulting preset:
{"preset1":{"mediaTitle":"Greatest showman","mediaSubtitle":"Celebrates the birth of show business, and tells of a visionary who rose from nothing to create a spectacle that became a worldwide sensation.","mediaType":"video/mp4","mediaUrl":"http://placeholder/","mediaStreamType":"BUFFERED","mediaImageUrl":""},"preset2":{"mediaTitle":"Preset 2","mediaSubtitle":"","mediaType":"","mediaUrl":"","mediaStreamType":"","mediaImageUrl":""},"preset3":{"mediaTitle":"Preset 3","mediaSubtitle":"","mediaType":"","mediaUrl":"","mediaStreamType":"","mediaImageUrl":""},"preset4":{"mediaTitle":"Preset 4","mediaSubtitle":"","mediaType":"","mediaUrl":"","mediaStreamType":"","mediaImageUrl":""},"preset5":{"mediaTitle":"Preset 5","mediaSubtitle":"","mediaType":"","mediaUrl":"","mediaStreamType":"","mediaImageUrl":""},"preset6":{"mediaTitle":"Preset 6","mediaSubtitle":"","mediaType":"","mediaUrl":"","mediaStreamType":"","mediaImageUrl":""}}

You can import that into the generator and REPLACE the media url with the one you settled with.

1 Like

So, I just started using this about a week ago, and the only experience I have is with the 1.0.0+ version.

It found my two devices (Google Mini and Onkyo receiver with Chromecast Audio) and added them to SmartThings. However, the SmartThings Classic Android app still does not think they are speakers, so I cannot use SmartApps with them like BigTalker2 or Ask Alexa.

I set up the cast-web-api on two different devices as well just to see if that was a problem, my Windows 10 machine running the latest node.js x64 (from the link on your site) as well as a Raspberry Pi running node.js 6.14.1. I get the same behavior when setting up your SmartApp pointing to either server.

Thanks for the help and for running this great project!

Disregard my post…I think.

I saw when I went to Device Type Settings for each of the Device Handlers (cast-web-api and cast-web-device) that they had zero Capabilities or Custom Commands even though they were definitely there in the code. They are there now once I deleted and readded and published the device types again.

Im still finding the node js on Android a bit buggy. After a bit of time it seams to freeze and stop working. When i stop and start it again it works great with smart home security events and the speaker companion smart app.

Have noticed some device’s (e.g. Chromecast) dont show as disconnected. The tv has been powered off for a day but the device thing still shows connected and still playing Netflix. Restarted the node, refreshed the device api, refreshed the thing but no change?

tryed to refesh the version in the DH

Ahm, this is odd.

So everything works again after reinstall?

I’m aware of that bug and will fix it in next release. Keep in mind this function only lets you know about new updates, it doesn’t install them. That’s why it’s not a huge priority to me.

Then install it on a different device. Something like a raspberry or anything that doesn’t have power management like android.

i have a pi somewhere, has anyone else used this with an andriod node js?

hey there. Did you get a solution. I too get a blank page after discovery.

Installed and devices are detected but when I select them and click “Next” on the smartapp I get this error “The cast-web-api doesn’t return it’s MAC address. No devices were added.” Has anybody else run into this?

I’m mostly interested this for the possibility to turn off my TVs using Chromecast via Webcore. Is that possible? It works via Google Home/Assistant, I am just looking for a way to automate it. I saw a few mentions of it above, and that you were looking for a TV that supports it, was there any progress on that?

No, sorry. Only turning them on works. If you start playing content on a cast device they’ll turn on the tv via hdmi cec. Off is not working and probably will never work, since it’s not part of the cast protocol.

This is strange. I mean I implemented that error message and now what’s causing it, but it should never appear :sweat_smile:

Can you set the logging level to 4 in the SM and try adding your devices again?

Make sure to open the IDE’s live logging while you do this and give the discovery a page a couple of seconds to actually refresh. I’m particularly interested in this logging output: ‘Parsing {stuff}’. Just post it here and we’ll investigate.

Check if devices were added. If not, set the service manager logging level to 4, open the live log and try again. Post the output of the live logging here.

I figured you might know something about that error message :wink:

IDE Logs

cast-web-api logs

Thanks for the help!

1 Like