The goal of this project is to create an actual usable clone of the Phillips Hue lights.
If you search online for a wifi controlled RGB LED you'll find hunderds of simular projects, but I will try to approach it differently. My goal is not an RGB led that dangles with a few wires on a Raspberry Pi or an Arduino because this is not something you want to use in the living room. But if we build a clone it's important that you can install it as easy as the actual Hue lights, just by screwing it into your standard E27 light fitting.
Another goal is that it should at least be 50% cheaper (max €30) as the actual Hue lights.
One of the biggest differences is that we will not use a bridge to connect to the wifi. Our bulbs will connect directly to wifi network. The disadvantages of this:
- potential connection problems when the bulb is to far removed from your wifi access point
- we have to configure the wifi SSID and password into our bulb source code which sucks (something like this firmware could solve this)
The software part of this project will be written in LUA in combination with NodeMCU firmware.
I've chosen this firmware because it's activly developed and has a large user base which should result in a stable and "bug free" base for my project.
Another option is that I will write this in C which will obviously be a lot harder but then I could use this as my final project of my CS50 course.
This is a list of hardware I will try to use to create an initial prototype of this project. This list can change over time depending on the results a get with certain components.
The Hue led bulbs are 10W so I will use a few leds to mimic this.
- E27 Light bulb casing €3.78
- ESP8266 €4.38
- Power supply €2.52 (should have max these dimensions 3.0 cm x 1.7 cm x 1.7 cm)
- Voltage regulator €2.61
- 3x 3w RGB LED 3 x €1.61 = €4.83
- Fuse: best to add this if we don't want to blow up our bulb (based on the Power supply)
- Led driver calculate price
Current total: €18.12
We could potentially save some extra bucks if we order some parts on BangGood.
The strange thing is that the data cheat of the power supply mentions the output value to be between 6 and 18v. That seems like a large range.
But we can use the voltage regulator to convert a max input of 30v
to 3.3v and that
is exactly what we need to power our ESP8266.
Will have to test this if it matches these DX leds.
The bulb should have a API that closely matches the Hue light API.
Get light state | |
---|---|
Address | http://<bulb ip address>/api/light/ |
Body | {"on":false} |
Method | GET |
Update light state | |
---|---|
Address | http://<bulb ip address>/api/light/state |
Body | {"on":true} |
Method | PUT |
Update light color | |
---|---|
Address | http://<bulb ip address>/api/light/state |
Body | {"on":true, "sat":254, "bri";254, "hue": 10000} |
Method | PUT |
It would be very cool and handy if the light could automatically detect if there are online updates and if so install them.
For more information search for OTA or FOTA.
Some teardown post that can give some insides about the Hue light
- Fork it!
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -m 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request :D
I'm not responsible (it is provided as-is; no warranty, liability, etc.)