Im still trying to figure this out and basically we would need to do some sort of webapp integration for per md.
Chromecast device is nothing more than a webapp (or fake one sending http calls as needed) to both receive and send the chromecast commands. where I got stuck was how I would go about faking a web app. Well that and any extra dev cycles not named qorbiter say phillips hue...