Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please provide automation capabilities #7

Closed
JustDan1979 opened this issue Aug 23, 2013 · 10 comments
Closed

Please provide automation capabilities #7

JustDan1979 opened this issue Aug 23, 2013 · 10 comments

Comments

@JustDan1979
Copy link

I would be very happy if I could script or perhaps use a web call to the running Fling app to start a video on my ChromeCast.

Here's how things would ideally work:
Start Fling, it'll start a web service providing these calls at minimum:

getChromeCasts returns a page with an id and a description of each chromecast discovered.
startStreaming?id=1&file="C:\tmp\video.mpg" (url escaped of course)

Doing this would allow for me to write a simple .net app that I can browse with my phone, and in the future an android app that allows me to select a video file and launches it on the ChromeCast.

Alternatively, a command line option would work as well, but would be a bit more clunky.

@NoRulesJustFeels
Copy link
Owner

Caster supports both a command-line interface and a REST API: https://github.com/entertailion/Caster

@JustDan1979
Copy link
Author

That's exactly what I want. Is it working with the latest changes from
Google? I tried putting in my api key, but no devices get returned. I tried
both my server IP and 192.168.1.255 for broadcast_ip and still nothing gets
returned.

On Wed, Sep 4, 2013 at 7:49 AM, Leon Nicholls notifications@github.comwrote:

Caster supports both a command-line interface and a REST API:
https://github.com/entertailion/Caster


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-23786313
.

@NoRulesJustFeels
Copy link
Owner

Caster does not have a broadcast_ip option.

@JustDan1979
Copy link
Author

There's a hardcoded broadcast ip of 239.255.255.250.. leaving that or
changing it to 192.168.1.255 to match my subnet do not work.

java -jar caster.jar -l -v -id "my app key"
Main: that app key
Sep 04, 2013 11:20:21 PM com.entertailion.java.caster.Log i
INFO: BroadcastDiscoveryClient: Starting client on address /239.255.255.250
Main: discoveringDevices
Sep 04, 2013 11:20:21 PM com.entertailion.java.caster.Log i
INFO: BroadcastDiscoveryClient: Broadcast client thread starting.
Main: discoveredDevices
Sep 04, 2013 11:20:31 PM com.entertailion.java.caster.Log i
INFO: BroadcastDiscoveryClient: Exiting client loop.

On Thu, Sep 5, 2013 at 5:46 AM, Leon Nicholls notifications@github.comwrote:

Caster does not have a broadcast_ip option.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-23859284
.

@NoRulesJustFeels
Copy link
Owner

The broadcast ip is required for the discovery protocol and shouldn't be changed.
What is your computer's IP address and your ChromeCast IP address?

@JustDan1979
Copy link
Author

Computer: 192.168.1.105
ChromeCast: 192.168.1.143

On Thu, Sep 5, 2013 at 7:37 AM, Leon Nicholls notifications@github.comwrote:

The broadcast ip is required for the discovery protocol and shouldn't be
changed.
What is your computer's IP address and your ChromeCast IP address?


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-23864389
.

@NoRulesJustFeels
Copy link
Owner

The router might be blocking the broadcast messages. Try the "-d" option to play media on the device by specifying the ip address.

@JustDan1979
Copy link
Author

Still not having any luck. anything jump out at you?
Here's the command I tried:
java -jar caster.jar -id "603209f1-9b65-4a23-968b-52f3ad6f96eb" -d
"192.168.1.143" -f "c:\test.avi" -v

Here's the response:
Main: 603209f1-9b65-4a23-968b-52f3ad6f96eb
Main: 192.168.1.143
Main: c:\test.avi
Playback: play: com.entertailion.java.caster.RampClient@1739422b
Platform: prefix=192.
Platform: interface=lo
Platform: address=/127.0.0.1
Platform: address=/0:0:0:0:0:0:0:1
Platform: interface=net0
Platform: interface=net1
Platform: interface=net2
Platform: interface=net3
Platform: interface=ppp0
Platform: interface=eth0
Platform: interface=eth1
Platform: interface=eth2
Platform: interface=eth3
Platform: interface=ppp1
Platform: interface=eth4
Platform: interface=net4
Platform: address=/fe80:0:0:0:0:5efe:c0a8:3801%13
Platform: interface=net5
Platform: address=/fe80:0:0:0:0:100:7f:fffe%14
Platform: interface=eth5
Platform: interface=eth6
Platform: interface=net6
Platform: interface=eth7
Platform: interface=net7
Platform: interface=eth8
Platform: interface=eth9
Platform: address=/192.168.56.1
Platform: networkAddress=/192.168.56.1
Playback: Started web server on port 8080
Playback: mediaUrl=http://192.168.56.1:8080/video.avi
RampClient: get response code=204
RampClient: device=http://192.168.1.143:8008
RampClient: apps url=http://192.168.1.143:8008/apps/
RampClient: get response code=204
RampClient: get response code=200
RampClient: get response=

