I’ve been running an ESP32 NodeMCU in the bedroom for motion, temperature, and humidity for a while and have wanted to extend it’s functionality by adding light sensing too, in order to improve the motion light control to trigger when the lux is a certain level vs the current functional, but limited mode based on the position of the sun.

I had initially been putting this off as I wasn’t sure how best to spice the jumper wires since the device only had 2x ground and 2x 3v3 power pins. However decided try. The process was fairly simple and involved:

  • First cutting off 1 end of the required jumper wires and using a pair of wire cutters to expose the wire inside
  • Hook the wires together so that they make good contact
  • Wrap exposed section in electrical tape to secure and make more stable

Here is the final result:

Close up

Overview of the whole enclosure:

Overview

ESPHome WebUI:

ESPHome WebUI

Further reading