I wanted to make a Google Assistant and Amazon Alexa compatible smart bulb without relying on third party services like api.ai or IFTTT. I was able to get it done after a brief initial struggle with syncing Alexa values with Google Assistant's via Firebase.
Now that I was able to get it done, I wanted to share it here for others to try, so here we go.Wiring
1. Solder the live and neutral terminals of the AC-DC converter to the female receptacles of the bulb socket.
2. Solder the electrolytic and ceramic capacitors to the 5V terminals of the AC-DC converter. Mind the polarity of the electrolytic capacitor. Dashed lines on the capacitor denote the -ve leg.3. Solder the 5V and Ground of the AC-DC converter to the 5V and Ground terminal of the Nodemcu and also to the Vcc/Supply and Ground of the Neopixel ring.4. Solder the Data input pin on the Neopixel ring to pin D6 on the Nodemcu.Putting it all together
Using hot glue gun put everything together. Try and make the footprint as small as you can. You can start to see a rough shape of a bulb now.Software for the bulb
The Google Assistant and Amazon Alexa interfacing is accomplished is two phases. While the Google Assistant interfacing is done in the cloud, the Alexa interfacing is done on the Wemos D1 or NodeMCU device itself.Google Assistant interfacing
The list of steps for the how-to can be found in the README of the github page. As instructions change from time to time, the users are advised to directly follow the README.
Github project: https://github.com/shivasiddharth/google-actions-smarthomeAmazon Alexa interfacing
After uploading the arduino code to the Wemos D1 or NodeMCU, ask Alexa to discover devices. Upon discovery, the device should be listed in the Alexa App. Alternatively, open the Alexa App, Choose to add device and select "Other Device" option. Now Alexa will start the discovery process.
If the device discovery did not go through sucessfully, repeat the discovery process again after pressing the RESET button on the Wemos D1 or NodeMCU.Arduino code for Wemos or NodeMCU