GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
chromo23
Normal user
Posts: 130
Joined: 10 Sep 2020, 16:02
Location: germany

GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#1 Post by chromo23 » 22 Jun 2021, 21:38

I use the device to control a filterunit. It worked fine for some months but then at one point it started to look like in the screenshot und connecting to it was unbearably slow and i had to restart it several time to finally access it.
I did a factory reset and uploaded my backup config.dat. Now wifi seems to work fine again but the style of the webgui is still missing. what could this be. Software or maybe an flash memory issue?
espeasy dual.png
espeasy dual.png (130.81 KiB) Viewed 7517 times

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

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#2 Post by TD-er » 22 Jun 2021, 23:14

I think this is a "testing" build, which is trying to load the CSS from an external server that may no longer be cached in your browser's cache.

See:
https://espeasy.readthedocs.io/en/lates ... atic-files

You can also host the files on the file system of the ESP itself.

chromo23
Normal user
Posts: 130
Joined: 10 Sep 2020, 16:02
Location: germany

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#3 Post by chromo23 » 23 Jun 2021, 11:00

It was not a testing build.
It was this one: ESP_Easy_mega_20210114_normal_ESP8285_1M
And the if it would have been a cache problem, then it must have happend with two different devices at the same time because i tried to access it with my laptop and my smartphone.
(While writing this i got the wifi issue again. It wont connect to the router.)
If this is not a known issue i will try another build and or device.

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

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#4 Post by TD-er » 23 Jun 2021, 11:13

OK, then it is probably a timeout thing where the WiFi may have been too busy processing the previous request so it would not serve the requested CSS in time.

chromo23
Normal user
Posts: 130
Joined: 10 Sep 2020, 16:02
Location: germany

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#5 Post by chromo23 » 20 Aug 2021, 16:59

It´s me....again. :D
I still experiencing the same issue and i don’t quite understand it nor am i able to replicate it reliably.
Maybe it has something to do with "Client IP block level: allow all".

Every time install a new device somewhere where wifi is weak i add a button for calling

Code: Select all

WifiAPMode
.
But if i want to configure the device via APMode i have no css an the worst of it all i can not save the rules. Pressing the save button does nothing.... :cry:
I can live without the css but not being able to make changes quickly is annoying.

I testet it also at home with two different subnets where i access the device via port forwarding:
http://ClientRouterWAN_IP:8099 -> i get css..everything is fast and responsive
http://Esp_DeviceIP_inside_the_Client_RoutersNetwork -> loading the pages takes ages and when finally loaded...NO CSS

Switching "Client IP block level:" to "allow local subnet" worked after rebooting the router...i guess but i am not shure

Also using the Accesspoint of an ESP:
192.168.4.1 -> no css
but using the last ip the ESP had in the Network but still connected to the ESP AP -> Webconfig works fine

Did the test with several devices and Firmwares

EDIT: hmmmmm...tried to replicate it with a wemos d1 mini (the other devices were all sonoff) but had no success. it is a mystery :o

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

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#6 Post by TD-er » 20 Aug 2021, 23:38

About the missing CSS.
See: https://espeasy.readthedocs.io/en/lates ... atic-files
The rules are saved using JavaScript, so if that isn't loaded from the CDN servers, it will indeed not work.
And you might also want to test a later build (based on the latest code base as it has been fixed after the last nightly build) to use saving the rules when using an admin password.

Regarding the CDN files not loading.
If you're connecting to the ESP via its AP, you are not connected to the internet.
So then I guess it makes sense to not being able to load those files.
You can upload them to the SPIFFS flash. The files should be stored in the browser's cache as the TTL of these files is set to 1 year.
So you can try to open the link when connected to internet so it will be stored in the browser cache.

"Allow local subnet" is more limiting as it will only allow the web UI to be loaded if both the ESP and your computer (mobile) running the browser are on the same subnet.

chromo23
Normal user
Posts: 130
Joined: 10 Sep 2020, 16:02
Location: germany

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#7 Post by chromo23 » 21 Aug 2021, 11:39

I am an idiot and i am sorry ... i somehow missed the link in the second post :roll:

so if i would upload only the rules_save.js to the device itself it would work?

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

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#8 Post by TD-er » 21 Aug 2021, 14:17

Yep, I guess so :)
Maybe also nice to include the CSS.

chromo23
Normal user
Posts: 130
Joined: 10 Sep 2020, 16:02
Location: germany

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#9 Post by chromo23 » 14 Sep 2021, 12:14

Sorry to bother you again with tis topic.... but the issue is still present as you can see in the pictures (even after adding the css file):
Bildschirmfoto 2021-08-23 um 17.10.41.png
Bildschirmfoto 2021-08-23 um 17.10.41.png (113.99 KiB) Viewed 5791 times
Bildschirmfoto 2021-08-23 um 17.10.11.png
Bildschirmfoto 2021-08-23 um 17.10.11.png (132.22 KiB) Viewed 5791 times
Bildschirmfoto 2021-08-23 um 17.09.51.png
Bildschirmfoto 2021-08-23 um 17.09.51.png (126.55 KiB) Viewed 5791 times
I also recognized that all three devices share the same missing options in factory reset:
the devices are: one sonoff s20(ESP_Easy_mega_20210802_normal_ESP8266_1M) and two sonoff dual r2 (one with ESP_Easy_mega_20210802_normal_ESP8285_1M and one with ESP_Easy_mega_20201227_normal_ESP8285_1M)
missing options.png
missing options.png (22.49 KiB) Viewed 5791 times
and as it should be:
should be.png
should be.png (41.56 KiB) Viewed 5791 times

What i did so far: i flashed one device again with a blank bin and after that with the firmware....no change

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

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#10 Post by TD-er » 14 Sep 2021, 12:37

