This all started when Espressif sent me a white Button that is part of their ESP-MDF examples. The funny part of the history is that I could never register the button in the App. But exploring the Mesh Development Framework I found a light example and my internal "light" flashed. Heck! There is a light ready to compile. And has PWM outputs, and there is an App ready to control it, what can be better than this ?
So actually you have to make the "hardware" part. The software is already done, with the benefit that is open-source, and in the road of creation you can learn a bit more of MQTT*, ESP-NOW and even monitor to see how the light receives this short messages and interacts with them in real time. MQTT messages are lighting fast since they use UDP instead of HTTP that has a lot of headers and would be actually totally over-engineered to use in this scenario.
So actually you need some Leds, any ESP32 board, and the appropiate resistances for each line of Led. I'm not an expert calculating those so this part I leave to the electronic masters here. This way you can build a light for approx. 10 dollars while learning quite a lot in the process and even maybe getting some other cool ideas to do with the ESP-MESH App.
App for Android: https://www.espressif.com/en/products/software/esp-mesh/resources
App for Apple, search in the Ipad or Iphone "ESP-MESH" NOTE: Deactivate the filter only for iPad since the app is released only for iPhones.
LIGHT Source code to be compiled:
https://github.com/espressif/esp-mdf/tree/master/examples/development_kit/light
PWM Outputs
GPIO4 PWM Red
GPIO16 PWM Green
GPIO5 PWM Blue
GPIO23 PWM_BR output ( I used this for White, not sure if is the right one )
GPIO19 PWM_CT output control ( Color Temperature )
Be cautious to respect the max. 30/ top max 40 mA per PWM output. If you need to add more than that then you need to separate the logical outputs from the power outputs.
MQTT a lightweight messaging protocol for small sensors and mobile devices, optimized for high-latency or unreliable networks