Introduction: ESP01 Moodlight With Firebase in Realtime + OTA

It support R-G-B mode and Fade effect. Also there is support for brightness control. Support for OTA update

Step 1: Setting Up the Firebase

Before we continue we need to setup the firebase. Go to following link and login with your gmail account.

Once you finish this step we need to make a new project in firebase so proceed to your firebase console.

Under your realtime database there is tab "rules" where you need to enable read and write like this. Picture 2

you can find your firebase link and secret here. Picture 3

This is used in arduino IDE to connect with firebase.

Step 2: Program ESP-01 With Basic OTA for Future Update

From source code you can download minimal OTA and flash it with arduino IDE to your ESP01. Picture 1

Now after you flashed it, it should popup in arduino IDE port like this. Picture 2

If it dosent show up here is a link for troubleshooting, or you can ask in comments.

Step 3: Program ESP01 With Moodlight Over OTA

Simply download source code from below and flash it via arduino IDE over OTA like it was previously shown with selecting port of coresponding ESP.

Step 4: Soldering Everything

Simply apply a little solder following the shematic down below.

For power supply i use 5V 1A old phone charger connected to voltage regulator.


Vcc to 3V (Voltage regulator) GND to GND GPIO0 to Red GPIO2 to Green GPIO3=RX to Blue CH_PD to Vcc (or solder a pull-up resistor on the ESP-01 module) optional: push button from GND to RST to reset the module

Since i will enclosure this in my white ball i put some hot glue so it dosent move or break. It works now for a 3 weeks without any problems.


I realized one problem with current build and had to put on/off switches on all 3 colors (RGB) between LED and ESP01 because if you switch it off and then again ON it will stuck in flash mode instead of running the sketch.

Simply turn switches off while you plug it in and then turn switches ON and everyhing will work fine.

Step 6: Link for Github and Shematic

Step 7: Final Product