Go Down

Topic: New sonoff TH10 different pinout? (Read 521 times) previous topic - next topic


Mar 18, 2018, 01:17 am Last Edit: Mar 18, 2018, 01:23 am by wolph42
Hi, newcommer here. I'm starting with a rather big project to automate the floorheating in my house. I've just purchased some basic electronics including an arduino and a sonoff TH10 (the one with the temp and humid sensor). I've read several articles on how to flash the esp8266EX that on there BUT I've noticed that the sonoff I received is different then in the articles.

My question: does this sonoff have the same pinout and method to flash? I've added a couple of fotos of the board and as you can see its a v2.1 dating 2017-6-8. Please advice (or reassure :D).

note that I already soldered pins on the board.


Well, it appears that no-one knows. So here an update. I went ahead and tried to flash the Sonoff TH10. Good and bad news.

Good news: after some tinkering (the issue turned out that I hadn't set the flash size to 1M as I didn't know where to do that) it flashed completely according to the description.

Bad news: it turns out that the firmware wasn't compatible with the the TH10 so it doesn't do anything anymore. I can still flash it though, tried several things but none (appear to) work.

If anyone has some pointers where to look for working code for this type, let me know!


What system do you intend to use to read/control your TH10 with as there are a few firmwares for that device but unless we know if your rolling your own system or using an off the shelf system we don't know what one to suggest.
Possible places to look are

Don't PM me for help as I will ignore it.


Hi Riva,

Thank you for the reply. I initially intend to use Blynk, currently experimenting with that and so far so good (except for this Sonoff that is).

I've did some digging and asked around on gitub and they came with the same suggesstion to use Tasmota and after checking I noticed 2 things:
1. its compatible with he TH10
2. it clearly states that if you use any other flash method then DOUT the sonoff turns into a brick (as it did with me) now I can't recall which flash method I used but these are enough leads for some trial and error. So im gonna try to get tasmota compiled on ide and then flash the sonoff using the DOUT method.

If you have any further pointer, pls let me know! Thank you.


ok I've gone through all the instructions and after flashing it with the default sonoff .bin file its no longer bricked. However I also can't get it to connect, which is probably because its a TH10 and not the usual sonoff.

What i cant get to work is compiling any of the sketches that come with it. e.g: compiling: xdrv_07_home_assistant.ino gives the following errors:

Arduino: 1.8.5 (Windows Store (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, ck, 26 MHz, 40MHz, QIO, 1M (64K SPIFFS), 2, v2 Lower Memory, Disabled, SSL+TLS_MEM, Only Sketch, 115200"

Archiving built core (caching) in: C:\Users\ROLPHS~1\AppData\Local\Temp\arduino_cache_931258\core\core_esp8266_esp8266_generic_CpuFrequency_80,ResetMethod_ck,CrystalFreq_26,FlashFreq_40,FlashMode_qio,FlashSize_1M64,led_2,LwIPVariant_v2mss536,Debug_Disabled,DebugLevel_SSLTLS_MEM,FlashErase_none,UploadSpeed_115200_007cfbad64b6ffec161ff98b5041ce3a.a
C:\Users\ROLPHS~1\AppData\Local\Temp\arduino_build_87823/arduino.ar(core_esp8266_main.cpp.o):(.text._ZL12loop_wrapperv+0x4): undefined reference to `setup'

C:\Users\ROLPHS~1\AppData\Local\Temp\arduino_build_87823/arduino.ar(core_esp8266_main.cpp.o):(.text._ZL12loop_wrapperv+0x8): undefined reference to `loop'

C:\Users\ROLPHS~1\AppData\Local\Temp\arduino_build_87823/arduino.ar(core_esp8266_main.cpp.o): In function `loop_wrapper':

C:\Users\Rolph Segers\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/core_esp8266_main.cpp:111: undefined reference to `setup'

C:\Users\Rolph Segers\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/core_esp8266_main.cpp:111: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Generic ESP8266 Module.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


any clue on what i'm doing wrong?

pls note that i want it eventually to work with blynk.

thank you!


First off you should just try to compile and upload the simple blink example supplied with the esp8266 core (not the version supplied with the AVR core)

Once you have that working then it seems all you need to do is download the Blynk library for your esp8266 (see here) and use there code builder to write suitable test code for Bylnk.

The TH10 is basically a stock ESP8266 but breaks out a few of the I/O pins to the TRRS connector on the side (see here) where you can connect various types of sensor. The options supplied with the TH10 (according to the itead site) are Si7021, AM2301, DS18B20, DHT11. To write suitable code you don't need a special TH10 firmware, just standard Arduino ESP8266 core with code & libraries to read the relevant sensor values and the Blynk library to post results to your app.
Don't PM me for help as I will ignore it.


thank you very much for the elaborate explanation. Most of this I already did...and failed. Basically turned the sonoff into a (temporary) brick. As its (most likely, need to test this first) turns out I used the wrong flash method (QIO) while on the tasmota github site it cleary stated that the DOUT method is the only one that works. Its late now, but im gonna retry that tomorrow, if that works then another step has been taken. I still would like to get tasmota working, but thats for a later stage.

once more: thank you

o and great site! (superhouse).


well, tried to flash a basic blynk script but it bricked my sonoff once more. I get no error messages, it compiles, it uploads, and afterwards the sonoff can be used as a book support. I have no clue what I'm doing wrong...


well, tried to flash a basic blynk script but it bricked my sonoff once more. I get no error messages, it compiles, it uploads, and afterwards the sonoff can be used as a book support. I have no clue what I'm doing wrong...
There are so many parameters that can be changed it can be difficult to get right.
Are you setting them the same as shown here or here. Don't forget to not connect to the mains when flashing and to press the button when powering the Sonoff to put it into flashing mode.

If you can get a sketch on that allows OTA programming and the Sonof memory is big enough then flashing code becomes easier as you do it over the wifi connection instead and no need to open the device or remove mains power.
Don't PM me for help as I will ignore it.

Go Up