Initial chromecast testing has revealed that it is a DIAL device and sniffing shows several interesting commands that can be sent to it.
The chromecast dongle is apparently listening on http port 8008. (Also port 9080 while Netflix app is running)
Some control can be established by sending simple HTTP GET’s, POST’s and DELETE’s.
** For these examples the youtube app is running, also available are Netflix, ChromeCast, and GoogleMusic.
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
Hopefully more to come… Focusing on the websocket connections now
I would like to be able to send commands (power, volume, source) to the tv through the hdmi-cec connection of the chromecast.
You see this? http://blog.gtvhacker.com/2013/chromecast-exploiting-the-newest-device-by-google/
Awesome post! Please update the post if you discover how to cast arbitrary URLs using curl.
how did you find these commands? I’m looking for a way to be able to pause/play/stop/next/prev at least. I love the chromecast but I would like to be able to have at least these basic controls on my universal remote (ip packets using IR to IP conversion). Having control of the CEC would be awesome too!
Also, I tried some of the commands and they did not all work. The send youtube, reboot, reset did not work for me. youtube loads the youtube app but no video starts playing.
I’d like to see the chromecast made able to take input from the HDMI-CEC to enable pausing and other functions from the tv remote.
A small notice on the side: as I found, ChromeCast doesn’t use JSON, it’s using XML for most REST based services ;).
another URL:
GET http://IP_ADDRESS:8008/setup/eureka_info
gets device setup information, format is JSON.