pushmatrix
pushmatrix

Reputation: 746

How to programmatically launch a chromecast app from command line

I want to launch a Chromecast app but NOT using the chrome extension or iOS or Android. Doing this from command line.

I noticed that you can send a POST to your chromecast, and it will launch an app. For example if I do

curl -H “Content-Type: application/json” http://CHROMECAST_IP:8008/apps/YouTube -X POST -d ‘v=oHg5SJYRHA0′

Then it will start up youtube.

But for some reason I can't do this with custom apps (in dev mode). I thought I'd be able to send a POST to http://CHROMECAST_IP:8008/apps/MY_REGISTERED_APP_ID, but no luck. I just get a 404 response. Hmmm...

My app is just a simple webpage (it is not streamed media). I want to run a little headless server that starts my chromecast app everyday via a CRON task.

Any help is greatly appreciated! Thanks :)

Upvotes: 6

Views: 11241

Answers (2)

vitalidze
vitalidze

Reputation: 1082

You can use nodecastor, which works fine with newest V2 protocol and has a command line version located under bin folder. It can run an app with specified identifier.

Upvotes: 0

Ali Naddaf
Ali Naddaf

Reputation: 19074

All the apps that use the official Cast SDK cannot be launched from command line.

Upvotes: 3

Related Questions