API Functionality To Programmatically Connect To WiFi

Hi Everyone,

I’m building an Android app to automatically enable my phone’s Hotspot when I come home in order to connect to my LIFX bulbs.

This is a use case for either people with unlimited data plans who don’t want to use internet providers for their smart home, or who enjoy traveling with their LIFX in AirBnbs or hotels.

Is there / will there be functionality in the API to connect LIFX programmatically to the strongest user verified network connection. If there are two user verified hotspots in the same location I want my bulbs to connect to the strongest one.

An alternative is to introduce a user and API facing feature to set the priority of Wi-Fi connections to connect to in case of network failure. For example, this is how the Mac OS network configuration operates and it works smoothly.

Thank you!


If you want them to connect to your hotspot, they’ll do just that so long as you’ve configured the lights with the SSID and password of your hotspot.

As far as I know, LIFX bulbs only connect to a single SSID and will roam to the best signal they can get that matches that SSID and password combination. There’s probably a way to change the associated SSID by writing your own software to do it, but from my knowledge, the only way to change the SSID and password for each bubl is to reste them and reclaim them on your account.


I agree @Sawtaytoes. The connection to the Hotspot should be straightforward.

However, the single SSID will be an issue for multiple Hotspots / users in a household to connect, because as you said, the only way to change the SSID for a bulb is to the reset. It looks like my hands are tied for this feature of the app unless LIFX adds either user facing functionality to define a priority of Wi-Fi connections or API access to do so.

I’m confused as to the issue you’re having, but you can always contact LIFX support directly as they might have a way around the issue you’re presenting.

It’s more of a feature request rather than an issue.

My app is connecting the user’s hotspot directly to the LIFX lights. Therefore, if I want the app to be able to support more than one user there needs to be a way for the LIFX lights to re-connect to more than a singular Wi-Fi connection.

For example, if you have 2 users in a household. User A initially sets up their hotspot to LIFX. User B comes home while User A is away, therefore the initial Wi-Fi connection is not present. This mean that LIFX needs a way for User B to also connect their hotspot so it can connect to whichever Wi-Fi is present / stronger.

The app’s purpose is to allow people to run LIFX solely off of their phone’s rather than relying on a stationary home router. This use case is especially useful for travelers, or folks with unlimited data who don’t want to pay for a home router.

Somewhat related to your question, I did some research on having multiple SSIDs per access point and realized I’d rather just have the one to maximize bandwidth.

Since I have 90 LIFX lights, it’s a day’s effort minimum to reset the bulbs and put in a new SSID on each one. Now I’m in the same boat as you.

I asked LIFX Support if there was a way to programmatically change the Wi-Fi SSID, but it is currently not available. I was told this is something they will be aware of going forward, but that’s not a confirmation either way.

I have an idea for you, something that could expand your home network.

Why not have some kind of device like a Raspberry Pi on your network that bridges to a Wi-Fi access point and have your lights connect to that access point?

Like this:

Phone 1     Phone 2
   |           |
    \         /
      \     /
    Raspberry Pi
 Wi-Fi Access Point
  |    |    |    |
  💡   💡   💡   💡

It doesn’t have to be a Raspberry Pi, this is just an idea. Have the Raspberry Pi setup with the credentials for both SSIDs. Whichever is strongest, it will connect to that one. Then have the Ethernet port on the Pi connect to a Wi-Fi access point and then setup another SSID on there (on a different channel) which the lights and any other IoT devices will connect to. That way all your devices and always connect to the same SSID, the Wi-Fi access point, regardless of which phone’s ad-hoc network is active :).

You can also do this with a single access point, but I don’t know of any that would allow connecting to multiple SSIDs. That might require custom firmware.

Instead of the Raspberry Pi, you could use any device that has an Ethernet jack it can bridge to the Wi-Fi access point from the Phone’s ad-hoc Wi-Fi network.

Thanks! This is a great technical solution. However, my goal is keep the process of connecting one’s mobile hotspot to LIFX as simple and travel friendly as possible from the user’s perspective.

I’m going to table the idea for now, build another core part of my LIFX app, and re-visit this concept in the future.

My ideal solution would be LIFX providing functionality into their API to connect / re-connect lights so multiple hotspot network connections can pair with the same light. Then, if two user’s with my app are home at the same time, my app will 1) connect the user with the strongest hotspot to LIFX, and 2) allow the non-connected user to connect to the connected user’s hotspot to be paired to LIFX as well.

In this solution everyone who is not connected and authenticated in my app will access LIFX through the one connected person’s hotspot in the house.