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

Internal variable to show actual ip(s) #987

Closed
hsteppke opened this issue Feb 16, 2020 · 5 comments
Closed

Internal variable to show actual ip(s) #987

hsteppke opened this issue Feb 16, 2020 · 5 comments
Labels
area/internal Related to an internal action or function of Companion. Enhancement New feature or request

Comments

@hsteppke
Copy link

Feature Request to get an internal variable, to be displayed on a button,
like internal:bind_ip but based on the real IP at a given time. (not the config value which is 0.0.0.0 on the pi)

I want my raspberry when it starts with and old config and the Stream deck is attached to it it could show the IP...

This request is very unimportant as i use Static IPs most of the time but think its is maybe usefull if people use DHCP.

@josephdadams
Copy link
Member

Relates to #539

@josephdadams josephdadams added Enhancement New feature or request area/internal Related to an internal action or function of Companion. labels Feb 17, 2020
@hsteppke
Copy link
Author

I see, relates but is much different i belive in complexity.
The other request talks about change the bindings to different IPs for modules.

This one is only to expose the IP the server_http for the GUI currently binds to as a variable.
So i (without understanding all the details of the different modules) would place a variable push where the server actually rebinds. Or if i read correctly in the bitfocus-companion/index.js there is also a callback for ip_rebindings, if the IP is available there it would be optimal to push it there. I even think in a none PIP headless world that would actual happen as the config IP is the actually IP but for headless it is 0.0.0.0 and thats what is pushed once to the variables.

@JeffreyDavidsz
Copy link
Member

I have added a first_ip and an all_ip as variable in the latest build. The first variable is the one returned first from getting all interfaces, which should be the priority 1 interface. If its the wrong one you could check the others.

@jarodwsams
Copy link
Collaborator

Just adding a comment here in case anyone stumbles across it. In the current build (2.0.0 (62b280c-2271)), the variable for returning IP address for specific interfaces is:
eth0 -> $(internal:eth0)
bind -> $(internal:bind_ip) (useless when using CompanionPi
all IP -> $(internal:all_ip)

@JeffreyDavidsz Do you think it would be helpful to have a running list of internal variables somewhere? Maybe in the wiki but also somewhere in the Companion web interface? Or am I late to the party and that already exists somewhere?

@JeffreyDavidsz
Copy link
Member

Whel when you type $( you'll get all the variables. At the moment all interfaces your system has are in that list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/internal Related to an internal action or function of Companion. Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants