I had trouble several weeks ago connecting my OctoPrint pi to my network - the pi was not recognized on my network when using Octopi. With help from this forum, I eventually established connection and obtained an IP address. However, now whenever I turn the pi off and then turn it back on, the network address (url) changes. I have to search for it again with Angry IP and the address is always different. I can connect to my network and ssh into it with no problem until I turn the pi off. Then it gets reassigned a new address the next time I turn the pi on. What is causing this to happen?
What did you already try to solve it?
I have tested this in several ways so that I know this only occurs when I power off/on the pi. This could be a network issue but I wanted to see if there is some configuration in one of the files that I need to change. I have tried to get logs but am not sure how to word the command in ssh for the syslog. I can get into ssh but I am not very good at navigating. If a solution requires me to change something via ssh, please provide complete directions.
Additional information about your network (Hardware you are trying to connect to, hardware you are trying to connect from, router, access point, used operating systems, ...)hanging IP Address with OctoPrint
Windows 10 Pro computer. Raspberry Pi 4B (4 GB). Nighthawk RAX80 router. IP address of pi is 192.168.1.xx (last number changes every time I reboot the pi).
Most likely the IP address is dynamically assigned using DHCP from the router. I don't know this router but normally you can assign a fixed IP address to a MAC address. You have to configure this in the router so that DHCP gives the same IP address every time the rpi asks during boot.
I would guess the problem is with the router and it's DHCP server. Normally, the DHCP server will remember the IP address it assigned the last time and will give out the same address.
The router should have a web interface which you can use to assign a fixed lease for the RPi.
The issue of not being able to use the name of the RPi (octopi) again has to do with the router. It should be providing itself as the DNS server for your network and it should be adding names from client DHCP requests to its own DNS database. Again, these may be options you can configure from the router's web interface.
Sounds like your DHCP server is short-leasing. Log into your DHCP server (armed with the MAC address information from your Pi's wifi adapter) and issue a static IP address.
You could use my ipOnConnect plugin and as long as your port is configured when the pi comes online and connects to the printer it will display the ip address on the printer's LCD.
While you can't post text files directly, you should be able to post .zip files.
Back to the original issue... The manual for your router is here. Page 61 describes how to assign a reserved IP address to a device on your network.
How to configure your router / network to use names instead of IP addresses will require more information from you. Let us know if you want to spend the time / effort to do that.