603209f1-9b65-4a23-968b-52f3ad6f96eb

stopped

RampClient: state=stopped
RampClient: post response code=201
RampClient: post response=
RampClient: post response location=
http://192.168.1.143:8008/apps/603209f1-9b65-
4a23-968b-52f3ad6f96eb/web-11
RampClient: Access-Control-Allow-Methods=GET, POST, DELETE, OPTIONS
RampClient: Access-Control-Expose-Headers=Location
RampClient: Location=
http://192.168.1.143:8008/apps/603209f1-9b65-4a23-968b-52f3
ad6f96eb/web-11
RampClient:
Access-Control-Allow-Origin=chrome-extension://boadgeojelhgndaghljhd
icfkmllpafd
RampClient: Content-Length=0
RampClient: get response code=200
RampClient: get response=

603209f1-9b65-4a23-968b-52f3ad6f96eb

running

RampClient: state=running
RampClient: connectionServiceUrl=null
RampClient: protocol=null
RampClient: get response code=200
RampClient: get response=

603209f1-9b65-4a23-968b-52f3ad6f96eb

stopped

RampClient: state=stopped
RampClient: connectionServiceUrl=null
RampClient: protocol=null
Sep 05, 2013 7:53:46 PM com.entertailion.java.caster.Log i
INFO: RampClient: connectionServiceUrl is null

On Thu, Sep 5, 2013 at 7:47 AM, Leon Nicholls notifications@github.comwrote:

The router might be blocking the broadcast messages. Try the "-d" option
to play media on the device by specifying the ip address.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-23864906
.

@NoRulesJustFeels
Copy link
Owner

Looks like you have another live network interface 192.168.56.1
That is being selected for the local streaming address instead
of 192.168.1.105

On Thu, Sep 5, 2013 at 7:55 PM, JustDan1979 notifications@github.comwrote:

Still not having any luck. anything jump out at you?
Here's the command I tried:
java -jar caster.jar -id "603209f1-9b65-4a23-968b-52f3ad6f96eb" -d
"192.168.1.143" -f "c:\test.avi" -v

Here's the response:
Main: 603209f1-9b65-4a23-968b-52f3ad6f96eb
Main: 192.168.1.143
Main: c:\test.avi
Playback: play: com.entertailion.java.caster.RampClient@1739422b
Platform: prefix=192.
Platform: interface=lo
Platform: address=/127.0.0.1
Platform: address=/0:0:0:0:0:0:0:1
Platform: interface=net0
Platform: interface=net1
Platform: interface=net2
Platform: interface=net3
Platform: interface=ppp0
Platform: interface=eth0
Platform: interface=eth1
Platform: interface=eth2
Platform: interface=eth3
Platform: interface=ppp1
Platform: interface=eth4
Platform: interface=net4
Platform: address=/fe80:0:0:0:0:5efe:c0a8:3801%13
Platform: interface=net5
Platform: address=/fe80:0:0:0:0:100:7f:fffe%14
Platform: interface=eth5
Platform: interface=eth6
Platform: interface=net6
Platform: interface=eth7
Platform: interface=net7
Platform: interface=eth8
Platform: interface=eth9
Platform: address=/192.168.56.1
Platform: networkAddress=/192.168.56.1
Playback: Started web server on port 8080
Playback: mediaUrl=http://192.168.56.1:8080/video.avi
RampClient: get response code=204
RampClient: device=http://192.168.1.143:8008
RampClient: apps url=http://192.168.1.143:8008/apps/
RampClient: get response code=204
RampClient: get response code=200
RampClient: get response=

603209f1-9b65-4a23-968b-52f3ad6f96eb

stopped

