Page 1 of 1

ESP8266 Web Interface - new files layout, adding build documentation

Posted: Tue Jul 12, 2022 7:07 pm
by llange
Hello,

As I wanted to get my hands dirty with the web interface code (not the HTML ; but the .cpp) and compile it, I did have some small troubles setting up a dev environment.

I took some notes, and reworked a little the file layout of the main git (https://github.com/jsphuebner/esp8266-web-interface) to make it a little bit easier to build using the Arduino IDE.

I wanted to share this to gather feedback, and see if this could be useful to somebody out there. And if johu is OK with the direction it take I'll happily send PRs to apply to the main git.

See it here https://github.com/llange/esp8266-web-i ... -mdns-name

It's mostly release engineering (no new or visible features and there should be no regression), you can see the differences here https://github.com/jsphuebner/esp8266-w ... -mdns-name :
  • Change the layout so that Code and Data are untangled. This helps building the filesystem without having to move the files. It'll mostly benefits newcomers (as experienced users already have their own approach to that)
  • Update the README, add some documentation around Arduino IDE : first time setup and day to day usage
  • Add support for PlatformIO dev environment (project files + documentation)
Some bugfix and new feature also slipped in:
  • Fix mDNS registration of the board so that it appears at inverter.local as expected
  • Publish the Web Server (port 80) on mDNS
Next on my list (depending on the feedback):
  • Using github actions workflow to build a new release at each compile / branch / tag and publish it ready to download on GitHub
  • Migrate the filesystem to LittleFS to get rid of the warnings if people find it worthy (SPIFFS is deprecated - works fine but will certainly stop being available at some point)
  • Store the git version / tag / ... during the build phase (as a define) and find a way to display it somewhere on the interface

Thanks for whatever feedback you want to share !

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Tue Jul 12, 2022 8:20 pm
by johu
very nice, saw it on github but haven't had time to check it out yet

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Wed Jul 13, 2022 4:05 pm
by llange
Thanks @johu for your feedback on github.
Accordingly, I've reworked the layout, you can have a look at the final layout here :
https://github.com/llange/esp8266-web-i ... -mdns-name

If it's OK for you then I'll open a few PRs for that.

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Wed Jul 13, 2022 4:31 pm
by johu
sure

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Wed Jul 13, 2022 5:40 pm
by vwbrady
great README. very clear. hope to get my web dev wife to look at this interface at some point.

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Fri Jul 15, 2022 7:32 am
by llange
Hey @vwbrady, thanks for the encouraging words ! I'll add another way to update the HTML-ish files soon (a small 'upload.sh' which can be used to upload either all files or a specified file, can be quicker than upload the whole filesystem)

@johu, I submitted the first PR for your review on GitHub : https://github.com/jsphuebner/esp8266-w ... ce/pull/14 .
See you there !

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Fri Jul 15, 2022 8:48 am
by johu
thanks, merged it
The other ones are "draft". Is it something you have to change?

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Fri Jul 15, 2022 9:33 am
by llange
Yes, I need to "rebase" each time you merged the previous one, then I switch the status from "Draft" to "Normal".

I just unlocked the https://github.com/jsphuebner/esp8266-w ... ce/pull/15 for you to apply.

I'll do the same thing for the 2 or 3 left.

(I could do without rebasing I think but I feel that the PR is more readable when only the necessary changes are visible)

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Mon Jul 18, 2022 7:16 pm
by llange
Hi @johu, Now #16 is ready for review also.
If you don't know (yet) PlatformIO I suggest that you have a look at it if you want to script or automate your builds ; it works with Arduino but other Framework, OSes, etc... ; supports multiple boards / cpus / compilers / etc... and is a solid base for reproducibility of builds (you can pin the version of the libraries of course, but also the compilers, frameworks, etc...)

#17 and #18 will follow soon afterwards.

(I'm double-posting here and on GitHub as I don't know which of GitHub and the forum you're reading more often. Tell me if it's an inconvenience)

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Tue Jul 19, 2022 7:04 am
by johu
Thanks, merged. I hardly play with the firmware much, more with the web stuff.

I think your pull requests are a very good example where I can pick small changes. No need to double post here, I'll read both

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Wed Jul 20, 2022 7:12 pm
by llange
Hi @johu, thanks for the last merges.

Still 2 others PRs on GitHub if you want to :-) !

Also, if you find some time, please have a look at my other HW-related question in the forum

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Thu Jul 21, 2022 9:35 pm
by MattsAwesomeStuff
General applause from me, for anyone adding or improving documentation anywhere. It's often a thankless job, so, let it be less thankless with a thanks :P

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Thu Jul 21, 2022 10:41 pm
by llange
Hi @MattsAwesomeStuff, you're welcome, and your kind words are appreciated !
It seems you have been through the same path of documenting things you wanted to understand... so thank you also for your multiple contributions to the project ! :-)

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Thu Jul 28, 2022 11:35 pm
by llange
Hi @johu, sorry for taking your time, but did you have the opportunity to review the two pending pull requests #17 and #18 ?

Let me know if I should change something.

Thanks in advance.

Re: ESP8266 Web Interface - new files layout, adding build documentation

Posted: Sun Jul 31, 2022 8:25 pm
by johu
Currently super busy with building up another solar system, so slipped through. Should have time on my next train ride on Wednesday or so.