This is not an issue but an invitation to use a webUI dedicated to grblHAL #7
Replies: 21 comments
-
Hi @terjeio @phil-barrett |
Beta Was this translation helpful? Give feedback.
-
Be patient - I will check it out when I get time to do so. |
Beta Was this translation helpful? Give feedback.
-
Ok. Thanks. |
Beta Was this translation helpful? Give feedback.
-
It works for me albeit with the UI widgets far too large. This is with Win10 and Firefox and Edge browsers. On my stone age tablet it is not usable, but I did not expect it to work on that anyway... IMO by default you should use the IP address from the loaded document to connect to the websocket port, and perhaps issue a warning if connection fails. For grblHAL it would perhaps be nice if you add a Stop button that sends the stop command |
Beta Was this translation helpful? Give feedback.
-
Thanks Terje for providing initial impressions of grblTouch. The thought process behind this UI is as follows which will answer your questions:
There is a known bug (I don't know if it is of webUI or firmware) where if a gcode file is running and you reload the webpage, the machine goes in "Idle" state with only spindle moving and all axis goes standstill. The webUI makes a new websocket connection upon refreshing the page but it should not change the state of machine. Can you throw some light on this? |
Beta Was this translation helpful? Give feedback.
-
I have made a workaround for handling this scenario that relies on the webui issuing an If you add a bit more info in the main page of your repo I can link to it from the webui plugin. Intended target, hardware requirements, screenshots... |
Beta Was this translation helpful? Give feedback.
-
Hi Terje. Thanks a lot for multiple inputs. Please bear with me as I am up to intermediate level in html, css, js. I am a mechanical engineer by academics ;)
Yes, in www folder in SD root. I still don't understand, how I get IP of controller. I can only get IP of the client PC through document object AFAIK, as javascript actually runs there. Server part is enquired by websockets. Still, I will read more on this. If you use DHCP, then yes, you need to only enter the server IP which you know. Still, I will give it a thought to make it automatic.
Noted. So it is better option to stop a program in midway also. I hope it retains the position info without need of homing.
I think I can request firmware details like
It is already added in my readme just a day after I informed you about the repo. Please visit the repo now. |
Beta Was this translation helpful? Give feedback.
-
This?
I depends, if in motion then not - if not in motion then yes. Feed hold followed by Stop is your friend.
That will not work since the SD card "owns" the input stream. You have to send a http request with an ESP command before sending any requests on the websocket stream, IIRC it has to be sent before opening the websoket stream? The job running from the SD card will be terminated immediately otherwise.
grblHAL has the safety measures in place as there can only be one input stream in full control at any time. Other connected streams may send real time commands only. If a non-webui client connects it wants to be able to send commands, this is why I terminate the job and accept input from the sender. I am not in a position to change senders that would allow a job to be temporarily suspended and then resumed... I am all ears if you have a better idea of how to handle this.
I have done a bit of work in the websocket daemon code for this already, but it will still only accept one connection at a time. Allowing more than one will be tricky unless you allow intermingling of commands or limit it to real-time commands only. You can give it a try? I guess maintaining a linked list of active connections is the way to do it. And you have too keep track of the connection that owns full control, and perhaps also add some mechanism for delegating it if that connection is closed.
This is acceptable, but still has to be coded for. |
Beta Was this translation helpful? Give feedback.
-
Noted. Still not convinced about the overly-safe procedures but I will play with the code. Can you just feedhold the machine, instead of reseting it while switching clients? I am considering a case where a 5 hour program has run for 3-4 hours and the page reloads and program stops there. It will be painful to get back right. |
Beta Was this translation helpful? Give feedback.
-
It is an intrinsic feature of the grblHAL stream handling and not coded for explicitly. It is possible to allow for real-time commands from more than one client and I use that for the MPG mode that some drivers supports. The websocket and telnet implementations can be expanded to support multiple clients. But what to do when the client in full control disconnects? Give full control to the second that connected? Inform it about it? Ask the clients for who wants to be in control? Leave none in full control and wait for one to (re)connect? ...?
Possibly, something for you to try?
For web clients this is possible if you follow the procedure I outlined above. The WebUI with the grblHAL ESP32 driver even tolerates a network disconnect/reconnect. AFAIK neither is possible with the Grbl_ESP32 port... |
Beta Was this translation helpful? Give feedback.
-
I downloaded it onto an android tablet but it does not look like what I see on the PC. I noticed it uses Java, maybe that is a problem for my tablet? (older Samsung Galaxy S2 running Android 7). Also, how does GrblTouch connect to a Grbl board? |
Beta Was this translation helpful? Give feedback.
-
Will you please help me to make that code to feedhold instead of reset? |
Beta Was this translation helpful? Give feedback.
-
Hi Phil, thanks for onboarding. This is a webUI. It (www folder) should be copied to the sd card mounted with grblHAL controller PCB, after some basic modification of initial settings in app.js. Then you have to type its IP Aaddress in any web browser in a LAN connected pc/mobile/tablet. THE UI should open in the browser itself. So it hosts a webserver from sd card itself. Your client has to connect via IP address only. |
Beta Was this translation helpful? Give feedback.
-
Going into feedhold is, I believe, easy, replace this line with To get back to streaming from the SD card you have to trap cycle start like I do in the tool change code and then restore the neccesary pointers to read from the SD card when the cycle start is trapped. Then you will have to check how senders handle a connection when a feed hold is active... And perhaps trapping and acting upon a cycle start from the control signal input is a bad idea? It should be blocked? |
Beta Was this translation helpful? Give feedback.
-
Thanks Terje. Will give it a try when I am free. |
Beta Was this translation helpful? Give feedback.
-
Hi @phil-barrett, |
Beta Was this translation helpful? Give feedback.
-
@terjeio I have tried 0x19 stop command in my new update but came to know that it doesn't stop spindle. So, in short, I can't use it to stop the program. Is this normal? or I am missing something? |
Beta Was this translation helpful? Give feedback.
-
I fixed a regression where the spindle was not stopped on 0x19 in late january, which build are you using? |
Beta Was this translation helpful? Give feedback.
-
Thanks for reply. I am sure my build is older than january. Will update it. |
Beta Was this translation helpful? Give feedback.
-
Hi @terje, document.location.host works. Thanks for your valuable input. So in my next release, there will no need to configure ip inside app.js file. |
Beta Was this translation helpful? Give feedback.
-
I have just released a major update for grblTouch. Following are the improvements:
I am running my webUI for production use, so it is extensively tested for teensy4.1 driver. Now I can say, it is full fledged UI and nothing else is required if you use it with raspberry pi with 7 inch touch screen. Startup scripts for starting chromium browser in kiosk mode can be used so that when the machine starts, it displays UI in full screen. Chinese cheap mini keyboards are a great companion to this UI as a wireless pendant. I welcome any suggestions from your side. Use of "stop" command instead of "reset" will be done after some time, as my machines are having old firmware now. When I will find time, I will change both firmware and software UI. Here is the link to repo for your ready reference https://github.com/karoria/grblTouch. Waiting for your valuable feedbacks. Cheers, |
Beta Was this translation helpful? Give feedback.
-
Hi @terjeio @phil-barrett
I have developed and hosted an open-source webUI compatible to grblHAL. It is almost fully functional now. I invite you to kindly use it and give your suggestions for improvement. The project is hosted at https://github.com/karoria/grblTouch
Waiting to hear from you.
Cheers!
Ravi
Beta Was this translation helpful? Give feedback.
All reactions