Closed MatthewScholefield closed 8 years ago
I think there's probably value in being more concise when there's no information (for example, excluding the wlan interface description in your example above). A "best guess" implementation would need to be extended to support specific interface querying, or listing interfaces, or listing connected interfaces, etc.
For example,
mycroft, what's my wireless ip address
@clusterfudge I agree. Do you think it's reasonable to assume wlan[0-9] is wireless and eth[0-9] is ethernet?
And if the user only asks for its IP address and multiple have valid IPs I was thinking it would select the top one.
One problem with that is that many wireless interfaces are enumerated as wlp3s0 or similar these days. I bet there is another way to discern what type of connection a NIC actually is.
Even though this skill mostly exists to enable a user to configure a headless mycroft unit, I would say gather the info from the kernel. Also, there is no wlan0 in Windows or OSX
On top of that: What if your unit was connected to a vpn, or some other means. This skill really seems mostly useful on the unit and more of a novelty on say, the desktop... Since the pi3 is always eth0 or wlan0, maybe that would work. It just seems to generic of a thing to me. If I want nic info I can use ifconfig and get all active interfaces, I don't mind the verbosity. If I connect a unit to ethernet, I want it's eth0 ip. If I connect it to wifi, I want it's wlan0 ip.
Maybe the default route is the ticket!
@aatchison What about having the only change be that interfaces without an IP address would be excluded?
That sounds much more useful than empty IPs or local host, while not excluding connected interfaces, whatever they may be ;) On Jun 17, 2016 12:54 AM, "Matthew D. Scholefield" notifications@github.com wrote:
@aatchison https://github.com/aatchison What about having the only change be that interfaces without an IP address would be excluded?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MycroftAI/mycroft-core/issues/160#issuecomment-226686461, or mute the thread https://github.com/notifications/unsubscribe/AIJOO1Ta4LxfJrD9LsBgr24C3guUnswoks5qMjaNgaJpZM4I38TQ .
Exclude interfaces without an IP address, and format the output so that it reads more naturally (replacing "." with "dot", for instance).
Assigned to @ethanaward
Addressed by #170.
When only asking "what is your ip address" I think the response should be a single, best-guess answer such as
192.168.80.51 on eth0
. Currently for each interface mycroft givesinterface: eth0, I.P. Address : 10.42.0.15
followed byinterface: wlan0, I.P. Address : No IP addr