Can Arduino control a smart plug (outlet)?

Noob here,

I have a prototype idea, some coding knowledge in Java and HTML, but I’ve never used Arduino so excuse my ignorance on the subject.

I know that you can use Arduino to wire up an outlet or power strip but the product I want to prototype needs to be extremely consumer friendly so I was wondering if I could connect and control one of the $9 smart plugs from Teckin that work with Google assistant and Amazon Alexa.

Overall, I want to have a temp sensor (bluetooth or wifi, temp sensor is on a moving object) trigger an outlet. Don’t mind doing the work and diving deep into Arduino to figure this out, but want to know if this is a viable path to accomplish what I want.


Go to YouTube and search Arduino Alexa.

Hey Larry,
I don’t want Alexa or Google integrated into the product at all, I just want to hijack their cheap WiFi outlets (another separate issue I need to resolve) but in theory I can connect and control a smart outlet and set up a IF/THEN statement, correct?

Thanks for you help!

You can control a relay from an Arduino quite easily. There are a number of shields available with from 1 to 8 (or even 16) relays easily available and allow upto 250V AC and 16A. The ones you would need should be opto decoupled so the DC controlled Arduino is optically separated from the 250V AC. If you ever wanted to control it with Alexa/Google there are libraries available to do that.

You can also buy Wifi switches that can be controlled remotely, you would need to program the Arduino or maybe a ESP8266 to send the control signals via Wifi.

1 Like

This project can Kill if you do not know what your doing get help or abandon it. Take a look at Sonoff products and check the hacks you should find everything you want including hardware and code.

Please google SMART PLUG
UL or CE or some similar approval.
Totally safe
Has an onbord ESP8266
Takes WiFi commands.

No wiring
No exposed wiring

OP is asking if anyone has hacked the WiFi so we can control it with an Arduino and not use Alexa.

PowerSwitch Tail (apparently discontinued now), or one of these

“With the IoT Power Relay you can easily control the power going to a device with an Arduino, Raspberry Pi or other single-board computer or microcontroller. It provides an alternative to the Power Switch Tail.”