Powstro (sonoff) [multiple trials] - SOLVED

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Powstro (sonoff) [multiple trials] - SOLVED

#1 Post by NDR008 » 15 Jan 2018, 09:34

Hi guys, first post here.
I have used ESP-Easy on a LoLin board.

Yesterday I tried programming a SonOff clone - Powstro.
Unfortunately some ebay sellers are selling it is a re-branded SonOff, but they are actually not.
https://www.aliexpress.com/ios-module_reviews.html

But it indeed does have an ESP8266, but the chip is different from what I have seen so far.
It is an ESP8266-S3:
https://fccid.io/2AKBPESP8266-S3/User-M ... 791.iframe

Tasmota group have been able to flash it:
https://github.com/arendst/Sonoff-Tasmota/issues/1419
Indeed, I have succeeded to flash Tasmota and set it up correctly.

However, whenever I tried to compile ESP Easy and flash it, it seems to work.
But the ESP never boots (or at least I cannot see any wifi activity and nothing seems to be sent over serial).

As of now, I messed up my Arduino setup while trying to make ESP Easy work.
So I will try to resolve that later.

But maybe I can get this problem solving rolling by asking if anyone can figure out what gives?
As you may read, the PowStro has 3 LEDs and a push-button installed.
I wonder if some GPIO is preventing ESP Easy from booting based on its default?

(I am have lwpip header problems - may need help with that later too).

Thanks everyone!
Last edited by NDR008 on 19 Jan 2018, 21:31, edited 2 times in total.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Powstro (sonoff)

#2 Post by Shardan » 15 Jan 2018, 12:15

Hello,

it should be possible to flash and use that chip. Due to datasheet it is a ESP8266 with 1 MByte, no additional serial processor chip or something alike.

So the precompiled "1024" binaries should fit that chip.
As it is not specified which flashram type they use it might be necessary to use DOUT mode for flashing.

Regrds
Shardan
Regards
Shardan

NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff)

#3 Post by NDR008 » 15 Jan 2018, 15:37

Hmmmm, that is how I had my IDE setup.
DOUT
1M

Will re-solder the header and give it a try.

If not, how do I flash a pre-compiled bin in Linux?
Thanks.

For my education, what is DOUT?

Thanks.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Powstro (sonoff)

#4 Post by TD-er » 15 Jan 2018, 16:57

DOUT is the slower interface to the flash chip.
See: https://github.com/letscontrolit/ESPEas ... -322781542

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Powstro (sonoff)

#5 Post by Shardan » 15 Jan 2018, 19:16

NDR008 wrote: 15 Jan 2018, 15:37 Hmmmm, that is how I had my IDE setup.
DOUT
1M

Will re-solder the header and give it a try.

If not, how do I flash a pre-compiled bin in Linux?
Thanks.

For my education, what is DOUT?

Thanks.
Just use a flash tool like ESPtool or one of the many tools that are availlable.
They usually get the name of the binary as a parameter or entry field.
Regards
Shardan

Zeric
Normal user
Posts: 18
Joined: 29 Mar 2017, 22:37

Re: Powstro (sonoff)

#6 Post by Zeric » 15 Jan 2018, 21:29

I suggest watching the serial port during boot and see what it says. In my case it showed that the checksum did not match, that clued me in to it being a corrupted write as opposed to some issue with the binary itself. The default baud rate is slower than people typically use. I just used the arduino serial monitor and set the rate to 74880 baud, but any serial terminal program should work as long as it support this less common rate.

On a recent sonoff device I needed to slow down the flash frequency and use DOUT get a good write, DOUT alone didn't seem to do it.

esptool.py --port com3 write_flash --flash_mode dout -ff 20m 0x0 espeasy.bin

NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff)

#7 Post by NDR008 » 15 Jan 2018, 21:57

In my case I compiled and uploaded tasmota.
So I later tried esp-easy in the exact same setup...

I will try powering it with external power (not the USB TTL supply).
Maybe esp is needing more juice even to boot?

Zeric
Normal user
Posts: 18
Joined: 29 Mar 2017, 22:37

Re: Powstro (sonoff)

#8 Post by Zeric » 16 Jan 2018, 05:29

If tasmota is loaded and is working okay using your existing setup then I doubt the flashing setup or power is the issue. The power requirements of espeasy post flashing (before fully configuring in the web browser) shouldn't be much different than a new tasmota install (from what I recall, both just spin up an access point then wait for someone to connect). I use a cheap chinese CH340 USB/serial converter to flash sonoffs all the time for espeasy (and occasionally tasmota) without issue. It boots just fine and I can do the initial configuration through the web browser while it is still powered by the serial converter. I've even left them powered only by the serial converter for days at a time and they have never glitched or gone offline. I don't know your setup so YMMV.
Image

