wireless communication with lifx virtual bulb

1.1k Views Asked by At

I saw LIFX Virtual Bulb the other day and am curious to know how does this communication take place...

For those who don't know what is LIFX - it is a wireless RGB LED bulb which can be controlled via iPhone and Android app. If you don't have a bulb yet, you can go to www.virtualbulb.lifx.co, open LIFX app on your phone and control a virtual bulb on your web browser. To do this, your phone and your laptop on which you have opened virtual bulb webpage should be on the same wifi network. There was NO DIRECT CONNECTION between my iPhone and laptop, both were on the same wifi network. This is where I started to ponder!!

I know very little about networking. The only thing I can do is setup a modem and wifi router for internet connection.

So, while researching about the above (sentence in bold) I came across Zigbee (802.15.4) standard which is widely used in home automation but as the browser was open on my laptop, zigbee is out of question for such kind of communication.

Then I thought about Wifi direct, but as there was no direct connection between my iPhone and laptop and a network was involved that possibility is ruled out as well.

It would be great if someone could enlighten me about this communication protocol and also how the communication takes place between the iPhone/Android device and the REAL LIFX bulb.

Thanks in advance!

A confused geek!

1

There are 1 best solutions below

0
On

The bulb uses your local wifi, so it is basically using the same protocols you are using to browse the web.

More technically speaking it uses UDP (at the time of this writing). It works like this: When you use your LIFX bulb for the first time, you have to use your phone and tell the bulb to connect to your wifi. The bulb connects and get an IP address. Now anyone else on the same wifi network (be it a phone or a computer) can send a UDP broadcast message asking for any active bulbs on the network. The bulb responds with its own UPD message that says what its IP address is. The phone/computer now knows the address to the bulb and can start sending commands to it, again via UDP.