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

cast-web-api-cli is ignoring -H parameter and defaulting to 127.0.0.1 #8

Open
coolsaber57 opened this issue Nov 6, 2019 · 4 comments

Comments

@coolsaber57
Copy link

coolsaber57 commented Nov 6, 2019

Hello,

I'm having some trouble getting cast-web-api-cli to use my host's IP address. I also tried using the -H parameter in this way:

cast-web-api-cli start -H 192.168.2.17

as well as adding sudo to the command, but upon startup, the status shows an IP of 127.0.0.1. Not sure if I'm missing something, but I looked at the log and didn't see anything that showed why it can't use my IP.

Edit: it's possible that it's just using the local address. Is it supposed to show my host's address?

@Phantomstarrh
Copy link

Phantomstarrh commented Nov 10, 2019

I am having the same issue. Would love to be able to change the address so I can use the system.
And just from looking in the cast-web-api out file the 127.0.0.1 address is a default address that can not be changed even with the -H command. That needs to be fixed so that everyone can use their own IP address. can you fix please Vervallsweg

@sk22
Copy link

sk22 commented May 18, 2020

same with the port number...

@sk22
Copy link

sk22 commented May 18, 2020

So, apparently, the shorthand arguments (-H, -p, etc.) don't work at all because the arguments get passed directly to the https://github.com/vervallsweg/cast-web-api/blob/master/api.js script.
According to https://github.com/vervallsweg/cast-web-api/blob/master/lib/config/config.js#L16-L30, only the full argument names are accepted:

  • autoConnect
  • reconnectTimeout
  • hostname
  • port
  • debug

As it seems, we can just use the full names, and it will work:

➜  ~ cast-web-api-cli --port 3240 --hostname test start
┌───────┬──────────────┬────────┬───────────┐
│ pid   │ name         │ status │ address   │
├───────┼──────────────┼────────┼───────────┤
│ 15331 │ cast-web-api │ online │ test:3240 │
└───────┴──────────────┴────────┴───────────┘

cc @Phantomstarrh and @coolsaber57, in case you still need this

sk22 pushed a commit to sk22/cast-web-api-cli that referenced this issue May 18, 2020
@stofakiller
Copy link

Hi

Found mine config.json at /usr/local/lib/node_modules/cast-web-api-cli/node_modules/cast-web-api/config/config.json

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

4 participants