Here is another thing to try...
I've occasionally found that the flash needs to be completely erased before changing firmware. Why this sometimes is required, and other times it's not I've never investigated, maybe someone else knows.

The most sure way I've found to do this is to write a blank bin file that is the same size as the flash chip (explained here http://www.pratikpanda.com/completely-f ... sh-memory/). Providing the write process is working correctly, that will ensure no left overs from the old config interfere with the new one. I've used the 1MB file provided at the bottom of the above article several times on sonoffs that have gone into weird boot loops or other strange behavior to fix them (then of course flashed the desired FW). There is no need to use Espressif flash tool, any flashing software will do such as esptool.exe or esptool.py. Both esptool.exe and esptool.py have erase functions, but it's unclear how thorough they are. I know esptool.exe erase has not fixed issues that were resolved by a writing a blank file.

NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff)

#9 Post by NDR008 » 16 Jan 2018, 06:46

Similar setup.
Will try again.

Image

Image

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Powstro (sonoff)

#10 Post by papperone » 16 Jan 2018, 07:23

can you post a picture of top PCB with closeup of ESP8266 module?
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff)

#11 Post by NDR008 » 16 Jan 2018, 08:31

Will do so tonight.
But it obviously looks exactly like in the PDF.

In notice many people send these switches back thinking that they are not compatible.
But we should be able to get it working.
I just wonder if the unconventional gpio LEDs is holding it from booting up at all.

NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff)

#12 Post by NDR008 » 16 Jan 2018, 19:09

First update, so actually there is no device name on the chip:
Image
Image
Image
Image

Unfortunately I broke the switch. :P

NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff)

#13 Post by NDR008 » 16 Jan 2018, 20:19

What memory size and SPIFF is the minimum I can compile for?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Powstro (sonoff)

#14 Post by Shardan » 16 Jan 2018, 20:35

NDR008 wrote: 16 Jan 2018, 20:19 What memory size and SPIFF is the minimum I can compile for?
As mentioned above due to datasheet it is a ESP8266 with
1 MByte of flash.
Regards
Shardan

NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff)

#15 Post by NDR008 » 16 Jan 2018, 20:39


NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff)

#16 Post by NDR008 » 16 Jan 2018, 21:14

I gave up for today.

Something seriously wrong with my Arduino setup..
I cannot get TASMOTA to compiled and upload either (even though it is running on this thing already)
It keeps asking me for IRsend.h

So I think I have to figure out what's wrong with my Arduino IDE setup first.

Maybe upgrading to ESP 2.4.0 broke it?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Powstro (sonoff)

#17 Post by TD-er » 17 Jan 2018, 00:17

If you're going to use it, don't use it with high currents.

And can you look at the used flash chip? Does it have any labels on the flash chip indicating "PUYA" ?

NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff)

#18 Post by NDR008 » 17 Jan 2018, 07:23

TD-er wrote: 17 Jan 2018, 00:17 If you're going to use it, don't use it with high currents.

And can you look at the used flash chip? Does it have any labels on the flash chip indicating "PUYA" ?
I couldn't find puya.
Why low current?
I was going to power an Ikea 10W Led e24 bulb.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Powstro (sonoff)

#19 Post by TD-er » 17 Jan 2018, 19:42

NDR008 wrote: 17 Jan 2018, 07:23
TD-er wrote: 17 Jan 2018, 00:17 If you're going to use it, don't use it with high currents.

And can you look at the used flash chip? Does it have any labels on the flash chip indicating "PUYA" ?
I couldn't find puya.
Why low current?
I was going to power an Ikea 10W Led e24 bulb.
The PCB's which carry the load are quite thin and not covered with tin.
So when you will try to get like 5 - 10 A through them, their temperature will rise.
10 Watt is fine, but such devices are often sold to be able to handle 10 Amps or more and they simply cannot.

NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff)

#20 Post by NDR008 » 17 Jan 2018, 21:01

Should I solder some parallel electrical cable?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Powstro (sonoff)

#21 Post by Shardan » 17 Jan 2018, 22:09

For a 10W LED it should suffice....
For more it should be enforced.
Regards
Shardan

Zeric
Normal user
Posts: 18
Joined: 29 Mar 2017, 22:37

Re: Powstro (sonoff)

#22 Post by Zeric » 17 Jan 2018, 23:38

Agreed, I would never try to run 10A through these, 1-2A should be ok, maybe 200 watts at most (non-inductive load!!). Not only are the traces questionable, I wouldn't trust the tiny relay either.

These are great for home lighting which these days is fairly low power, but they are not for heaters, refrigerators, full size desktop computers, or pretty much anything with a motor - power tools, garage door opener, etc.

NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff)

#23 Post by NDR008 » 18 Jan 2018, 09:42

I'm safe then, as i only want to use it power single 240V-10Watt LED lamps.

NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff) [multiple trials]

#24 Post by NDR008 » 19 Jan 2018, 16:38

So I need to re-try to flash myself (I tried again, but I now noticed that my GPIO0 was soldered incorrectly second time around).

Over on the openhab community someone failed to flash it via a linux flashtool, but managed to flash TASMOTA from Arduino (as I did).
From TASMOTA, they made an OTA update of the ESP_EASY.bin (Version 120, 1MB size).
ESP_EASY could then run.
They then tried to OTA the latest ESP_EASY, but that fails.

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Powstro (sonoff) [multiple trials]

#25 Post by enesbcs » 19 Jan 2018, 17:08

NDR008 wrote: 19 Jan 2018, 16:38 From TASMOTA, they made an OTA update of the ESP_EASY.bin (Version 120, 1MB size).
ESP_EASY could then run.
They then tried to OTA the latest ESP_EASY, but that fails.
I am not familiar with ESPEasy 120, only using Mega versions... but as i know, Tasmota 5.9 did not use SPIFFS, but ESPEasy uses it, so it can be a little problem.
On 1MB module did you use the intermediate ESPEasy OTA binary, or the v120 is small enough to fit in 400k?

NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff) [multiple trials]

#26 Post by NDR008 » 19 Jan 2018, 17:19

Hmmm, but TASMOTA saves user settings, is that not SPIFF?

Not possible to flash ESP_EASY SPIFF-less anyway?
When I flashed TASMOTA I selected 1M(64K SPIFF).

NDR008
Normal user
Posts: 35
Joined: 15 Jan 2018, 09:24

Re: Powstro (sonoff) [multiple trials]

#27 Post by NDR008 » 19 Jan 2018, 21:26

I finally got it to work.

I do not know why, but it seems I hard to start the flash within a short window of powering it on:

python esptool.py -p /dev/ttyUSB0 write_flash --flash_mode dout -ff 20m 0x0 ESP_Easy_v2.0-20180116_normal_ESP8266_1024.bin
esptool.py v2.3-dev
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Flash params set to 0x0322
Compressed 574976 bytes to 378527...
Wrote 574976 bytes (378527 compressed) at 0x00000000 in 33.5 seconds (effective 137.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting...




When I waited a couple of seconds, this happened:
python esptool.py -p /dev/ttyUSB0 write_flash --flash_mode dout -ff 20m 0x0 ESP_Easy_v2.0-20180116_normal_ESP8266_1024.bin
esptool.py v2.3-dev
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Powstro (sonoff) [multiple trials]

#28 Post by enesbcs » 31 Jan 2018, 20:54

NDR008 wrote: 19 Jan 2018, 17:19 Hmmm, but TASMOTA saves user settings, is that not SPIFF?

Not possible to flash ESP_EASY SPIFF-less anyway?
When I flashed TASMOTA I selected 1M(64K SPIFF).
In the official Arduino compilation FAQ it is clearly stated that: "1M (no SPIFFS)"
https://github.com/arendst/Sonoff-Tasmo ... rduino-IDE
It is also described here:
https://github.com/arendst/Sonoff-Tasmo ... smota-Tips

At ESPEasy i found this on behalf the Mega version:
https://www.letscontrolit.com/wiki/inde ... SPEasyMega
"It will use native SPIFFS support and all older custom flash access routines will be dropped"
I did not found any other documentation about SPIFF usage in ESPEasy.. but
1/ The deployed platformio.ini only contains lines with SPIFFS only setups
2/ And ESPEasy.ino contains the following error message string:
"No (or too small) SPIFFS area..\nSystem Halted\nPlease reflash with 128k SPIFFS minimum!""

So i guess that you are correct and latest ESPEasy versions can not be compiled in SPIFF-less.

Zeric
Normal user
Posts: 18
Joined: 29 Mar 2017, 22:37

Re: Powstro (sonoff) [multiple trials] - SOLVED

#29 Post by Zeric » 03 Feb 2018, 08:59

Flaky issues when writing, and odd required timing would qualify, could be related to the power supply. Adding a capacitor can help. Since I last responded on this thread, I was having some flakey writes on a device that was solved by adding a 470uf low voltage cap at the power output of my serial board.

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests