

Query your local network for Chromecasts and have them play media - albertzeyer
https://github.com/mafintosh/chromecasts

======
darkstar999
Seems like this does most of the work: [https://github.com/thibauts/node-
castv2-client](https://github.com/thibauts/node-castv2-client)

~~~
apendleton
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](https://github.com/thibauts/node-castv2#protocol-description)

------
mailslut
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.

~~~
mafintosh
it should work without internet connection

~~~
eridal
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_

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

I assume it phones home to Google?

~~~
eridal
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...](https://developers.google.com/cast/docs/registration#RegisterApp)

1:
[https://developers.google.com/cast/docs/registration#Registe...](https://developers.google.com/cast/docs/registration#RegisterDevice)

2: [https://cast.google.com/publish/](https://cast.google.com/publish/)

~~~
toomuchtodo
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?

~~~
eridal
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

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

~~~
ddmf
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

------
johladam
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.

~~~
xfalcox
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"](http://192.168.1.2/npm-web-server/video.mp4") ?

~~~
johladam
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.

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

[https://github.com/xat/castnow](https://github.com/xat/castnow)

------
Nowyouknow
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.

~~~
ohitsdom
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.

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

Like a mini-plex!

~~~
freeall
We created this actually. It's called Playback.

[https://github.com/mafintosh/playback](https://github.com/mafintosh/playback)

------
NeutronBoy
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.

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

------
platz
also [http://greenscreen.io/](http://greenscreen.io/)

------
asw13
as