RampClient: state=stopped
RampClient: post response code=201
RampClient: post response=
RampClient: post response location=
http://192.168.1.143:8008/apps/603209f1-9b65-
4a23-968b-52f3ad6f96eb/web-11
RampClient: Access-Control-Allow-Methods=GET, POST, DELETE, OPTIONS
RampClient: Access-Control-Expose-Headers=Location
RampClient: Location=
http://192.168.1.143:8008/apps/603209f1-9b65-4a23-968b-52f3
ad6f96eb/web-11
RampClient:
Access-Control-Allow-Origin=chrome-extension://boadgeojelhgndaghljhd
icfkmllpafd
RampClient: Content-Length=0
RampClient: get response code=200
RampClient: get response=

603209f1-9b65-4a23-968b-52f3ad6f96eb

running

RampClient: state=running
RampClient: connectionServiceUrl=null
RampClient: protocol=null
RampClient: get response code=200
RampClient: get response=

603209f1-9b65-4a23-968b-52f3ad6f96eb

stopped

RampClient: state=stopped
RampClient: connectionServiceUrl=null
RampClient: protocol=null
Sep 05, 2013 7:53:46 PM com.entertailion.java.caster.Log i
INFO: RampClient: connectionServiceUrl is null

On Thu, Sep 5, 2013 at 7:47 AM, Leon Nicholls notifications@github.comwrote:

The router might be blocking the broadcast messages. Try the "-d" option
to play media on the device by specifying the ip address.


Reply to this email directly or view it on GitHub<
https://github.com/entertailion/Fling/issues/7#issuecomment-23864906>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-23912433
.

@JustDan1979
Copy link
Author

You were right. I stopped a virtual nic, and I found out something else was
using port 8080, and stopped that service. When your app is running I start
a download of video.avi when I go to 192.168.1.105:8080/video.avi on my pc,
so that's apparently working fine.

Here's the latest dump:
Main: 603209f1-9b65-4a23-968b-52f3ad6f96eb
Main: 192.168.1.143
Main: c:\test.avi
Playback: play: com.entertailion.java.caster.RampClient@3c97e111
Platform: prefix=192.
Platform: interface=lo
Platform: address=/127.0.0.1
Platform: address=/0:0:0:0:0:0:0:1
Platform: interface=net0
Platform: interface=net1
Platform: interface=net2
Platform: interface=net3
Platform: interface=ppp0
Platform: interface=eth0
Platform: interface=eth1
Platform: interface=eth2
Platform: interface=eth3
Platform: interface=ppp1
Platform: interface=eth4
Platform: interface=net4
Platform: interface=net5
Platform: address=/2001:0:4137:9e76:4b1:5a9:cde4:3369
Platform: address=/fe80:0:0:0:4b1:5a9:cde4:3369%14
Platform: interface=eth5
Platform: interface=eth6
Platform: interface=net6
Platform: interface=eth7
Platform: interface=net7
Platform: interface=eth8
Platform: interface=eth9
Platform: interface=eth10
Platform: interface=eth11
Platform: interface=eth12
Platform: address=/192.168.1.105
Platform: networkAddress=/192.168.1.105
Playback: Started web server on port 8080
Playback: mediaUrl=http://192.168.1.105:8080/video.avi
RampClient: get response code=204
RampClient: device=http://192.168.1.143:8008
RampClient: apps url=http://192.168.1.143:8008/apps/
RampClient: get response code=204
RampClient: get response code=200
RampClient: get response=

603209f1-9b65-4a23-968b-52f3ad6f96eb

stopped

RampClient: state=stopped
RampClient: post response code=201
RampClient: post response=
RampClient: post response location=
http://192.168.1.143:8008/apps/603209f1-9b65-
4a23-968b-52f3ad6f96eb/web-25
RampClient: Access-Control-Allow-Methods=GET, POST, DELETE, OPTIONS
RampClient: Access-Control-Expose-Headers=Location
RampClient: Location=
http://192.168.1.143:8008/apps/603209f1-9b65-4a23-968b-52f3
ad6f96eb/web-25
RampClient:
Access-Control-Allow-Origin=chrome-extension://boadgeojelhgndaghljhd
icfkmllpafd
RampClient: Content-Length=0
RampClient: get response code=200
RampClient: get response=

603209f1-9b65-4a23-968b-52f3ad6f96eb

running

RampClient: state=running
RampClient: connectionServiceUrl=null
RampClient: protocol=null
RampClient: get response code=200
RampClient: get response=

603209f1-9b65-4a23-968b-52f3ad6f96eb

stopped

RampClient: state=stopped
RampClient: connectionServiceUrl=null
RampClient: protocol=null
Sep 05, 2013 8:08:39 PM com.entertailion.java.caster.Log i
INFO: RampClient: connectionServiceUrl is null

On Thu, Sep 5, 2013 at 8:03 PM, Leon Nicholls notifications@github.comwrote:

Looks like you have another live network interface 192.168.56.1
That is being selected for the local streaming address instead
of 192.168.1.105

On Thu, Sep 5, 2013 at 7:55 PM, JustDan1979 notifications@github.comwrote:

Still not having any luck. anything jump out at you?
Here's the command I tried:
java -jar caster.jar -id "603209f1-9b65-4a23-968b-52f3ad6f96eb" -d
"192.168.1.143" -f "c:\test.avi" -v

Here's the response:
Main: 603209f1-9b65-4a23-968b-52f3ad6f96eb
Main: 192.168.1.143
Main: c:\test.avi
Playback: play: com.entertailion.java.caster.RampClient@1739422b
Platform: prefix=192.
Platform: interface=lo
Platform: address=/127.0.0.1
Platform: address=/0:0:0:0:0:0:0:1
Platform: interface=net0
Platform: interface=net1
Platform: interface=net2
Platform: interface=net3
Platform: interface=ppp0
Platform: interface=eth0
Platform: interface=eth1
Platform: interface=eth2
Platform: interface=eth3
Platform: interface=ppp1
Platform: interface=eth4
Platform: interface=net4
Platform: address=/fe80:0:0:0:0:5efe:c0a8:3801%13
Platform: interface=net5
Platform: address=/fe80:0:0:0:0:100:7f:fffe%14
Platform: interface=eth5
Platform: interface=eth6
Platform: interface=net6
Platform: interface=eth7
Platform: interface=net7
Platform: interface=eth8
Platform: interface=eth9
Platform: address=/192.168.56.1
Platform: networkAddress=/192.168.56.1
Playback: Started web server on port 8080
Playback: mediaUrl=http://192.168.56.1:8080/video.avi
RampClient: get response code=204
RampClient: device=http://192.168.1.143:8008
RampClient: apps url=http://192.168.1.143:8008/apps/
RampClient: get response code=204
RampClient: get response code=200
RampClient: get response=

603209f1-9b65-4a23-968b-52f3ad6f96eb

stopped

RampClient: state=stopped
RampClient: post response code=201
RampClient: post response=
RampClient: post response location=
http://192.168.1.143:8008/apps/603209f1-9b65-
4a23-968b-52f3ad6f96eb/web-11
RampClient: Access-Control-Allow-Methods=GET, POST, DELETE, OPTIONS
RampClient: Access-Control-Expose-Headers=Location
RampClient: Location=
http://192.168.1.143:8008/apps/603209f1-9b65-4a23-968b-52f3
ad6f96eb/web-11
RampClient:
Access-Control-Allow-Origin=chrome-extension://boadgeojelhgndaghljhd
icfkmllpafd
RampClient: Content-Length=0
RampClient: get response code=200
RampClient: get response=

603209f1-9b65-4a23-968b-52f3ad6f96eb

running

RampClient: state=running
RampClient: connectionServiceUrl=null
RampClient: protocol=null
RampClient: get response code=200
RampClient: get response=

603209f1-9b65-4a23-968b-52f3ad6f96eb

stopped

RampClient: state=stopped
RampClient: connectionServiceUrl=null
RampClient: protocol=null
Sep 05, 2013 7:53:46 PM com.entertailion.java.caster.Log i
INFO: RampClient: connectionServiceUrl is null

On Thu, Sep 5, 2013 at 7:47 AM, Leon Nicholls notifications@github.comwrote:

The router might be blocking the broadcast messages. Try the "-d"
option
to play media on the device by specifying the ip address.


Reply to this email directly or view it on GitHub<
https://github.com/entertailion/Fling/issues/7#issuecomment-23864906>
.


Reply to this email directly or view it on GitHub<
https://github.com/entertailion/Fling/issues/7#issuecomment-23912433>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-23912681
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants