Very slow UI on sonoff

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
jchuchla
New user
Posts: 8
Joined: 12 Feb 2018, 04:09

Very slow UI on sonoff

#1 Post by jchuchla » 16 Apr 2022, 03:10

I just flashed an older Sonoff unit I had laying around (V1 I think) with ESPEasy. Build: ESP_Easy_mega_20220328_normal_ESP8266_1M Mar 28 2022 This is the first time i've put it on a sonoff. And it's been years since the last ESPEasy device I configured.

The web UI on this one is dog slow. And many times it times out and doesn't even load a page. Did I choose the wrong image for this model? Might I have done something else wrong while flashing it? Is there any way to improve the web ui performance so that I can actually use it to get this unit configured?

User avatar
chromo23
Normal user
Posts: 821
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Very slow UI on sonoff

#2 Post by chromo23 » 16 Apr 2022, 09:41

I use a lot of different sonoff devices with different versions of espeasy including the latest.
The only times i experienced the problems you describe was when the reception was bad.
And the sonoff basic is the worst in terms of wifi range at least in my pool of devices.

Other than that espeasy has in general a very responsive webui!

sartam
Normal user
Posts: 40
Joined: 13 Mar 2022, 21:25

Re: Very slow UI on sonoff

#3 Post by sartam » 16 Apr 2022, 17:50

Is 8266 installed in sonoff? Maybe 8255?

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

Re: Very slow UI on sonoff

#4 Post by TD-er » 16 Apr 2022, 22:54

Do you have multiple access points with the same SSID (name) ?
If so, then I think it is connecting to the one with the less than optimal signal strength. (and I have a fix for that if you need it)

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Very slow UI on sonoff

#5 Post by ThomasB » 17 Apr 2022, 06:05

I just flashed an older Sonoff unit I had laying around (V1 I think) with ESPEasy.
If you are experiencing the issue on a Sonoff Basic R1 (V1 hardware) then this sounds like you're another victim of an old problem. The symptoms range from slow page loads to no page loading at all. Which fits your description.
Is there any way to improve the web ui performance so that I can actually use it to get this unit configured?
1. Try a Mega Release from Mid-year 2018.
2. Or install a 100K resistor across the MCU's Xtal. Not always successful, but this hack has restored operation in some cases.
3. Or better yet, install the latest ESPEasy Mega on one of your Sonoff modules that has the latest hardware.

- Thomas

jchuchla
New user
Posts: 8
Joined: 12 Feb 2018, 04:09

Re: Very slow UI on sonoff

#6 Post by jchuchla » 20 Apr 2022, 04:34

Thanks guys for the responses. Evidentally i don't get notifications from replies on this forum. Sorry for the delay.

There's only one AP with this SSID, and when I was testing, the Sonoff was within 15' clear line of sight from the AP. Signal strength is good.

Not sure how to tell which chip version is on this specific sonoff. It's a few years old. I've had it in my box of future projects for a few years.

The board says:
Sonoff Basic V2
1.0
2017-10-11

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Very slow UI on sonoff

#7 Post by ThomasB » 20 Apr 2022, 06:03

The board says:
Sonoff Basic V2
1.0
2017-10-11
If you look closer I think you will find that the top line says "Sonoff Basic R2". The text info reflects the hardware version with sketchy compatibility with ESPEasy Mega.

- Thomas

jchuchla
New user
Posts: 8
Joined: 12 Feb 2018, 04:09

Re: Very slow UI on sonoff

#8 Post by jchuchla » 20 Apr 2022, 06:40

So try the old firmware or resistor?

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Very slow UI on sonoff

#9 Post by ThomasB » 20 Apr 2022, 06:55

So try the old firmware or resistor?
Yes, that's what I suggest if you want to install ESPEasy Mega on it. With a bit of luck you might achieve success with one of those tricks.

- Thomas

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

Re: Very slow UI on sonoff

#10 Post by TD-er » 20 Apr 2022, 09:44

Yep, the R2 has some really strange design decisions, regarding component choice and PCB design.
The power supply was designed with the last possible (or maybe not possible) penny-pinching component choices and the copper traces on the board were so thin, you're bound to get voltage drops when drawing current.

Those voltage drops are crucial for WiFi performance as the entire RF calibration is based on the measured supply voltage.
If that fluctuates, the RF parameters of the WiFi radio circuit are off.

There are two reasons the older builds may work:
- Slower initialization of the software, giving the power supply more time to stabilize.
- Core library 2.4.0 or older allowed for a wider range of parameter fine tuning during RF calibration.

That last one, I can prove with a special module I have here which does have a badly designed WiFi antenna.
On more recent builds, I can only make it work by pressing my thumb firmly on the antenna. On older builds with older core lib, it works out of the box.
Problem is, this blob of code handling the antenna matching etc. is closed source.

So on top of the mentioned design choices of the Sonoff Basic R2, it is also possible the antenna design is flawed.
But that's hard to prove, as I'm not going to press my thumb on a Sonoff device while powered from mains voltage.

jchuchla
New user
Posts: 8
Joined: 12 Feb 2018, 04:09

Re: Very slow UI on sonoff

#11 Post by jchuchla » 20 Apr 2022, 19:13

After i was having the trouble with ESPEasy on this unit, i switched over and installed tasmota on it. Tasmota seems to be working just fine. It's a bit curious that tasmota works fine but espeasy does not. I think ESPEasy would have been simpler to configure, but after a ton of googling tasmota is now doing what i need for this particular device. I have one more sonoff from this batch. It has a broken pushbutton that i accidentally broke while scraping the PCB traces to make it a dry contact relay. I'll probably just pitch that one and not even mess with it at this point. So I'll call this closed for now and leave things as they are.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Very slow UI on sonoff

#12 Post by ThomasB » 20 Apr 2022, 19:25

It's a bit curious that tasmota works fine but espeasy does not.
Yes, that observation was mentioned in the past. It is indeed curious that Tasmota has a solution to this issue.

The bug first appeared around 2018. Seems to be related to updated libraries. Or maybe it was related to Linux build flags. Too long ago to remember the details.

Here's the Tasmota discussion about the Sonoff issue. Includes info about their fix.
https://github.com/arendst/Tasmota/issues/3349
https://github.com/arendst/Tasmota/issues/3678

- Thomas

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

Re: Very slow UI on sonoff

#13 Post by TD-er » 20 Apr 2022, 21:06

I re-read those issues from 2018 and I still have no clue why the current builds from Tasmota should work fine, while ESPEasy builds are not on those units.
As Thomas can confirm, it is rather hit-or-miss on those Sonoff basic units as sometimes changing a single display string and recompiling it may make a difference on WiFi stability of those units. But it shouldn't as it should not make any difference in the code running.
The only thing I can think of is that it might be such an extreme critical timing issue that loading some function from flash with the wrong byte alignment may already affect WiFi stability.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 25 guests