WIFI Smart Socket

Smart socketIt looks like Itead have done it again – another winner – well that’s all down to the price and I’ll leave you to look that one up…the site says £9.76 for the unit which is reasonable – but I didn’t check postage.

The first modern WIFI wall socket I had was the Orbvibo Smart socket. I could not re-program it but I did manage to get Node-Red to talk to it over a websocket interface. I think it lasted a week before losing the info, then I discovered that Amazon had stopped selling them because of some regulation or other.  Not a nice experience – but they DID look nice.

Smart Socket[6]Similarly – the Itead  unit is good looking (though you would not tell it was theirs based on the one I have – there’s no reference to Itead on there at all and there were no instructions in the (very pretty) box. Probably because this is new (but available). This is an EU socket not UK so if you’re in the UK you’ll need a simple adaptor unless you want to live dangerously.

There is a programming button – which handily goes to GPIO0 on the ESP8266. Again a slight gripe here, once again they’ve Smart Socket[8]used a 1MB FLASH –  fine for their purposes but if ONLY they’d used the same as the ESP-12 (4MB) I could have done OTA – I believe there is other software that might be suitable which fits into the smaller space. However – not that big a deal. When my new 4MB Flash chips turn up I may just replace theirs.

pinsThe Smart Socket is designed to work with Itead’s APP – and if that’s what you want – read no further. It makes for a nice cheap WIFI controlled socket.

In my case of course I wanted it to work with our own software and hence remotely over Node-Red and MQTT – I suspect readers in here will want the same. So – out with the screwdriver – it turns out this was to be incredibly simple, once screw then finger-nails in the edge and it pops open  – there’s a 4-way set of holes which you can just shove wires into – ground, TX, RX and VCC.  I applied the relevant wires from my FTDI (obviously RX to TX etc)  to the holes – ensuring that [a] my finger was on the programming button at the time and [b] my FTDI was set to 3v3 – not 5v (important).  I blew the ROMs into the unit – this is covered elsewhere in the blog and is easy) and lo – one WIFI controlled switch I can control over MQTT etc.

I mean – it was that easy  – I’m missing the bit out about making a  change to my program to slow the flashing light down as the lights in this thing are BRIGHT.  So the green light is the general indicator (GPIO13) which I use all the time (thank heavens) and as in the SONOFF they use GPIO12 for the relay AND a nice blue light – so when the unit is running it is flashing green – if the output is on there is also a blue glow. Very nice.

So – there you have it – another winner.   It’s all down to postal charges really… oh, the relay claims 2KW – I’ll leave it up to someone else to see if it is up to that – I’d suggest that putting a 2KW electric heater on it will probably not work too well. It would be nice if a 1KW heater would work… anyone up to testing that ?

36 thoughts on “WIFI Smart Socket

  1. Hi Peter,

    Firstly, great blog – I’ve been an avid reader for some time now as a fellow programmer / electronics enthusiast whose life changed when the ESP8266 came out! I’m also quite a fan of the OrangePi boards that you speak favourably of – I’ve been dabbling with them for about 12 months now and they’re getting better and better.

    Anyway, just to let you know that the UK version of the ITEAD wifi sockets are out now and are of good quality – with earth wiring and decent looking internals.

    https://www.dropbox.com/s/2ad8rbt7cqwzsmm/20170109_184027.jpg

    I use loads of ESP8266 sensors and relays to monitor and control electric heaters in a Norfolk beach holiday home that doesn’t have central heating – all controlled via a 3G connection and a Raspberry Pi running ‘weaved’ for remote access. Currently in the process of migrating my current Home Automation setup to something based on Node Red having read your very informative articles on the subject.

    Keep up the great work with this blog!

    Cheers,

    Darren,
    Cambridge UK

    1. Thank you!!! And yes I have a couple of the UK sockets and they are – well – the best deal on the market!

      1. I have just spotted your post from last month updated with info about the UK ones.. Must have missed that in all your other updates! These mains adapter ones are very nice looking items…I have some original Sonoff and Slampher units but these are a notable step up. I have a TH16 on order as I want something that can safely handle 2000-2500 watts for a water heater and some electric heaters and I am a bit nervous given the Chinese propensity to exaggerate figures a little. I will try this adapter on a heater when my holiday home reopens in March but on the 1KW half power setting and see if it shows any signs of a struggle in a controlled and monitored environment (i.e. not with me 50+ miles away at home!).

        The price they make and ship these for is just incredible and the quality exceeds expectation but I am not confident about sticking 10 amps at 240 v through these just yet!

        I will see if I can see any difference in the 16A version of the Sonoff when it arrives..I am hoping that’s good for 2-25kW but if it looks the same as the 10a then I will look elsewhere for a solution for my 2.5kW water heater and my higher output electric heaters.

        1. I think with any relay, pushing 10 amps of inductive load through a 10 amp relay is, oh, a bit like using a 10 amp fuse for the same thing. I am regularly turning on and off 700w heater panels with Sonoffs without a hitch as well as fluorescent, filament and LED lighting. Of course, where you live matters as well because 2.5KW could mean a little over 10 amps (240v) or a little over 20 amps (120v) !! I’d be sticking a contactor on that – something meant for the job. Recommendations in here would be welcomed…

          How about something like this? The Sonoff could power this perhaps ? http://www.ebay.co.uk/itm/Newlec-20A-Double-Pole-Contactor-/322281921072?hash=item4b097fda30:g:-QgAAOSw8w1X8qUZ

          1. I manage to switch a 2KW fan heater and a 2KW oil filled radiator on and off quite safely with Energenie 433 MHz adapters and they have relays in them but I’ve not taken them to bits to compare the internals with the ITEAD devices. The Energenie setup has been in weekly operation for 12 months now so I’m happy that their kit can take the stick. I think they are rated at a (UK) 13 amp capacity rather than a chinese 10 …hmm…

            I had a look at your link to the Newlec double pole contactor – I’m not familiar with these – what would you need to interface one with an ESP8266 ? Would I fire it with a relay or just a darlington transistor setup or power transistor? Excuse my amateur question – I’m familiar with traditional and solid state relays but am not sure what the Newlec gizmo comprises.

            My other idea was to break out the relay from an ITEAD device using decent gauge wire and then replace with an over-sized, over-capacity relay with the wires taking the high current side rather than sending it down a printed circuit board. If the Energenie stuff handles what I need to control then it shouldn’t require anything too clever to replicate this setup but using WiFi instead of RF 433 – i.e. just upgrading a ITEAD/Sonoff unit, surely?

            I’d be interested to hear your views and those of fellow readers. TIA

            1. THe contactor I pointed you to was 240v – so you’d use a SONOFF to drive it – but it’s output is a lot higher current – the alternative of coures is any old relay able to handle the current – and use a resistor/transistor to drive with a diode across the coil at the low voltage end….

              Alternatively – I have one of these but never used it

              http://www.ebay.co.uk/itm/Solid-State-Relay-Module-SSR-25DA-25A-250V-3-32V-DC-Input-24-380VAC-Output-FB-/302075561494?var=&hash=item46551b4616:m:mXXfxgTptKgvnSUZGsHizDg

              That would drive straight off an ESP output I believe though the voltage is a TAD low… maybe a transistor to drive 5v into it – that’s 25 amps out – looks like it would need to be on a heatsink…. I’ve used triacs a lot – not of course 100% isolated when off but we used to use them for home control – with a 300v DVDR across them to stop any strange effects…

              If anyone has any special relay they have experience of in the 20-30 amp range – do let us know.

                1. Yes, absolutely – that would do the job – so you could use these with ESP8266 directly as long as you have 5v available.

                  Now it just so happens that I’ve just received a bunch of low cost tiny switched 5v regulator boards the size of a stamp – which take in up to 30v. Got them for my solar installation – but they’d be ideal for this – think I will have a couple of these for my heaters.

                  Pricing excellent – just have to make sure they are available on the English speaker version of AliExpress…

                  Yes, this is good pricing for 10

                  https://www.aliexpress.com/item/RELAY-30A-250VAC-T90-5/32346007607.html

              1. Thanks Pete. I think I’ll give one of those 25A SSRs a go for my higher current applications. I’ll also try and hunt out a normal 25A relay for evaluation and may have a peek inside one of my Energenie units to see what they use (they click, so I’m guessing just a standard relay with some headroom on the current capacity). As my numerous Energenie units (rated at the full UK 13 amps, IIRC) have been working fine for a year without cause for concern, a peek inside would also answer my own question of what spec relay is up to the job. My holiday home recorded an inside temperature range of 5 degrees to 34 degrees last year so the Energenie kit seems pretty robust – I now have a ‘frost mode’ that kicks in at 7 degrees to heat the place as 5 degrees is too close to being a fridge for my liking!

                1. Hi Darren

                  I normally never let the temperature in the house get below 14c unless I’m blasting the de-humidifier (which probably costs nearly as much as the heating at that level). I well remember days when I was younger before I understood this stuff, of never being to explain why, over the winter, all my files and other sharp-edged tools were rendered useless by the next summer. Since I started insisting on minimum temperatures and maximum humidity all that has changed.

                  1. Hi Pete,

                    I’d agree with the 14 degree figure for a house but our holiday property is a 1960s wooden chalet (a glorified shed) and only part-insulated. The main bedroom and the shower room we totally started again with and that’s all insulated with Celotex which is amazing stuff (at least 5 to 6 degrees increase in temperature due to the insulation . However, the lounge and kitchen area hasn’t yet been upgraded so basically internal stud work with an air gap, plastic sheet and plasterboard means it loses heat very quickly in the winter – to keep it at 14 degrees would be quite expensive (as I write this, checking via my RPi based Home Automation setup, it’s 9 degrees in the lounge and 14 in the bedroom). It’s closed up now for the winter until 1st of March but I have a dehumidifier in the lounge set to kick in as necessary and that makes a massive difference to how the place feels when we return.

                    Here at our proper house, I’d agree that letting the house go below 14-15 degrees is not a good idea – plus heating the place back up again takes forever if you let it get too cold!

  2. Peter did you had a chance to look at the new Itead WiFi swtiches? The Sonoff TH 10A/16A; it seems they use as well ESP8266 and from the pictures they do offer the same pin to program them; as a bonus they have a plug for a temperature sensor, but I do believe that with a custom code/firware this can be used as any GPIO (to control somethign else or to accept input form a “physical” switch for example)…

  3. BTW, for those wanting to build their own by refitting an existing radio-controlled remote plug, I recently came across the HLK-PM03(or TSP-03) module (look it up on aliX), which steps-down directly from mains A/C to 3.3V…

    1. By power measurement do you mean current measurement? I’ve lots of little cheap modules that do that. Hmm, could be interesting to fit one of those into the Itead socket but I think fastening to other pins might be a challenge – I didn’t notice a handy 0.1″ connector.

      1. Yes. I mean current measurement. Im not sure if the itead socket case is big enogh for such chip. Before the socket was there i build my own sockets with the sonoff board in it. There i have plenty space free and a pin to connect with. I write itead so maybe they come across my idea for a 2nd socket version.

  4. Looks good. If the experience of the one that Pete & I did is relevant, they’ve probably used the blue Songle, 10A relay as does everyone else and their Auntie including us. I wouldn’t go much over 1KW as the relay gets pretty warm. I think that 10A is an aspiration rather than reality!

    The final version that we ended up with uses an actual 16A relay and mucking great wires to give a true 3KW for a man-sized heater, dishwasher or what have you.

    Lovely looking little unit though and will be great for switching lamps and such like.

    1. Nope – expand that photo and you’ll find a much smaller relay… I think the same as they use in the Sonoff. I think lighting is what they have in mind generally. Still there is BAGS of room – you could if you wished bodge in something more meaty as long as the coil current wasn’t OTT…. no idea what it takes and as I only have the one….

      1. I have two of them, and are already angry. Why didnt i buy more of them for 7,86 USD. Now the price is 12,86. EasyEsp is working great on them, and they look much better than my own build with sonoff board. Hopefully the price go down soon. Then i buy many more.

  5. Really nice but why they don’t add a earth/ground plug ? It’s not better to have one ?

    1. You COULD have a ground plug – and MAYBE it would be better to have one – but sitting here in Spain I can tell you a GOOD number of my plugs don’t have a ground pin – many lighting plugs are just 2 pin.

      1. Trust me – the breaker still flips when you electrocute yourself – been there, done that.

    2. If you look carefully at the socket, there are two metal clips; top & bottom. I thought that these were the earth connection in the EU plugs/sockets.

      1. Keith – you are of course absolutely RIGHT – this particular unit does indeed have the earth feed through. Problem solved.

      2. I think that’s the german heritage of EU grounded plugs, AKA Schuko, short for Schutzkontakt. They happen to be compatible with all male grounded EU plugs , even the french ones with the third protruding earth pin.
        PhG

    1. That’s BOILING for the UK. Well, apparently we’re going to get 40+ here in Spain though I think slightly higher up than we are… it’s about 31c right now… ok then – an air conditioner !

Comments are closed.