1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Solved OctoPi/OctoPrint Static IP & hostname

Discussion in 'General Questions' started by KTMDirtFace, Sep 5, 2016.

Thread Status:
Not open for further replies.
  1. KTMDirtFace

    KTMDirtFace Well-Known Member

    Joined:
    May 18, 2015
    Messages:
    1,247
    Likes Received:
    461
    Don't know if this is the place to ask this.

    Trying to get my Pi/Octoprint to have a static IP.

    I commented all the stuff out in octopi-network.txt

    and put it in /etc/network/interfaces instead like this

    Code:
    auto wlan0
    allow-hotplug wlan0
    iface wlan0 inet static
    address 192.168.1.130
    netmask 255.255.255.0
    gateway 192.168.1.1
    wpa-ssid "Something"
    wpa-psk "Something"
    
    It seems to work but if i go into my router and refresh or look at "Networking" in windows explorer it seems to be doing DHCP and static at the same time.. I see the IP switching from something like 192.168.1.4 ( old DHCP address ) and 192.168.1.130 ( new static )

    I can access it from both address's.

    Another problem is I cannot get it to show up with a diffrent hostname in my router. ( I have two Octopi's and they both show up as Octopi in my router.. even though I changed its name to "R1Plus"

    I followed this to change my hostname http://www.howtogeek.com/167195/how-to-change-your-raspberry-pi-or-other-linux-devices-hostname/

    I also changed it in raspberry-config.. but it still shows up as octopi in my router.
     
  2. KTMDirtFace

    KTMDirtFace Well-Known Member

    Joined:
    May 18, 2015
    Messages:
    1,247
    Likes Received:
    461
    Scratch my hostname question, I just renamed it in my router. ( the name i gave it on the pi itself shows up in explorer..just the router wasn't looking at that I guess? )

    Still not sure why im seeing the IP changing though.
     
  3. Rigmarol

    Rigmarol Well-Known Member

    Joined:
    May 14, 2016
    Messages:
    544
    Likes Received:
    280
    Why do you need a static IP?
    DHCP should work for you unless you are trying to access it from outside your network.
    No help, just curious.

    I have a friend at work who uses Octi to access his printer from work. I can ask what he is doing if you like?
     
  4. KTMDirtFace

    KTMDirtFace Well-Known Member

    Joined:
    May 18, 2015
    Messages:
    1,247
    Likes Received:
    461
    At the very least so I can bookmark it with my logins. and not have to re-log in and go into my router to figure out what its IP is to connect to it even locally. As it is now if I unplug one for awhile it gets a diffrent IP and i have to go find my passwords because google chrome looses it since it has a new IP.

    I have two of them as well.

    Dont know if I will expose it remotely, maybe the webcam.

    It appears to be working now, but my router is acting weird with the IP going from Static to DHCP like its confused and trying to do both at once.
     
  5. Rigmarol

    Rigmarol Well-Known Member

    Joined:
    May 14, 2016
    Messages:
    544
    Likes Received:
    280
    I'll ask my friend to see if he knows anything.
     
  6. KTMDirtFace

    KTMDirtFace Well-Known Member

    Joined:
    May 18, 2015
    Messages:
    1,247
    Likes Received:
    461
    I have it all working, can access it now from the internet, webcam ps3 eye even works.

    Still is doing the weird two IP/switching thing if i refresh the router's connected device pages. But seems to work anyway.
     
  7. Rigmarol

    Rigmarol Well-Known Member

    Joined:
    May 14, 2016
    Messages:
    544
    Likes Received:
    280
    Ok, good.

    Sent from my SM-N910P using Tapatalk
     
Thread Status:
Not open for further replies.

Share This Page