[RELEASE] cast-web 1.0.0 - Chromecast Device Handler & SmartApps

dth_av
requires_server
project_av
chromecast
googlehome

(Kyle Crebs) #454

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.


(Mark C) #455

Im trying to creat a preset. Can some one spot the issue
{“preset1”:{“mediaTitle”:“Greatest showman”,“mediaSubtitle”:"",“mediaType”:“video/mp4”,“mediaUrl”:“http://192.168.0.22:80/Public/Videos/kids/Greatest_Showman_2017-PG.mp4",“mediaStreamType”:“BUFFERED”,“mediaImageUrl”:“192.168.0.22/Public/Videos/kids/cover_Aladdin_1992.jpg”},“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”:""}}


#456

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!


(Mark C) #457

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
/Public/Videos/kids/Greatest_Showman_2017-PG.mp4
http://192.168.0.22:80/Public/Videos/kids/Greatest_Showman_2017-PG.mp4
http://192.168.0.22/Public/Videos/kids/Greatest_Showman_2017-PG.mp4
192.168.0.22/Public/Videos/kids/Greatest_Showman_2017-PG.mp4

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


(Tobias) #458

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:


(Tobias) #459

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: https://upload.wikimedia.org/wikipedia/en/1/10/The_Greatest_Showman_poster.png

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":"https://upload.wikimedia.org/wikipedia/en/1/10/The_Greatest_Showman_poster.png"},"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.


#460

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!


#461

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.


(Mark C) #462

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?


(Mark C) #463

tryed to refesh the version in the DH
image


(Tobias) #464

Ahm, this is odd.

So everything works again after reinstall?


(Tobias) #465

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.


(Mark C) #466

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


(DJAC) #467

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


(Jeff Lagana) #468

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?


(Brenen) #469

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?


(Tobias) #470

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.


(Tobias) #471

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.


(Tobias) #472

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.


(Jeff Lagana) #473

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

IDE Logs

cast-web-api logs

Thanks for the help!