According to the Google Store that light is around $28 bucks, meaning you're probably not dealing with the highest quality components (read: fire hazard).
Relay connected to 5v with the diode across the coil. The base of the transistor goes to pin 18 via a resistor. The transistor is on the other side of the relay between it and ground.
That makes more sense to me because the diode is now actually protecting the Raspberry Pi 5V line.
The diode goes across the relay coil because when the relay coil is turned off, there will be an inductive spike generated. The diode protects the transistor.
Edit: I have a couple Android Mini PC devices. I wonder if I could do the same or similar with those somehow.
fun project though, anyone making it go crazy yet?
Extremely cheap, too.
Great work, man.
Exactly made for that very same reason. To visualize traffic and other notifications.