The 1M builds have LIMIT_BUILD_SIZE enabled, which also means some static files will be served from a CDN.
See: https://espeasy.readthedocs.io/en/lates ... Files.html
You can copy those files to the file system, but given you don't have a lot of space on the SPIFFS, you may need to be selective.

Copy at least the .css file and the file to save the rules.

The factory defaults are also left out on the limited build size versions.
Not sure though if that makes sense on builds where you can't update via OTA anyway.

chromo23
Normal user
Posts: 130
Joined: 10 Sep 2020, 16:02
Location: germany

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#11 Post by chromo23 » 14 Sep 2021, 12:44

But as you can see in the first picture, i already copied the css to the device.
And regarding the factory reset: the last picture was taken from an 1m device (also sonoff s20 ESP_Easy_mega_20201023_normal_ESP8266_1M)
But maybe it changed from the old build to the newer ones?

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

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#12 Post by TD-er » 14 Sep 2021, 12:55

Can you open the page of the device in another browser, or in a browser with incognito mode active?
Just to be sure you're not looking at a cached version of that CSS file.

chromo23
Normal user
Posts: 130
Joined: 10 Sep 2020, 16:02
Location: germany

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#13 Post by chromo23 » 14 Sep 2021, 12:59

TD-er wrote: 14 Sep 2021, 12:55 Can you open the page of the device in another browser, or in a browser with incognito mode active?
Just to be sure you're not looking at a cached version of that CSS file.
i did this with 3 different browsers in inkognito mode and on at least two devices..... do you think the naming of the css file should be without the espeasy- part

edit: i also try to do today a more thorough and systematic test about this issue...
until now the devices where at positions hard to reach and therefore my motivation was low but i have now another sonoff dual r2 here to to test

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

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#14 Post by TD-er » 14 Sep 2021, 13:03

You can always name it "esp.css" as that's an override that was always present.
It looks like that's the only file name that's being searched for on the local file system. => Either a bug, or missing in the documentation.

chromo23
Normal user
Posts: 130
Joined: 10 Sep 2020, 16:02
Location: germany

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#15 Post by chromo23 » 14 Sep 2021, 13:08

ok, thanks so far...
i´ll give an update after testing the new device.

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

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#16 Post by TD-er » 14 Sep 2021, 13:10

I mentioned the needed rename to esp.css in the documentation.
Even if it is fixed in the newer builds, it might still be relevant for older builds out there.

chromo23
Normal user
Posts: 130
Joined: 10 Sep 2020, 16:02
Location: germany

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#17 Post by chromo23 » 14 Sep 2021, 14:22

FINALLY!!!!!!!!!!! :P
It works! esp.css did the trick!
Thank you so much... that made my life a lot easier!

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

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#18 Post by TD-er » 14 Sep 2021, 14:27

You're welcome.

I will have a look at it, to add a link/warning in the UI when files are missing which are needed.
Maybe also nice to have the base URL for the hosted files configurable.
This way a user may host the files on his own server, or maybe even use a different node to host the files.

chromo23
Normal user
Posts: 130
Joined: 10 Sep 2020, 16:02
Location: germany

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#19 Post by chromo23 » 15 Sep 2021, 22:28

TD-er wrote: 14 Sep 2021, 14:27 You're welcome.

I will have a look at it, to add a link/warning in the UI when files are missing which are needed.
Maybe also nice to have the base URL for the hosted files configurable.
This way a user may host the files on his own server, or maybe even use a different node to host the files.
I think that is a nice idea. But more important than that in my opinion is the maintenance of the documentation. For me it is often confusing. Especially that there are two wikis...

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

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#20 Post by TD-er » 15 Sep 2021, 22:50

The wiki is old and will be replaced by the Read The Docs

chromo23
Normal user
Posts: 130
Joined: 10 Sep 2020, 16:02
Location: germany

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#21 Post by chromo23 » 16 Sep 2021, 10:13

I mentioned the needed rename to esp.css in the documentation.
But where did you do this for example? I cannot find it.

Edit: I know that documentation is a lot of work. So if there is anything i can help with let me know. I have not many skills but time and ten fingers to write :)

User avatar
Ath
Normal user
Posts: 1140
Joined: 10 Jun 2018, 12:06
Location: NL

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#22 Post by Ath » 16 Sep 2021, 11:13

It's in this commit, but it hasn't been released so not yet visible in the documentation page, here. With the next release of ESPEasy that page will be updated.

NB: Documentation for Read The Docs is part of the code repository, so easily maintained (added/updated) during development of code, but can also be committed separately, of course. Any help is welcome :D
/Ton

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

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#23 Post by TD-er » 16 Sep 2021, 12:22

Hmm that's strange, I thought I had RTD synced with every commit to the mega branch, but apparently not.
Well it makes sense to have it tied to a Git tag.
I guess we should use these tags too in RTD as it supports versioning.

chromo23
Normal user
Posts: 130
Joined: 10 Sep 2020, 16:02
Location: germany

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#24 Post by chromo23 » 20 Sep 2021, 22:55

Ath wrote: 16 Sep 2021, 11:13 Any help is welcome :D

I still trying to figure out what i could help with without causing more work for anybody else. I thought about something like putting the missing things of the old wiki in the new one.

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

Re: GUI issue on Sonoff Dual with ESP_Easy_mega_20210114

#25 Post by TD-er » 20 Sep 2021, 23:30

chromo23 wrote: 20 Sep 2021, 22:55
Ath wrote: 16 Sep 2021, 11:13 Any help is welcome :D

I still trying to figure out what i could help with without causing more work for anybody else. I thought about something like putting the missing things of the old wiki in the new one.
That would also be helpful.
There is still a rather large number of plugins which do not have proper documentation in the RTD.

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests