Connectivity is a really big plus when it comes to the smart home. Sure, you can connect your Arduino boards to Bluetooth using an HC-05 module (or any other Bluetooth module), but these days almost everyone has a Alexa or Google Assistant in their home. Therefore, I wanted to connect an Arduino Uno, Nano, Mega, or any other non-wifi board with these popular voice assistants. The I heard of a smart plug.
In short, a smart plug can make "dumb" appliances "smart". Say, you have a lamp that you plug in whenever you want to turn it on. To make it "smart", you would plug in the smart plug to the electrical outlet. Then, you would plug the device into the smart plug. The smart plug can regulate if energy comes in or not and can be connected to Alexa or Google Voice assistants. The one I ended up buying was a Gosund Wifi plug that is compatible with both alexa and google, and it also has an app where you can control it with an onboard on/off switch. Below are pictures of the box it came in and the plug itself.
Gosund provides instructions to connect the smart plug, but I'll just run through them here.
Set up the Smart PlugStep 1: Download the Gosund App and create an account
The first step is simply downloading the Gosund app, make sure that you are using the same email address that you use for Alexa/and or Google Assistant.
Step 2: Adding a Device
In the Gosund app, there should be a ( + ) option to add a device, if not, you may need to connect it to a 2.4 GH WiFi network. Mine is 5G, but it also can connect through 2.4 GH. When you add the device, manually set it up as Socket (Wi-Fi) under "Electrician". The app then gives directions about holding the manual button on the plug for 5 seconds. Once you follow the given instructions, the plug should connect to your device. After connecting to the Gosund app, I made my device named "Arduino" because I knew that was what I was going to call it through the Google Assisstant.
Step3:ConnectingthroughtheGoogleHomeApp
The next step is to connect it through the google home app. Due to the fact that I do not have amazon home/Alexa, you will have to follow the given instructions for those devices.
In the google home app, first, hit the + sign, and then select "set up new device".
Now, we already connected the plug through the Gosund app, right? So instead of connecting the Google App to the plug, we will be connecting the Google App to the Gosund App. The Google App will then see the smart plug and add it as a device. Therefore, we should select "Have something already set up?".
Then, it will lead you to hundreds of apps with devices compatible with Google Assisstant. Instead of having to scroll, we can use the type function in the top right corner to search for Gosund.
Then click on Gosund Smart. It will ask you to sign in, and once you have done that, the smart plug should be added to the google home app.
Now that we have the smart plug set up, all you have to do is follow the circuit schematics and upload the code to the Arduino. The LED should blink when connected to a power source. Now, using the socket adapter, we can connect the Arduino to the Smart plug. You can then control whether or not the Smart Plug is on through Google Assisstant, Alexa, Google Home app, Gosund App, or the manual button on the Smart Plug. Below is a video of me using the smart plug through Ok google (I used Google Translate as my voice :) ).
Thanks for viewing, I hope this tutorial was helpful!
Comments
Please log in or sign up to comment.