Wrong IP address in LAN API response

Hello,

I’ve used a python library and a node library to try to discover the lights on my LAN. The libraries are able to successfully query the lights (the lights respond). However, the IP address it shows for most of my lights is the IP address of the router (192.168.1.1). There are a few exceptions, where the IP address is the correct IP address for the light. I’m not sure why some are working and most are not.

I have all my lights set up with static IP addresses, and if I send a specific LAN API request to a specific light (such as turn light to full green) the light will respond correctly. So the light knows its own IP address, but when I try to discover the bulbs on the network the responses from the lights indicate they are mostly on one IP address. Sending requests to the router IP address that is returned from the discovery request just times out.

Any ideas on what could be causing this?

Thanks!

Similar issues with some of my bulbs. I am confident this is a DHCP issue, but what I find odd is that it only happens to one of my bulbs. Which I’ve since replaced and everything is behaving normally. I think there has been guidance on changing the DHCP lease time, even if you’re using static leases and that may help.

It always happens me, but only when the bulbs are turned on while the wifi connection is not already available. When the wifi access point is fully initialized and reachable, the bulbs always have a good dhcp IP address.

But it may vary with some access points. I use my ADSL domestic box, and it’s fine. But I did some tries with a Linksys with dd-wrt firmware and I had many many more situations where the bulbs had the router’s IP address.

Thanks for the comments!

@agentkt I just bumped my DHCP lease time to the max. I’ll see if that has any lasting effects.

@tactif Good tip! I power cycled some lights (after the wifi was working) and they are now using the right IP address. I guess I’ll need to power cycle all my lights and see how long that lasts.