IoT light – fast and simple provided me one of their gesture controlled light to play around a while back. This kit is based on a Arduino Nano and contain basically of a sensor (APDS-9960) and a LED strip (WS2812B).

I like the design but I prefer if I can control something with Home Assistant. This means that I needed to replace the microcontroller. I took a ESP32 development board which has the perfect size and remove the gesture sensor for now.

Instead of reinventing the wheel and write the code by myself, I decided to use Otto Winter‘s fantastic esphomeyaml tool. Follow the Getting Started guide and create a file called gesture_lamp.yaml  with the following content. You may need to adjust the settings to match your environment. Keep an eye on the prefix for the discovery topic and the pin for the LED. The pin I use is 33.

If you are done, start the uploading.

The log output will tell you if the flash process was success and the connection was established.

Make sure that you have Home Assistant’s MQTT discovery enabled.

Restart Home Assistant if not otherwise the lamp will show up.




This entry was posted in General. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.