2Cheap WiFi SmartPlugs with SmartThings

SmartTh­ings com­pat­ible smart plugs are annoy­ingly expens­ive — typ­ic­ally around £40. This is far too expens­ive to con­sider buy­ing many of. There are how­ever WiFi plugs avail­able online for around £10 that don’t offi­cially work with SmartTh­ings. Most of them are based on the ESP8266 chip which can be reflashed with new firm­ware that will work with SmartTh­ings. Below I doc­u­ment my tri­als and tribu­la­tions with hack­ing these plugs

As of March-2018 I’ve tried 4 difer­ent makes of plugs with a vari­ety of res­ults.

Note — Regard­less of the soft­ware you plan to use to flash the device, and regard­less of the flash image you use, I recom­mend using pin head­ers (ideally soldered) to get a reli­able con­nec­tion dur­ing flash­ing. I got a pack for around £10 which has enough head­ers to do hun­dreds of smart plugs. I also recom­mend using a CH340G USB to seri­al adapter instead of an FTDI adapter as there can be issues with the drivers for the FTDI adapters. If you already got an FTDI adapter make sure you are using the older drivers. Also ensure your adapter can sup­ply 3.3v rather than 5v (which will likely fry the ESP8266 chip)

I have used Sonoff-Tas­mota which I build and install via the Ardu­ino IDE. I then installed a cus­tom device hand­ler, made by Brett Sheleski

By the end of my exper­i­ments I had 2 work­ing Smart­Plugs, hav­ing bought 4 dif­fer­ent plugs (£44.94 total), 1 USB adapter (£5.99), and 1 set of pin head­ers (£6.69). If you don’t have a sol­der­ing iron you’ll need one of those too (£26.29). Includ­ing the sol­der­ing iron my total cost was £83.91. Had all 4 plugs worked this would have been decent value. As it is, I’ve got 2 work­ing plugs, at a cost of £41.96 each. This is almost identic­al to a Belkin WeeMo, which might make the whole thing seem point­less — and if you only want a total of 1 or 2 plugs it prob­ably isn’t the best way to go. How­ever, I plan to have quite a few more plugs, and I can now add more plugs to my col­lec­tion at a total cost of £8.97 each as I already have everything else I need to flash them.

1. COOSA SWA1 (has a purple but­ton)

This has a second PCB inside it which is labelled as an SWA1. Googling this indic­ates that it uses an ESP8266 inside and a suc­cess­ful firm­ware hack has been doc­u­mented (with pins shown) by Nath­an Chantrell. I have fol­lowed Nathan’s meth­od with suc­cess, although the mod­ule type didn’t show up the first time (I made an error modi­fy­ing the code) but I was able to get the device work­ing by select­ing Gen­er­ic and then con­fig­ur­ing the pins myself. This worked but not quite flaw­lessly, so after a bit of read­ing I reflashed it. Nathan’s guide doesn’t make it clear that 3 changes are needed to the code before flash­ing — the large sec­tion at the bot­tom, and the match­ing name from it needs to be added to 2 lists above which should be obvi­ous when view­ing the file. Since reflash­ing (via the web inter­face) it has worked very well. To keep the sol­der­ing simple I fed 5v from my USB adapter to the 5v pin, but I left the adapter set to 3.3v (i.e. the set­ting for the data pins). So it is worth hav­ing an adapter with both 5v and 3.3v pins and a jump­er to set the voltage of the data pins inde­pend­ently (as the CH340G I linked to on Amazon has)

_

2. The HowiseAcc S126 Smart plug with USB (curves in slightly in the middle)

Inform­a­tion online indic­ated that the TYWE3S com­pon­ent in this smart plug con­tains and ESP8266 and hence it should (in the­ory) be flash­able. I have not as yet iden­ti­fied the cor­rect pins, altho there are labels for 3.3v and ground on the under­side and the TX, RX and GPIO0 pins on the TYWE3S are shown on a sim­il­ar device on a post on Git­Hub. I found at least 1 oth­er thread with anoth­er per­son ask­ing about the same device, and some more inform­a­tion from Andreas Engel, but with 2 of my 4 “test plugs” work­ing I decided that try­ing to solder this head­ers on this plug was too dif­fi­cult and have ditched it. If you’ve got a stead­i­er hand than me then take a look at the link, espe­cially the second one and please let me know if you have any luck.

_

3. Floureon PS-16-MB Smart Plug

This has an ESP8285 chip onboard which is com­pat­ible with the ESP8266. It has trick­i­er head­ers to solder but once soldered it flashed per­fectly first time. Just con­nect the 4 reg­u­lar pins (3.3v, ground, TX, RX) and hold the but­ton down whilst power­ing it up (1−2 seconds was enough). As this is effect­ively a Sonoff S20 clone I sus­pect it can be flashed more eas­ily with the NodeM­CU flash­er by fol­low­ing Eric M’s guide, S20 firm­ware, Device hand­ler, and Smart App code. How­ever, I pre­ferred to go with the Tas­mota firm­ware as I had already set everything up to build and flash it, and it sup­ports the oth­er smart plugs which aren’t all Sonoff S20 clones. The choice of which way to go is up to you.

_

4. The Aonokoy SE01 (16 Amp) smart plug

This has an ESP8266 and easy to access head­ers, although they are too close togeth­er to con­nect reg­u­lar pin head­ers to so I used loose wires instead. I have been able to con­nect mine to my PC and flash it. After flash­ing it boots up as expec­ted and the web inter­face of the firm­ware loads, but the unit crashes after around 10 seconds every time. I am not sure why this is, but it does it with sev­er­al dif­fer­ent firm­wares flashed onto it. I am hop­ing it is just bad luck with a duff unit.

 

What do you think? Drop us a comment below! If you would like to subscribe please use the subscribe link on the menu at the top right. You can also share this with your friends by using the social links below. Cheers.

Leave a Reply

2 Comments

gravatarLeon

how did you man­age to flash this Aonokoy device?
There are some guys try­ing to flash it but its not pos­sible…

Reply
gravatarJon Scaife

I used the CH340G USB adaptor linked at the top of the art­icle, and just stripped the wires and poked them through the holes in the PCB. That wasn’t easy as they always want to twist and touch each oth­er, or they want to lose con­tact. You can see how the wires are looped through in the 5th image (https://diymediahome.org/wp-content/uploads/aonokoy_6.jpg). There are 2 areas that need wires con­nect­ing — the set of 5 holes near the edge of the PCB which need 4 wires from the USB adaptor. The last 2 holes need con­nect­ing togeth­er. There is also anoth­er set of pin holes near the middle of the PCB — 2 of these need short­ing togeth­er. I then used the Ardu­ino IDE to flash Sonoff Tas­mota as described at the top of the art­icle. As I say above altho it worked, it crashes after a short peri­od

Reply