I will come back and edit the details of this later, the ESP2866 can be used in similar fashion to Control a XMAS Tree which is why i had an Extra Chip to do this lamp. Use the links they will pretty much get you started.