Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Query your local network for Chromecasts and have them play media (github.com/mafintosh)
128 points by albertzeyer on April 29, 2015 | hide | past | favorite | 28 comments


Seems like this does most of the work: https://github.com/thibauts/node-castv2-client


There's also a fascinating (in my opinion) write-up on the wire protocol, which was presumably reverse-engineered for this library: https://github.com/thibauts/node-castv2#protocol-description


Can anyone tell whether with this the Chromecast still needs to have an internet connection to work? In applications like digital signage would just want the Chromecast on a LAN - not with internet access.

I've had to roll my own stuff because of that limitation, which runs on a Raspberry PI plugged into the display. Would much rather have preferred to have a single Raspberry PI serving the content, and multiple chromecasts plugged into displays.


It does require internet access. The media can be streamed over the local network. But the apps that run on the Chromecast are downloaded from the internet.

It should be possible for the receiver app to come from local URL. Or the Chromecast to cache the app. But neither of those are currently supported.


it should work without internet connection


I think you are talking about the posted project.

The CC itself will refuse to boot without an internet connection ..

Once it booted, it provides a limited offline functionality; if it requires to load `appID` from the internet, and it's not connected: it will block

Also since last February update, you need an internet connection to stream local content ..

I'm sorry Dave, you cant do that


> Also since last February update, you need an internet connection to stream local content ..

I assume it phones home to Google?


Yep.

In order to develop for the platform, you need to register your application[0], and your device[1]. Also you cannot even run your own application without getting google's approval[2], which costs $5..

Then, at runtime, the device will first validate that the app you are trying to run was validated, sending the `AppID` to google.

0: https://developers.google.com/cast/docs/registration#Registe...

1: https://developers.google.com/cast/docs/registration#Registe...

2: https://cast.google.com/publish/


Wow, that's draconian. Are there any devices a bit more open that are in the same price range and support the same feature set?


so far I am very happy with the raspberry pi as a homebrew platform ..

PROS:

- ports: 1x wired net, 4x usb 2.0

- runs linux, super easy to extend/modify (access via ssh from other devices)

- super reliable, with uptimes of months

CONS:

- bigger in size, and not beautiful without a case (except if you like electronic pr0n)

- requires an HDMI cable

- requires an external power source


Can the raspberry pi run off a TV's USB port similar to the Chromecast?


I have had issues running a wifi dongle when connecting using the tv's usb port - admittedly this is with the old version and not the new one with the updated power circuitry.

However, I have had no issues using usb power from the tv with a LAN connection - this is using Kodi which I suspect will increase the power pull. YMMV



Yes, I agree. But does it?

It has not, in my experience, worked this way with other applications. Does it with this one?

edit: Oops, you are the creator... haha. I will now insert my foot in my mouth.


That is an awesome library. It didn't see any sort of documentation, but I imagine that this does not work on a local library, correct? I believe at some point I heard that there were some DNS settings on the Chromecast that couldn't be changed?

Personally, I'm really looking forward to someone creating some sort of an open-source receiver clone that I can install on my Nvidia Jetson or some other SoC. I would love to be able to use it as a (fully supported) Chromecast without the need to actually buy additional Chromecasts. I've been looking at it as a way to add decent audio and video control to a home automation system I'm building, but nothing is as easy as the Chromecast.


Unfortunately, Crestron-style systems are still the only way to go if you want a system that you don't have to babysit too much. They support wireless or wired HDMI across multiple inputs and outputs. But they're pretty expensive (a few thousand dollars per room) so most people don't bother.

Something like Chromecast works ok, but there's no easy way to swap back to other inputs (e.g. a game console) without a remote. Chromecast also has some significant input lag (a second or two) when issuing commands to it.


Maybe you can create a local dns entry on your home router, of, if google sets 8.8.8.8 on chomecasts, you can pass a "http://192.168.1.2/npm-web-server/video.mp4" ?


I honestly don't know how the Chromecast is set up. Would that prevent me from being able to access Google Play content? I seem to be able to Cast to Amazon FireTV sticks and PS4s, though I have no idea if they work since I don't have one, nor do I know if that even works.


See also castnow, which is a node based chromecast client.

https://github.com/xat/castnow


How is this different from something like BubbleuPnP or Plex? No GUI? I'm not a developer so a lot of what I see when I click through to Github is gobbledygook.


The benefit of this library is being able to play media on multiple chromecasts on the same network. So using this, a developer could create a Plex-style app for casting to multiple TVs. One use case could be digital signage at an event, where you'd want to control all TVs from one console.


It's not supposed to be a media center software, it's just casting content to Chromecasts that announce their presence in the local network.


What you guys think about pairing this awesome lib with github electron and creating a local local library desktop app?

Like a mini-plex!


We created this actually. It's called Playback.

https://github.com/mafintosh/playback


This seems like a great start of having an alternative to Airplay, particularly the ability to discover all local Chromecasts, and play media to them selectively. Would be interesting to see if any latency issues popup in regards to media 'start' times.


Nice! So, nodejs on Android to run this from my phone, would I want this? https://github.com/ldesegur/nodejs-android



as




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: