ESP8266 Web Interface - new files layout, adding build documentation

Discussion about various user interfaces such as web interface, displays and apps
Post Reply
llange
Posts: 19
Joined: Mon Jul 04, 2022 11:22 am
Location: FR

ESP8266 Web Interface - new files layout, adding build documentation

Post 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 !
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

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

Post by johu »

very nice, saw it on github but haven't had time to check it out yet
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
llange
Posts: 19
Joined: Mon Jul 04, 2022 11:22 am
Location: FR

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

Post 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.
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

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

Post by johu »

sure
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
vwbrady
Posts: 246
Joined: Mon Dec 16, 2019 1:18 am
Location: Seattle, WA
Has thanked: 5 times
Been thanked: 11 times

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

Post by vwbrady »

great README. very clear. hope to get my web dev wife to look at this interface at some point.
llange
Posts: 19
Joined: Mon Jul 04, 2022 11:22 am
Location: FR

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

Post 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 !
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

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

Post by johu »

thanks, merged it
The other ones are "draft". Is it something you have to change?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
llange
Posts: 19
Joined: Mon Jul 04, 2022 11:22 am
Location: FR

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

Post 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)
llange
Posts: 19
Joined: Mon Jul 04, 2022 11:22 am
Location: FR

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

Post 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)
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

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

Post 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
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
llange
Posts: 19
Joined: Mon Jul 04, 2022 11:22 am
Location: FR

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

Post 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
MattsAwesomeStuff
Posts: 871
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 278 times
Been thanked: 165 times

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

Post 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
llange
Posts: 19
Joined: Mon Jul 04, 2022 11:22 am
Location: FR

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

Post 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 ! :-)
llange
Posts: 19
Joined: Mon Jul 04, 2022 11:22 am
Location: FR

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

Post 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.
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

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

Post 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.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply