Browser Based Ground Control and/or REST API

I like Ground Control, and continue to give feedback to improve it because it is a very useful tool. That said, I sometimes wish there was a browser based interface that I could use on other devices (Android phone/tablet). Right now I am using a Linux laptop as the Ground Control host, but it must be within USB cord reach of the device, and it would be super convenient to have a headless machine that served up a web UI for interacting with Maslow. The big benefits I see to a browser based interface is it is device agnostic, which would allow a lot of flexibility in usage. I do realize the concerns of leaving the machine not monitored, but that is something you can do with Ground Control now.

Is this something others are interested?
If so, what would be the preferred implementation solution?

I was imagining a component that provided a REST API that performed the serial connection and the interaction with the Arduino. Then a UI component that served up the HTML. There are tons of technologies that could provide this, but as a general high level view of what I was thinking.

This REST API component could even be migrated for use with Ground Control. Then you could run Ground Control on whatever device, and it could communicate to the Maslow via a headless machine that was connected to the Maslow via USB and provided the REST API over the network.

The communication diagram would look something like:

Maslow Arduino 
    <-> USB cable <-> 
headless machine 
    <-> REST API over network <-> 
GroundControl/Web UI
1 Like

A different approach, but there is a discussion over here that might be germane, and @mrfugu is actively pursuing it.
Are you looking for something similar to OctorPrint, or setting up something like OctoPi for the Maslow?

Your link did not work, and I can’t find anything on that topic in the Github issues or in this forum.

I’ve never used octoprint but if it allows me to not be tethered and gives me a control interface that is useful on most any platform, then yes, that is my query.

Sorry, I’ve fixed that link :slight_smile:
I think you’ll finbd that OctoPi and OctoPrint are to the 3D printing world what you are proposing for the Maslow. There may be a way to build on that.

Reading about Octoprint’s Plugin system (it is written in Python so it may be possible to reuse parts of Ground Control), and it is very intriguing because it may be flexible enough to provide enough Maslow functionality to be useful. From my cursory reading of their Developing Plugins sections it looks like almost any aspect of Octoprint can be customized or even completely replaced.

I think what you are asking can be done using a Raspberry PI 3 and a bit of work.
I believe the MaslowCNC already will work with the Raspberry PI 3.

An example of remote control using another Raspberry PI 3 board attachment :
The Protoneer Raspberry PI CNCHat board can be ran remotely using a web browser.

“To show some of the possibilities we have created a Web / Browser app to allow users to remotely control their CNC machines. (Welcome to the Internet-Of-Things)”

1 Like

If I understand this product correctly then to get this to work the Maslow Firmware would need to be re-written to support the Protoneer hardware and using the GRBL communication protocol. It is certainly a direction people could go, but I’m not interested in modifying the current hardware and firmware.

The headless machine in my proposal could be a RaspberryPi, but this CNC Board/Hat is not compatible with how Maslow works, as I understand it.

I was not suggesting that the Maslow Firmware be re-written to support the Protoneer hardware,
I was just suggesting that by using a Raspberry Pi 3 as the wireless - headless front end to the current Maslow firmware and Hardware it might be possible with a modified Groundcontrol program running on the Raspberry Pi 3 to do a web browser interface from another computer using the WIFI of the Raspberry Pi 3.
The Protoneer hardware is more designed for CNC with Stepper Motors and not geared DC motors.
I was using the example of the WIFI to Raspberry Pi 3 to Protoneer CNCHat as a direction to follow to implement a WIFI to Raspberry Pi 3 to MaslowCNC hardware.
What I am suggesting is a version of Groundcontrol software that goes out to WIFI instead of direct to hardware. You would then have Web Browser Groundcontrol to WIFI then WIFI to Raspberry Pi 3 to MaslowCNC hardware. This way you can be in your nice quite office with a window to the workshop controlling and monitoring your loud router powered MaslowCNC.
Essentially this is what the Protoneer is doing in the example I had linked.

Perhaps this browser-based Vnc would be another approach?
[edit] Another approach might be to improve/complete grbl compliance which would enable one of several web-based grbl front ends.

the Pi would be the “Head”, so this wouldn’t be a “headless” setup :slight_smile:

That said, the firmware is supposed to be grbl compatible, so once things are
setup, you can use any grbl compatible sender.

Ground Control will happily run on a Pi as well.

@TomTheWhittler I think the Octoprint plugin system seems like a nice solution to provide a web interface, and pieces of Ground Control can likely be re-used in a similar way to how you are describing with a RaspberryPi.

@blurfl and @dlang To run Ground Control on a RaspberryPi you need to be running X and a windowing manager, the VNC might work but it still needs a windowing manager. I’m looking for a web based interface so that I don’t need to worry about having that running on the Pi, hence why it is called ‘headless’ because there is no screen required.

@dlang Yes I hope so for the GRBL compatibility, but I do wonder how calibration would be done because I doubt other GRBL compatible software would understand how to perform the Maslow calibration. Maybe that is not the point and a person would still need to use Ground Control to calibrate? I’ve not wrapped my head around what using a GRBL compatible client would provide other than using other solutions to cut.

you need ground control to calibrate, but once calibrated, you should be able to
just use any grbl sender.

If calibration data needs to be sent to the arduino at startup (possible with
recent changes), the codes that need to be sent can be saved/written into a file
and you send that file with the grbl sender at startup.

I was excited when I saw this response so I tried using GRBLWeb from a raspberry Pi and while it moves (shakes) the Maslow when it connects and it receives some “RESP:” messages, I am unable to control the machine using that GRBL sender.

1 Like

I lied, my issue was the baud rate.

Once I changed the baud to 57600 the “RESP:” messages ended up being the current position of the sled.

Now GRBLWeb will let me move the sled using the arrows in the bottom left.

I am still trying to figure out why changing the Z axis causes it to stop responding until I restart the RaspberryPi. I have not tested loading any GCODE yet.



If you find out what’s going on and it’s an issue on my end let me know and I’ll fix it.

Great work!

In my quest for a web based GCODE sender I found cncjs! GRBLWeb had not been updated in years and cncjs seems to be actively developed and it looks amazing!

After installing it on the raspberry pi using their instructions and adding my user to the dailout group it was able to connect to Maslow and jog around the sled. It also was quite easy to connect to the fisheye picam using mjpg.


Even with this software attempting to move the Z-Axis results in the following response:

Message: Please adjust Z-Axis to a depth of +6.02 mm
Maslow Paused

I need to figure out how to enable the Z-Axis before sending this command and I need to find what to send to “unpause” Maslow. I may look into creating a webpage version of the Maslow settings (and calibration) screens.

1 Like

Check out LaserWeb/CNCWeb. It’s under active development and has been run on a tasty pi. There’s a helpful G+ group, might even find a moose lurking there

1 Like

Got it! The z-axis is setting the machine to pause!

I believe the trick to unpause is to send it the ‘~’ which is the normal Grbl unpause command. If it knows it has a z-axis it won’t pause at all and should be fine

Thanks for the responses.

@mooselake LaserWeb/CNCWeb look very similar to cncjs, ill check it out too.

@bar my GRBL and GCODE knowledge is non-existant, thanks for the tip. @bar Looking at the Ground Control source in GitHub I thought I would just need to send the settings messages B12 and B03 to enable the Z-Axis but that did not work. I recreated my settings messages by hand, sent them to the machine and received a “Machine Settings Updated” message for B03 and an “Ok” message for B12 but the Z-Axis still causes it to pause. Is there something else I am missing?

These are the lines I sent:

B12 I1 J8148.0 K10 M6.35 N3.17 P7560.0 S400 T5 U10 V20 W1 X0
B03 A2438.4 C1219.2 Q3007.84 E771.14 F216.535 R139 H79 Y1 Z100

I appreciate any help you guys can provide.

That sounds like you did exactly the right thing, the fact that it’s moving at all means that at least some of the settings got through. The relevant part of the B12 command is the I1 part. What happens if you send just the command B12 I1 ?