Easy IoT Ambient Light Sensor & Lux Meter

About This Project

In this project I will create IoT ambient light sensor to control lamp, using NodeMCU and Cayenne.

Cayenne is so powerful to create IoT project, with less coding we can get awesome result.

What’s Connected

  1. NodeMCU ESP-12E

  2. 1 CH Relay Module

  3. TSL2561 Lux Sensor

Triggers & Alerts

This IoT ambient light sensor work with condition:

  1. If the ambient lux value above 50 lux, the relay will switch OFF the lamp.

  2. If the ambient lux value below 50 lux, the relay will switch ON the lamp.


  1. The lamp will be automatically on everyday at 5 pm and off at 7 am.

Dashboard Screenshots

Photos of the Project

1 Like

But I thinnk there’s bug in lux read.
I changed the luxWrite with virtualWrite then it’s working.

Great use case! I’ll get you the participation prize soon :slight_smile:

Thank you sir… but only receive one of three projects. :relaxed:

Great project! Can I use a photoresistor? And can I store the value in a graphical interface?

Yes you can. But this sensor more accurate to get lux than photoresistor. Also you can display as graph on dashboard