Teckin SP23 Smart Socket + Tuya-Convert

I recently wrote (in here) about the Teckin SP23 (for British plugs and sockets) Smart Socket and commented that whether this ends well or not will depend on the company. Well, they’ve just written back to me (Nov 4, 2019). It would seem they have binned power monitoring on this product and adjusted the capacity claim for the UK to 13A. So basically you are looking at just another smart socket so I guess it is all down to price as to whether or not you use these. Anything about power monitoring below this line is historical.

Theirs is a pretty normal looking smart socket – as usual without any nice surprises – but it DOES have power monitoring. As techies most of you will likely NOT be interested in the standard off-the-shelf software involving yet another cloud and yet another APP… I chose Tasmota as it is one of the best replacement firmware for these kinds of sockets (current questions over exceptions pending) – if not THE best… however, due to a manufacturing change in the latest versions of the socket which I received, the power monitoring doesn’t work. However, button, LED and relay work perfectly.

I’ve checked with the Tasmota support forum – this is due to a change of port usage and the current Tasmota port mapping template for the SP23 no longer works.

Teckin S23 Smart Socket

This is the result of an all day session with Mr Shark AKA Antonio, with me in my office in the freezing wastes of the Northeast of England and Antonio at work in Italy. Warning – this is VERY technical – the original notes were those which Antonio gave me to help me convert the device to Tasmota – at this point 90% successully – it all works but no power monitoring. We don’t know how to sort that out right now.

To use Tuya convert on the Teckin SP23 you need a spare Raspberry Pi (or borrow your only one, temporarily inserting a new MicroSD card. You should start with a fresh install of raspbian Buster Lite (I tried using my existing setup – too much activity).

You need a Raspberry Pi to set up Tuya-Convert.. grab the minimal Buster from the Raspberry Pi site and install on the Pi using, say, the free balenaEtcher program. While the SD is still in your PC (after installing Buster, remove and reinsert the SD into your PC and you will see the boot partition). You should put an empty text file in the boot “drive” called merely “ssh” without the quotes. Remove the SD and put it in the RPi.Turn the RPi on. I used an RPi 3.

sudo apt-get install -y git
git clone https://github.com/ct-Open-Source/tuya-convert.git
cd tuya-convert
./install_prereq.sh

Open two SSH terminals on your PC as user Pi on thr RPi. I use MobaXTerm for that. On the first terminal do this…

cd tuya-convert
./start_flash.sh

Press YES. Connect your mobile phone WIFI to access point vtrust-flash which should become available. Use password “flashmeifyoucan” without the quotes.

On the second terminal..

cd tuya-convert/scripts
tail -f *log

Back on terminal one, press ENTER and wait for the prompt. You can watch progress on terminal TWO… When terminal ONE returns to the prompt, you’ve done the first step of the hack, now to flash Tasmota.

In terminal ONE you should see something like:

Getting Info from IoT-device
VTRUST-FLASH 1.1
(c) VTRUST GMBH https://www.vtrust.de/35c3/
READ FLASH: http://10.42.42.42/backup
ChipID: 4247dd
MAC: BC:DD:C2:42:47:DD
BootVersion: 7
BootMode: normal
FlashMode: 1M DOUT @ 40MHz
FlashChipId: 144068
FlashChipRealSize: 1024K
Active Userspace: user2 0x81000

If it is NOT saying “Active Userspace: user2 0x81000 then you need an intermediate step – the following – to be pasted into terminal ONE…

curl http://10.42.42.42/flash2

If you DO see the above “Active Userspace” etc., skip to step 3 on terminal ONE.

curl http://10.42.42.42/flash3

Monitor what is happening on terminal TWO.

At this point the hack is complete and you should see a “SONOFF-XXX” WiFi access point on your phone, connect to it, navigate to 192.168.4.1 and use the web interface to connect the device to your WiFi network. Be sure to enter the correct ssid and password for your access point. You can always change it later.

Now you can update to the latest firmware in the normal way, for example, this URL for the 2.3.0-based minimal firmware.. http://thehackbox.org/tasmota/release/sonoff-minimal.bin

For the full release – this – http://thehackbox.org/tasmota/sonoff.bin

You could look for a Tasmota template for the device… https://blakadder.github.io/

Now to to your Tasmotized device web page, other, configuration, paste in the template in the top text box, check ACTIVATE, remove any password from the password field and press SAVE.

Facebooktwitterpinterestlinkedin

21 thoughts on “Teckin SP23 Smart Socket + Tuya-Convert

  1. I bought a few of these a year or so ago. The only issue I have with them is that they are slightly too wide and so interfere with the power switch on my UK single/double sockets. They do still work with most sockets, you just end up with the switch being halfway to the off position and/or the plug not being fully inserted.

  2. As per Terry’s note, the switch not being fully on or fully off could cause the contacts to not fully engage resulting in arcing and the ensuing overheat of the socket and its contacts. I think great care is needed.
    13A socket switch placements vary so I wonder if there is a particular brand of socket that allows the Teckin to be used without fouling the switch. Just musing ………… not suggesting Teckin users should change their sockets. There are also non switched sockets ……..hmmm.

    1. Yes they make different sockets in the UK and switchless too. They are perfect for these.
      UK socket were of course not designed for modern imported and tweaked designs, but for the UK at sandard plug. Not sure how these past our safe for sale in the UK, I would have thought they would fail instantly.

      Teckin do now brand a raised version and a compact version, not sure if they have Power Monitoring though, but look at other “Tuya” products with a better design.

      Or if you are using a strip/extension socket, just buy a smart one of them (tuya made) and flash in the same OTA way.

      As for the monitoring gpio, have you tried just changing through the ports until it work and not just going straight to the template?.

        1. There is a bin file to flash to a d1 mini which does the same as a using a mobile. Just power the d1 from the usb on the pi and you have a easier option.

          1. the bin file you’re saying, i think is the one DigiblurDIY named in recent videos, which just tries repeatedly to connect to the vtrust ssid created by tuya-convert, so you don’t need to use your phone for that…

            nothing to do with finding the 3 gpios used by Pete’s device, though…

    1. Of you are using them unmodified then no doubt they are fine. I went straight for Tasmota and sadly the current setup does not handle power monitoring in the latest release of that board.

  3. Bricked my teckin plug it connected and did the backup then nothing,,had to open it and solder wires and flash it by serial

  4. Thanks for this. I just bought a couple from Amazon, but have made no progress at all with flashing them despite using your instructions or the one at https://github.com/SynAckFin/TuyOTA/wiki/Walkthrough. The plug is just never recognised. (I have now tried on three separate Model 3 RPis with two different Raspbian Lite builds!) The smoking gun in the log is this:
    (‘could not establish sslpsk socket:’, SSLError(1, u'[SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:727)’))
    and
    new client on port 443 from 10.42.42.38:51662
    (‘could not establish sslpsk socket:’, SSLError(1, u'[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:727)’))
    Could it be that they have updated the security?

    1. Well, mine are only a month old, but they DID tell me this morning that they have a new UK version which no longer has that power monitoring – goodness knows whatever other changes they’ve made… ask tech support.

  5. I should have said I used tuya-convert first… On three Pi with two raspbian builds. That achieves nothing. It starts but the plug immediately stops flashing the light when first contacted, and the script fails. One message I saw in the logs with the second plug in TuyOTA the box was:

    WARNING: it appears this device does not use an ESP82xx and therefore cannot install ESP based firmware

    I have given up now, and solved most of my issues using webhooks and ifttt because my WeMo will respond to IFTTT and Google, just not OpenHab.

  6. There is a bin file to flash to a d1 mini which does the same as a using a mobile. Just power the d1 from the usb on the pi and you have a easier option.

  7. Just received a twin pack advertised as Telkin SP23 units, ordered specifically as this model was meant to have energy monitoring. Turns out they have the Realtek MCU not an ESP chip, and no energy monitoring! The MCU daughterboard is in fact labelled on the back as SP27 so I guess those are also now Realtek units. Sad day 🙁
    Avoid these:
    https://www.amazon.co.uk/gp/product/B07CVJYV3G/

    1. Interesting as the SP27 are only 10A, not 13A like the SP23.
      Dodgy products now and poor advertising.
      Some are advertising with improved Realtek for WiFi reception.
      Time to wait and find other ESP tuya products.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.