I got the function that gets the local ip working.