ITEAD Sonoff Flashing Problems

Hello, I’m new here and I have a question concerning the flashing of an ESP8266 described in “ITEAD Sonoff switches and sockets - cheap ESP8266 Wifi+MQTT hardware” (this one).

I’m not sure if this ist the right place to ask for help, if not tell me :smiley:

I have tried PlatformIO and the Arduino IDE.
I followed every step in the tutorial, deleted everything after it did not worked and redid every step. :see_no_evil:

PlatformIO says:

File "c:\.pioidepenv\lib\site-packages\platformio\managers\", line 291, in download
    fd = FileDownloader(url, dest_dir)
  File "c:\.pioidepenv\lib\site-packages\platformio\", line 51, in __init__
    self.set_destination(join(dest_dir, self._fname))
  File "c:\.pioidepenv\lib\", line 85, in join
    result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position 13: ordinal not in range(128)

and some more before.

Arduino IDE says that Header files are missing.

Since this is the first time I used PlatformIO I don’t know how to go on. With the Arduino IDE I tried diffrent versions and also copied the header files from elsewhere but it did not work. I have no idea what to do next so I created an accout to ask the community :smiley:

Thanks for your help :slight_smile:

I think you should go with PlatformIO. It’s way easier.
Now regarding the error, I’m not sure but it seems there is either a problem with your installed python version or you are using invalid Sonoff-Tasmota sources. Reinstall Python, check the PlatformIO setup instructions, Download the latest source code zip from here:

Good luck!


I just came home and followed your tip, but it did not work.
After digging in the PlatformIO GitHub page I found out that the PlatformIO parses through the whole project to find dependencies. For this Python is used with utf-8 I think. My username has an “ö” in it so in couldn’t parse the project.
That was the problem… :blush: For further information one can look here.

Unfortunately, now I have this error:

.piolibdeps\IRremoteESP8266_ID1089\IRremoteESP8266.cpp: In member function ‘void IRsend::sendKelvi
nator(unsigned char*)’:
.piolibdeps\IRremoteESP8266_ID1089\IRremoteESP8266.cpp:625:14: error: ‘KELVINATOR_STATE_LENGTH’ wa
s not declared in this scope

I will post the solution to this one as soon as I have found it. :joy:

Update: It seems to be a known problem

It finally works

After an evening of problems I finally did it. Thank you to @ThomDietrich , it really helped.

For other users with similar problems here’s a little summary:

  • the unicode decode error appears when your sonoff project has a filepath with non latin letters. (e.g. C:\user\ hellöäü\desktop\sonoff-tasmota)

  • to use PlatformIO change your user name or move the directory (I used: C:\onlylatinletters\sonoff-tasmota)

  • the problem when the Arduino IDE is missing header files, seems to be connected to broken libraries

  • therefore always use the latest version

  • the last problem (kelvinator_state_length) is caused by a corrupted library. It’s a known problem and will probably be corrected in further releases.

  • you can fix it manually if you use the Arduino IDE and follow the steps postet in the github issue. (link in post above) The platformIO solution that was posted there did not work for me tough.

I hope this was some help to somebody. I had fun finding the error and willl probably order the next sonoff device today :smiley:

1 Like