IP Address Keeps Changing

Can someone explain the WIFI setup. I’ve tried dynamic and static IP addresses but the IP address changes after a few hours. My fix is to login into my router and look at my routing table to see what IP address is assigned to WLED. Then I select the + in the App to setup a new controller and type in the new IP address. It works for a few hours until the IP address changes. A couple things I’ve noticed is the Discover Lights doesn’t find a controller and when things are working the client IP address is the IP address of the controller even if the static IP is set different. Thanks -

Dynamic addressing is handled by your router, not wled. Maybe it’s just rebooting from an error. What hardware are you using?

Increase the dhcp lease time, or reserve IP address(es) for your WLED, or name your WLED install and then your router might allow <wled_install_name>.local to access it no matter what ip address it has.

Thanks for your replies.

My router is a Linksys/Cisco : The controller is QinnLED Dig Uno : I’m using WLED version 0.10.0 build 2005030.

I realize dynamic addressing is handled by my router. I don’t understand how to troubleshoot why the App isn’t connecting using DNS so I tried assigning a static IP in WLED when I couldn’t reconnect. I did notice that the client IP doesn’t change when I assign WLED a static IP. So I don’t understand the relationship between them, I assumed the client IP would update to the static IP I assigned but it doesn’t change when I change the Static IP in WLED. However, the client IP is always the same as the IP address in the routers DHCP Client Table. I assume the router assigns it?

I couldn’t see where to increase the lease time in my router. I haven’t tried reserving an IP, I can try that. I was hoping to make it work without changing my router config. Will it help to select “Disable WIFI Sleep”?

Does the access point configuration in WLED have anything to do with it. I left it as is during the install – not active.

When you say name my WLED install; is that under WIFI config / mDNS address? It doesn’t appear to update the host table?

Can you explain the following in WLED WIFI setup;

What does assigning a static IP do?
Is there a relationship with static IP and client IP?
I assume I leave static gateway 0.0.0.0 and static subnet mask 255.255.255.0?
What does assigning a wDNS name do?
What does configuring an Access Point do?

Thanks for your help.

In the chat, I’ve seen people talking about an ESP clone that changes it’s MAC every boot. :frowning: Maybe your problem?

Definitely disable WIFI sleep so the DHCP server stops sensing WLED is offline and recovers that old IP address.
Typically in residential applications, the home router is everything - WIFI access, DHCP server, mDNS (local), and DHCP address reservations.
A static IP is something you assign outside the DHCP servers range. I accomplish that by giving the DHCP server the top half of the subnet address pool (192.168.x.125. through 192.168.x.250). I reserve the bottom 125 and top 5 addresses for static IP assignment.
However, by reserving an IP address in the router’s DHCP server configuration helps keep track of those reserved IP addresses and auto-assign them depending on the device MAC address.
So, Static IP is manually managed, manually assigned, and must not be available by the DHCP server to assign to another device, and Reserved IP is telling the DHCP server to give a specific device (by MAC address) a specific address.
Static IP can be a Reserved IP if the DHCP server does not automatically assign the IP address.
Also, to speed up connections, like in WLED, telling it to assign the “reserved IP” as a Static IP may work better - in some situations. Some routers may kick that situation to the firewall and block that “static” ip because it didn’t get assigned the address via DHCP.

I know it sounds complicated, and it kind of is. That’s why CISCO certifies people to work on network hardware - because it is complicated, yet if the rules are followed, it is extremely reliable and dependable.

I will share what I have had success with (since I didn’t have good luck trying to assign the static IP address within WLED’s Wifi Config page)…

I am assuming that you have access to the WiFi config page of WLED (either while it is in access point mode - and you have connected to it directly from your computer via wifi, or if it is already configured with a dynamic IP).

Go to the wifi settings within WLED.
Enter your network’s wifi SSID and its passphrase
Set both the Static IP and the Default Gateway to 0.0.0.0
Set the Subnet Mask to 255.255.255.0
Save and connect

Once it connects, look on your routers client list (this will vary by manufacturer) and find the entry for WLED in there, and note the IP address.
Enter that IP address into a browser, and you should see the WLED interface.
Go to the “Info” tab for WLED.
Note the MAC address
Go to your routers DHCP section and reserve a static IP address on your network for the MAC address noted above.
I find that the best way to get this to update is to then reboot the router so it reassigns the newly chosen static ip address to your WLED controller.

1 Like