Prerequisites for Smart Lamp with Google Assistant
First, we need to create a new instance on the Simuli Virtual Lab platform which has an Arduino Uno with a W5500 Ethernet Module.
Log in to your Simuli account and navigate to the Simuli Virtual Lab. Here we will create a new emulated instance of the
Arduino Uno. Click on the
Launchbutton under the Arduino to get started.
This will open the configuration menu. First, provide a name for the project. Then, we will add the
W5500Ethernet Module by selecting it from the list of available components. Finally, review that the name for the project and the selected sensors are correct and click on the
Once we have clicked on the Launch button, a new instance of the Arduino Uno will be created. It can take a few minutes for this process to be completed.
While our new instance is being created, let's move forward to creating an Adafruit IO account and configure it.
Go to the Adafruit IO website, if you already have an account, you can directly log in and skip to the configuration part. If this is your first time at Adafruit IO, click on the
Get Started for Freebutton at the top. This will take you to a signup page, fill all the details and click on the
Once the account has been created, go back to the Adafruit IO website. Let's start by creating a feed. Feeds act as our MQTT topics, where we can either publish our data or subscribe to receive the data. In this case, we will create a feed called
assistant-lamp. We will connect this feed to our IFTTT applet which will publish the data when a voice command is invoked, and the Arduino sketch will subscribe to the feed to receive the data and take the relevant actions.
Feeds, and then click on
view all. This will open up a list of all the feeds currently set up for our account. Let's create our feed for controlling an LED.
Click on the
New Feedbutton, this opens up a pop-up, let's name the feed as
assistant-lamp. Finally, click on Create to
createthis new feed.
Once the feed has been created, our Adafruit IO setup is complete. We will finally set up our Arduino IDE.
If you have not set up your Arduino IDE, follow the guide linked below.
Before using MQTT to publish our data to Adafruit IO, we need to install the relevant library. For this, open your Arduino IDE and go to
Toolsand then to
Manage Libraries.... This will open up the library manager, here we can search for Adafruit MQTT. Now select the library and install it. Now we are ready to communicate with Adafruit IO via MQTT.
Download the IFTTT app on your phone from the Play Store (for Android) or the App Store (for iOS devices). Once the app has been downloaded, create a new account or sign in using a third party service.
Once you have created your account or signed in, you will reach the welcome screen with the
Createbutton. We are now ready to start integrating IFTTT with Google Assistant and Adafruit IO.