Chromecast Unofficial API / Information - Google Chromecast

I have found random documents going over some of the raw curl commands that can be sent to chromecast, but it is by no means complete and various people saying they've been successful in doing things but not sharing how. Is there anywhere, or can we start a conversation to go over full details on this? I am hoping to build a two-way module for a home automation system that shows what is playing and other information.
Here is what I have so ar of-which not all of them are working for me yet.
get device information xml:
curl http://10.0.1.2:8008/ssdp/device-desc.xml
get detailed device information json:
curl http://10.0.1.2:8008/setup/eureka_info?options=detail
scan for available wifi:
curl http://10.0.1.2:8008/setup/scan_results
get supported time zones:
curl http://10.0.1.2:8008/setup/supported_timezones
get info about current app:
curl -H “Content-Type: application/json” http://10.0.1.2:8008/apps/YouTube -X GET
send youtube video to chromecast:
curl -H “Content-Type: application/json” http://10.0.1.2:8008/apps/YouTube -X POST -d ‘v=oHg5SJYRHA0′
kill current running app:
curl -H “Content-Type: application/json” http://10.0.1.2:8008/apps/YouTube -X DELETE
reboot the chromecast dongle:
curl -H “Content-Type: application/json” http://10.0.1.2:8008/setup/reboot -d ‘{“params”:”now”}’ -X POST
factory default reset the chromecast dongle:
curl -H “Content-Type: application/json” http://10.0.1.2:8008/setup/reboot -d ‘{“params”:”fdr”}’ -X POST

If you're looking for a comprehensive writeup of the Cast protocol take a look here:
https://github.com/jloutsenhizer/CR-Cast/wiki/Chromecast-Implementation-Documentation-WIP

has anyone made any further discoveries than this?
I'm particularly interested in implementing a play/pause capability, and I notice one developer mentioned his android remote app has this capablility, but did not mention exactly how it was achieved.
I'm assuming the use of the Ramp protocol will work on the youtube app still - so in order to play/pause I'd just need to implement that method in my app? Before I go down that route though, i wondered if anyone knows if that method still works, at least with the youtube app as of july 2014?

can anyone confirm if this method still works? I'm wondering if google has changed something here, as the video of a youtube vid sent the chromecast is no longer displayed since the 'guest feature' update. Video's sent to the chromecast this way now will only play audio with a full screen youtube logo on screen. Anyone else see this, and have any way around it yet?

Hi,I have a question about this. Do you know a way to configure the output signal of the chromecast?
I am looking for a way to force 720p instead of 1080p on my tv (got some hdmi EDID problems).
Kind regards,
Vincent

Is it possible somehow to get information about its current status. Mainly if its currently streaming or not?
I need this in order to automatically turn on my multi channel amplifier if any of my chromecast audios connected to it starts streaming.

dhanjel said:
Is it possible somehow to get information about its current status. Mainly if its currently streaming or not?
I need this in order to automatically turn on my multi channel amplifier if any of my chromecast audios connected to it starts streaming.
Click to expand...
Click to collapse
Did you ever find a solution to this?

Related

[Request] Vpn Mounted Music Path

It would be great it I could set my phone on my VPN, which is possible now. But have that path accessed by the default music player as well as the storage card.
I know the pictures inside the MP3 would need to be sync or blocked but a 3G connection can handle 320kbps streaming no problem which is close the highest bitrate for mp3's with out breaking compatibility.
This would rock
Please
1Way
look at the orb client.. that is what it does.. you can have a home server with orb and share your music and videos, photos etc. over the net even through a vpn with orb client..
i havent tried any clients on my n1 however..
woudl still want this feature made but in the meantime thats for the idea.
Never tried Orb
=)
*** EDIT ***
Orb isn't for me and it has tons of complaints and not looking to use 3rd party software on pc but thanks for the information.
i use orb for some things but yeah from what ive read the android client sucks
look at subsonic, its very quick and easy to set up, but you said no pc software....hmm, good luck and post something if you find it.
I'm looking at doing exactly this when I get my replacement Nexus One. Mine is getting swapped for a warranty replacement right now.
I'm 99% positive this will work too. It will go something like this:
1. Establish a VPN connection to my NAS box that houses my music collection
2. Mount the smb share using CIFS (requires a rooted device with modded kernel containing the cifs module, such as Enomther The Official), info on doing this can be found here: android.doshaska.net/cifs
3. Load up my favorite music app and steam all my tunes over 3G!
UPDATE: This works, sort of...
Alright, so I have my NAS box (Netgear Stora) mounted to my Nexus One file system using cifs. I'm running Enomther's TheOfficial froyo rom, which comes with the cifs module. Here are the commands I used to get it mounted:
prerequisites:
1. WIFI Connection to same lan that the NAS box is connected to (presumably this will work over VPN also, need to test) EDIT: Confirmed this works over VPN also.
2. Rom with CIFS module compiled for the kernel (I used Enomther's TheOfficial Nexus1 Froyo)
commands I used to mount:
can be done from terminal emulator app or ADB Shell.
obviously change the IP address, mount locations, username, and password to your needs.
1. insmod /system/lib/modules/2.6.32.16-TheOfficial/cifs.ko
2. chmod 0777 /data
3. mkdir /data/mounted
4. busybox mount -t cifs //192.168.1.141/MyLibrary /data/mounted -o username=user,password=pass
5. cd /
6. cd data
7. cd mounted
8. chmod 0777 *
After this, you will be about to browse the mounted files and folders under the /data/mounted location either from the terminal emulator, ADB Shell, or a file explorer app on the android phone.
HOWEVER, here is my current issue. Hopefully someone can help me out here.
I can browse my files and see MP3's from the terminal or file explorer apps, I can even click on an MP3 and load it up into my music apps and play it, I use Meridian Media Player. However, if I go into Meridian and browse folders from that app, can I go into my mounted shares and music folders, and I can see all files in there EXCEPT mp3's. They just don't show up through any media app I've tried. However, like I said, I can see them just fine from a file explorer app such as EStrongs or from the terminal. Anyone have any idea why?
bump, need help

[Q] is there any way to launch chrome on a chromecast from the shell?

I've got a rooted chromecast and I want to launch a browser and load a specific url instead of streaming a tab from another device. Normally you would use soemething like:
am start -a android.intent.action.VIEW -n com.android.chrome/.Main -d http://myurl.com
to launch chrome with a specific url on an android device...
but 'am' doesn't exist on the chromecast
there is a 'start' command available though....
is there any way to launch chrome on a chromecast from the shell?
WildSatchmo said:
I've got a rooted chromecast and I want to launch a browser and load a specific url instead of streaming a tab from another device. Normally you would use soemething like:
am start -a android.intent.action.VIEW -n com.android.chrome/.Main -d http://myurl.com
to launch chrome with a specific url on an android device...
but 'am' doesn't exist on the chromecast
there is a 'start' command available though....
is there any way to launch chrome on a chromecast from the shell?
Click to expand...
Click to collapse
Not as far as I know. The stock OS is not Android and lacks Android's concepts of Apps and Intents. Instead, Chrome is launched as part of a monolithic binary, /system/chrome/content_shell, at boot, which handles both the page rendering and the Google Cast protocol implementation.

Chromecast and Curl issue

hi,
I'm trying to use curl to play you tube videos with a post command e.g.
curl -v -H "Content-Type: application/json" 192.168.0.XX:8008/apps/YouTube -X POST -d ‘v=XXXXXX′
I've checked my ip address is correct, and that the v='XXX'' is a valid youtube video, but the YouTube app launches on the chromecast, flickers for a moment before refusing to play the video. Curl returns successfully without any errors. Has this been blocked on the chromecast now, or is there something I'm missing to get this working?
any pointers gratefully recieved.
Nevermind
got it working. no matter
offyoutoddle said:
got it working. no matter
Click to expand...
Click to collapse
What was the issue?
bhiga said:
What was the issue?
Click to expand...
Click to collapse
i stopped using curl, and just tried it in my app instead and it works.

[Windows] Cast any audio from your PC to your Chromecast

On the releases page of my Github Project you can download a test build to auto-cast your system audio to the Chromecast.
Run app.exe and it'll auto cast your system audio to the first Chromecast it finds!
Try it out, let me know what you think, and how to improve it!
Direct download link
p.s. I also made Videostream.
Thank you
nice one acidhax. how have you been since videostream? i noticed your no longer on that project.
The program works as expected, no issues with installation or use (Win 8.1 x64).
I noticed that the volume level is fairly low when casting to a Chromecast Audio, is there a way to change the volume that's broadcast that I've missed?
Also, would it theoretically be possible to run multiple instances of the app and have them find two separate Chromecast Audio devices, whilst broadcasting at the same time, or would the current setup create two different individual broadcasts, resulting in un-synced playing? No longer necessary as they've released multiroom, however am still curious as to whether there are volume control options.
Thanks!
Hi,
Interesting project! Can you provide support for command-line pipe support? I like to use with "Shairport4w" (http://sourceforge.net/projects/shairport4w/). This program has the option "Redirecting sound" that can launch and external tool that accept data (raw PCM audio) over default input pipe. As this project is based on NodeJS I hope this can be achieved.
What you think?
Troubleshooting Help
Very cool project. Rookie question but I am getting stuck here:
Example app listening at (ip address here)
Spawned Ffmpeg with command: ffmpeg =list_devices true -f dshow -i dummy pipe:1
VIRTUAL DEVICE FOUND
What should I be doing next?
not working for me nothing connect to my chromecast . no sound nothing only sound of my PC . windows 7 .
edit: sorry it work . did you know how to increase the volume of the chromecast ? thanx you
I have a Bluetooth speaker and but my TV has no Bluetooth . is there a way I count reroute the audio from the Chromecast to the Bluetooth speaker without using any cable or reroute to my computer - since my computer is wirelessly connected to the speaker by Bluetooth?
Any help will be appreciated
I use Plex almost all the time and I don't usually enjoy my movies since my tv sound is bad.
acidhax said:
you can download a test build to auto-cast your system audio to the Chromecast.
Run app.exe and it'll auto cast your system audio to the first Chromecast it finds!
Try it out, let me know what you think, and how to improve it!
p.s. I also made Videostream.
Click to expand...
Click to collapse
Nice! It's working for me on the new Chromecast. How do you 'stop' the app to get back to the Chromecast backdrop?
Also: Thank you so much for making Videostream - it's hands-down the best app for Chromecast!

How can I get a string title, artist for what my Chromecast is playing?

Hello everyone!
I like to work with LED signs and other fun display technologies and as much as I love my chromecast audio, sadly it has no way of displaying what it is currently playing. Now I know that this information must be somewhat publicly available because the Chromecast app for android can show me what content is playing from Spotify, even if the session is initiated by another client as you can see here:
(Well I can't post images because I'm a new user, use your imagination to see that I can start playing something from Spotify on another device and I'm still able to get cover art, title and artist name here in this native android chromecast app)
Anyway, I'm having trouble devising a way to fetch this information from the Chromecast, I'd really love to send it to some digital signage so I can keep tabs on what's playing, even if that's just say - a raspberry pi with an old VFD attached. So far I was able to use the node chromecast-cli to grab some rudimentary information from the device when it's playing stuff from Spotify. Here's what I get:
Code:
Komputer$ node chromecast-cli.js --host [IPaddress] status
{ applications:
[ { appId: 'CC32E753',
displayName: 'Spotify',
isIdleScreen: false,
namespaces: [Object],
sessionId: 'C6A14255-0DE0-44DE-9A06-BC9D07D33A53',
statusText: 'Spotify',
transportId: 'web-3' } ],
volume:
{ controlType: 'attenuation',
level: 0.7843137383460999,
muted: false,
stepInterval: 0.05000000074505806 } }
so um, most of this status information is painfully redundant, displayName and StatusText are both just 'Spotify' and right now I can't see any useful information about what's playing. So I'm left to assume that the namespaces object is encoded as JSON and potentially contains what I'm looking for, but I'm not sure as to how to actually get it and extract it and put it to good use - or I could be totally wrong and that contains nothing useful. Go figure, but either way I suppose someone here might have the experience needed here to shake this information out of the thing. This might only be pertinent to Spotify, but that's what I use 90% of the time so it's good either way, there might be a more generic string that can be fetched for whatever is playing. Any help would be greatly appreciated!
Thanks in advance!
I found the other library call castnow (github.com/xat/castnow) does the same thing as chromecast-cli, but it will showing Chromecast's current status, which includes duration, playhead time and the source of current playing. So I think you can make your own hook based on this library. Hope that helps.
ajhsu said:
I found the other library call castnow (github.com/xat/castnow) does the same thing as chromecast-cli, but it will showing Chromecast's current status, which includes duration, playhead time and the source of current playing. So I think you can make your own hook based on this library. Hope that helps.
Click to expand...
Click to collapse
Okay I'll look into it, hopefully it's a bit easier to query than the Python tool I've been using lately.
Thanks!

Categories

Resources