Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New web GUI based on bootstrap.js #19812

Merged
merged 21 commits into from Oct 21, 2020

Conversation

exilaus
Copy link
Contributor

@exilaus exilaus commented Oct 19, 2020

Requirements

Description

Advanced web socket for default Marlin websocket (no esplib no esp3d).

Unique part no work are upload file, have issue to sync with M28 G-code on web socket, feel need improve Marlin to have direct access of SD (for cpu like ESP32).

Tested on E4d@box board.

Live Demo: https://e4d.atbox.tech/Gui/?ip=10.10.10.10 (upload version in this post no have any reference to e4d@box)

Benefits

improve web gui and no use external projects

Issues

Sync issue on upload file via M28 G-code. Need help to improve default Marlin web implementation.

@exilaus exilaus changed the title Bugfix 2.0.x new web gui for marlin Oct 19, 2020
@thinkyhead thinkyhead changed the title new web gui for marlin New web GUI based on bootstrap.js Oct 19, 2020
@thinkyhead
Copy link
Member

Thanks! I did a large merge to bring this up to date, and since this PR was originally based on code from ancient times you may want to recheck to make sure it still functions with the latest codebase.

data/www/index.html Outdated Show resolved Hide resolved
@exilaus
Copy link
Contributor Author

exilaus commented Oct 19, 2020

I did a large merge to bring this up to date, and since this PR was originally based on code from ancient times you may want to recheck to make sure it still functions with the latest codebase.

Sure, that developed on 2.0.6 bugfix...anyway give me 2 day recheck all with last bugfix.

Next steps are:

  • implement another method for upload file from web
  • where possible ,like in esp32 , move webserver/websocket process on core1 for dedicate core0 to Marlin .

@thisiskeithb
Copy link
Member

Can the main title/header be simplified to just “Marlin WebUI” or use the printer’s name like “3D Printer WebUI” (since there’s already a Marlin logo).

The “E4d@box” credit would still be listed on the info page, so it wouldn’t be removed.

@exilaus
Copy link
Contributor Author

exilaus commented Oct 20, 2020

little issue guys, i just upload last bugfix with new GUI and old GUI same result http server on wesocket feel down.. start to dig for undestand why.

image

@exilaus
Copy link
Contributor Author

exilaus commented Oct 20, 2020

found why no see websocket never start MYSERIAL1 from marlincore.cpp and never start.
now force start to use MYSERIAL1 and now web socket open but feel other changed continue to investigate.

image

@luc-github
Copy link
Contributor

luc-github commented Oct 20, 2020

looks like now NUM_SERIAL is not set like before in ESP32 Hal (https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/src/HAL/ESP32/HAL.h#L56-L62) but in main Hal (https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/src/HAL/HAL.h#L28-L32) and so not set anymore for ESP32 and wifi bridge

#ifdef SERIAL_PORT_2
  #define NUM_SERIAL 2
#else
  #define NUM_SERIAL 1
#endif

since :
4b928b2#diff-b433648b73ac70dda9c5db91bedfecab3660ca687743277c040cd870fa60c5ec

@exilaus
Copy link
Contributor Author

exilaus commented Oct 20, 2020

Luc you are right ...
But resolved without touching code setting configuration.h Need enable SERIAL_PORT_2 -1 and websocket working fine with that parameter.

@vivian-ng
Copy link
Contributor

While this is being added, how about a minor fix to HAL.cpp for ESP32? Haven't had time to look into it, but it affects the stepper control on ESP32-based boards that do not implement I2S stepper stream.

Change:

void HAL_init() { i2s_init(); }

to:

void HAL_init(void) {
#if ENABLED(I2S_STEPPER_STREAM)
    i2s_init();
#endif
}

Linked to this issue.

@exilaus
Copy link
Contributor Author

exilaus commented Oct 21, 2020

While this is being added, how about a minor fix to HAL.cpp for ESP32? Haven't had time to look into it, but it affects the stepper control on ESP32-based boards that do not implement I2S stepper stream.

Vivian-ng please can contact me and check and fix thogheter that part ok? regards Mauro.
ok checked post linked too verify and put in pull that fix too.

@thinkyhead thinkyhead merged commit 4fe4fb0 into MarlinFirmware:bugfix-2.0.x Oct 21, 2020
@thinkyhead
Copy link
Member

thinkyhead commented Oct 21, 2020

Let's continue to refine and improve. It would be good to see the build info, machine name, etc., in the title, meta info, and on the page.

The word on the street is that Duet3D / RepRapFirmware dropped bootstrap.js for their web interface in favor of vue.js because they were hitting limitations.

@rhapsodyv
Copy link
Sponsor Member

Let's continue to refine and improve. It would be good to see the build info, machine name, etc., in the title, meta info, and on the page.

The word on the street is that Duet3D / RepRapFirmware dropped bootstrap.js for their web interface in favor of vue.js because they were hitting limitations.

I use react in my startup. But, for Marlin, react, vue or angular, could add complexity for the users, we will need a JS bundler to build and process the Javascript. Bootstrap+html just run as it is...

I'm not against it, just a warning point.

@thinkyhead
Copy link
Member

This is a good starting-point and should be refined, quite a lot. Modern displays have a lot of space, and this seems to be optimized for a small Raspberry Pi display. I would like to see a clean aesthetic similar to that of the OctoPrint default theme applied to all of our interfaces.

thinkyhead pushed a commit to thinkyhead/Marlin that referenced this pull request Oct 21, 2020
sebsx pushed a commit to sebsx/Marlin that referenced this pull request Oct 25, 2020
Speaka pushed a commit to Speaka/Marlin that referenced this pull request Nov 2, 2020
@darkberg
Copy link

darkberg commented Dec 2, 2020

This is a good starting-point and should be refined, quite a lot. Modern displays have a lot of space, and this seems to be optimized for a small Raspberry Pi display. I would like to see a clean aesthetic similar to that of the OctoPrint default theme applied to all of our interfaces.

Actually, it was made for mobile phone control, with minimal data usage. Of course, it's a starting point, to test / control E4d@box board. Any updates are / will be more than welcomed.

vgadreau pushed a commit to vgadreau/Marlin that referenced this pull request Dec 9, 2020
tharts pushed a commit to tharts/Marlin that referenced this pull request Jan 6, 2021
kpishere pushed a commit to kpishere/Marlin that referenced this pull request Feb 19, 2021
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
thinkyhead added a commit to thinkyhead/Marlin that referenced this pull request Apr 28, 2021
thinkyhead added a commit to thinkyhead/Marlin that referenced this pull request Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants