Hints on how to tuya-convert the teckin SP-10

After many google searches and viewing many youtube video’s - I’ve found a way that works consistently to use tuya-convert with those cheap-o Tekin SP-10 plugs.

These procedures - for me - worked regardless of if the SP-10 was already connected to the cloud or if they’re new out of the box.

DISCLAIMER: Follow these directions at your own risk as YOU will be held accountable for any damage done or loss of functionality, not I.

First - get a raspberry PI. I flashed it with raspbian-stretch. (Or a Linux installation that has both Ethernet and a wifi interface that isn’t being used.)
Next, in the raspberry PI, open the command line and follow the directions to install tuya-convert until you get to the “Device information” step found here: https://github.com/ct-Open-Source/tuya-convert

Then open up the file ‘device-info.txt’ to get the MAC address of the SP-10. Use that MAC address to add an entry in your router’s DHCP server for future reference.

Next I run this one:

curl http://10.42.42.42/flash3

Then, on your mobile device, in WiFi, connect to the sonoff device that is listed.
After connecting to the sonoff device, on the mobile device open your browser and go to this URL:

http://192.168.4.1

That is where you configure your sonoff device to connect to your WiFi network. DO THIS CAREFULLY because it will be a headache later if you get this wrong!

Save the configuration change you made to wifi and it should connect to your network.

Next, in a browser that is on your local network, access the sonoff device using the DHCP address you assigned.

When you connect to the sonoff device, click on “Configuration” then “Configure Module”.
Change the “Module Type” to “Generic (18)”. Then click “Save”.
It will reboot.
When it returns from the reboot, go back to “Configuration” and again to “Configure Module”. This time make the changes in the graphic found on this page: https://github.com/arendst/Sonoff-Tasmota/wiki/Teckin-sp10 If that image isn’t there, this is the same image:

Carefully make your settings match the ones in the image. Click “Save” and it will reboot.

When it returns from the reboot, go back to “Configuration” and “Configure MQTT”. Change the “Host” to match your home assistant installation that is running an MQTT server. Change the “User” to “homeassistant” (or to whatever your MQTT server requires)
and “Password” to what you have set. Change the “Topic” to be your “friendly name” you want it to use in your home assistant configuration. NOTE: Do Not Add Spaces of Special Characters to your “Friendly Name”. Click “Save” and it will again reboot.

And, finally, in your home assistant “configuration.yaml” add the following:

switch:

  • platform: mqtt
    name: -WHATEVER NAME YOU WANT-
    state_topic: “stat/-Your MQTT Topic-/RESULT”
    value_template: ‘{{ value_json.POWER }}’
    command_topic: “cmnd/-Your MQTT Topic-/POWER”
    availability_topic: “tele/-Your MQTT Topic-/LWT”
    qos: 1
    payload_on: “ON”
    payload_off: “OFF”
    payload_available: “Online”
    payload_not_available: “Offline”
    retain: false

Obviously change “-WHATEVER NAME YOU WANT-” to fit your needs.
To get the “-Your MQTT Topic-” - in your sonoff, click “Information” in your main menu. Scroll down to where it says “MQTT Topic”

Save the configuration.yaml. Check for errors by going to “Configuration”, then “General” and click on “Check Config”. If all is good, then click “Restart” below.

Your device will show up in your “unused entities” or in your “States” (which are where you see the “<>”)

Hope this helps someone on the same journey!

5 Likes

I found this super helpful man…thank you!

Does this still work? I have converted a bunch of light switches with tuya-convert (on my pi) but this new plug doesn’t work.
I am not sure what this step is:

Also there is no longer a device-ino.txt that I can find.
as I just run the command ./start_flash.sh. Once it is running, it will eventually stop and I don’t know how to run other commands while this is running.

Just thought I’d note that the SP-10 devices, though all the same on the outside, can have considerably different controllers on the inside. One I took apart had a Realtek controller (“T112_v1.1” on the daughter board) instead of an ESP.

If anyone figures out how to get HomeAssistant to access this edition without going through an external Internet service, do let me know.

– Brian