IoT Part 2 - And There Shall be Light (the smartphone said)

Now, after being able to spy on our dog, I thought, what if I'm not home and the sun went down?

The obvious solution was to buy Philips Hue or Lifx, but my girlfriend convinced me to think again. She knew that I would be much more happy if I do it by myself.

So I turned to google, to find a substitute that is more open than Hue, and found MiLight (or LimitlessLED, same product) - a Chinese brand that gives you the same value but open, and with a bonus - much less expensive.

I ordered 3 RGBW light bulbs, a remote control, and a wifi controller from movsun. That costed me only 70$ and arrived within a month (we have some real issues with Israel post).

2 minutes after opening the box, we were able to turn on the lights and control them with the remote control. 4 minutes after we also controlled them with our phones.
BTW, even though the lights "work over wifi", we need a wifi controller, that's because they work over 2.4GHz and probably not wifi certified.
The remote control or the wifi controller pair to them after you turn the lights off and then on, that's when the lights are discoverable. Meaning that one of the parties have fixed id and it sends them to the other party (I'd put my money on the lights themselves) - read more here.

The next thing I wanted to do is to connect the lights together with the camera from part 1.
I started with turn the lights on when we come in, and turn all the lights except one when leaving.
To do that, I hacked motion-starter package from part 1 using node-milight-promise which let me send commands to the wifi controller (their protocol is known). I set a fixed ip for the wifi controller, fetch the code on my raspberry, and it worked. Entering the house has never been more welcoming.

Ok, so now we want to have some fun with the lights, and I heard somewhere about lights that change on every incoming notification.
To do that I wrote limitless-pushbullet, to create a bridge between the lights and Pushbullet. All I had left to do is to create an API token in Pushbullet website and create a service in the raspberry to run the script with the relevant parameters.

This whole thing was a great success, everything works as expected and even better. I already ordered 2 LED strips. We'll see how it goes.