WebControl RaspberryPi Install from Image file

This guide is for setting up WebControl on Raspberry Pi using @johnboiles disk image.

Conventions:
command = text to enter at the command prompt
[key] = hit the keyboard key with the text displayed

  1. Download the disk image to your computer:
    https://drive.google.com/file/d/132811KALMXDlxUa9jGZdCv1eB2lz09Ws/view

  2. Write the disk image to a SD card:
    2.1 Linux
    2.2 Mac
    2.3 Windows
    2.4 Chrome OS

  3. Connect Rapberry Pi
    3.1 Insert the SD card into the Raspberry Pi
    3.2 Connect HDMI video cable
    3.3 Connect keyboard and mouse
    3.4 Connect Ethernet cable
    3.5 Plug in the USB cable from the Maslow control board to the Raspberry Pi.

  4. Initial Connections
    4.1 Power on the Raspberry Pi and wait for login prompt
    4.2 Login using default credentials
    4.2.1 Login: pi
    4.2.2 Password: raspberry

  5. Setup Raspberry Pi:
    Use Cursor keys to navigate, [Tab] to cycle through prompts, [Space] to change options. [Enter] to execute selected prompt.
    5.1 At the command prompt enter: sudo raspi-config [Enter]
    5.1.1 Configure Localization option (not needed if in default UK).
    5.1.1.1 Select ‘Change Locale’. USA users should select “en_US.UTF-8 UTF8” using [spacebar] to highlight it. Unselect “en_GB.UTF-8 UTF-8”. [Tab] to ‘OK’ prompt and hit [Enter].
    5.1.1.2 ‘Select Debian default locale’ . USA users choose ‘en_US.UTF-8’. [Tab] to ‘OK’ prompt and hit [Enter].
    5.1.2 ‘Network Options’ - Select ‘Wi-fi’. Select your country: e.g. US. Enter your SSID (Wifi name) and passphase.
    5.1.3 ‘Interfacing Options’ - Select ‘SSH’ and select ‘Yes’ to enable if you plan on using the Rpi without a monitor.
    5.1.4 Select ‘Finish’ and hit [Enter] to save.

  6. Check networking
    6.1 Enter ip addr show [Enter] at command prompt.
    6.2 Look at ‘wlan0’ (for wifi) or ‘eth0’ (for ethernet cable) and check for IP address. e.g 192.168.1.110. Jot this down for later.
    6.3 Enter ping -c 4 google.com [Enter]. You should get four responses ending with ping time. Your network is working. If you get ‘Request timeout’ then something is wrong with network config.

  7. Wait for WebControl to download.
    If networking is working then Webcontrol will start downloading the Docker image. This can take a while (~15 mins) depending on your connection.
    7.1 You can enter top [Enter] at the command prompt to see a list of current processes. You should see a ‘Docker’ process running at the top. It will appear and disappear. When ‘Python’ process starts then everything has completed. Hit [Q] to exit out of ‘Top’.

  8. Connect to WebControl
    8.1. On your computer/tablet/phone open a browser and go to http://maslowpi.local:5001.
    8.2 If that does not work then use the IP address from earlier e.g. http://192.168.1.110:5001
    You should see the WebMCP control page.
    8.3 The main Webcontrol UI is on port 5000. http://maslowpi.local:5000

  9. Upload GroundControl.ini file (if you have one).
    On WebControl page select "Action’ on the menu, then ‘Import Groundcontrol.ini File’. Select the file on your computer and click ‘Submit’.

  10. Enable z-axis (optional)
    Click ‘Setting’ -> 'Maslow Setting. Scroll down to ‘Z-axis installed’ and click on the toggle to enable it.

  11. Enjoy!

9 Likes

This is useful, so I copied it to the Wiki category (with attribution, of course). There was nothing in the Wiki category about WebControl, except for one mention in one topic, so I think a more general “Introduction to WebControl” article needs to be written. I could take a stab at it, but there are people around here who are much more qualified. Someone who has actually used WebControl, for example.

1 Like

Is this using the prebuilt image with docker? If so, we probably need to update
the image (and instructions) for the single-directory non-docker version since
the docker image isn’t getting updated with each new relese (as I understand
it)

David Lang

1 Like

I don’t update docker nearly as much as the pyinstaller releases. I’m trying to build the docker update now to see how it works with all the additions. My process is to make new things work in pyinstaller, get it out for people to test and provide feedback and in the meantime, test it on docker and make necessary changes to get it to work there as well.

I’d prefer that everything be moved to docker, but I don’t have a prebuilt image for pyinstaller so I’m trying to keep the docker alive… honestly I’ve got so much going on that I probably won’t put one together for it. I started looking at this: https://raspap.com/ for the networking but right now I’m focused on other things.

Yes, this uses the WebMCP docker.

Did not see instructions on the WebControl github page for using pyinstaller so thought this image would be the quickest/best method to get setup quickly.

So the pyinstaller is bleeding edge beta testing and docker is more stable (but still beta)?

Let me know if you want anything tested with docker update. Have everything on my desk right now and will take it to the shop this weekend to test run it.

early on, Docker had an advantage in that there was a clear way to upgrade it.

Now that the pyinstaller version can update itself, I’m not sure that there is
any advantage to the docker version.

The pyinstaller has advantages in being smaller, and in having direct access to
the OS (for things like setting up the network on a Pi)

If the docker version didn’t already exist, would there be any reason to create
it?

in the long run, should we be focusing on the pyinstaller version and migrate
the docker version (possibly by making the docker version be just a pyinstall
version running inside docker for those people who don’t want to reinstall it?)

David Lang

The only real advantage to the docker version is that someone made a prebuilt image that could be used for a rpi in a completely headless installation. If the same was done for the pyinstaller version, the docker would be obsolete.

Thanks for the “how-to” @tinker
I wanted to try this mystery (for me it is :wink: ) WebControl and did everything on that list.
Now I think everything is done but I cant open the WebControl via the told https://maslow… neither the IP.
By the way is it the first that shows up at wlan0 after inet or the second IP after brd?

Could you guys please support me?

-kompass

Try the ip address at port 5001… so if pi was 192.168.1.100, try 192.168.1.100:5001. That will launch webmcp where you can then start/stop/upgrade webcontrol. It will eventually be switched over to pyinstaller version, but the docker is the easiest to get started with.

Thanks to the reply. Seemed to need some time. Today I started and wait and now it worked!
Problem is that I dont have WIFI in the basement… Now I have to think what to do maybe I buy a used router and just install it in the basement for using it with the maslow only…

I have another question. Whats the three custom/stock/holey Firmware updates for?

Thanks so far @madgrizzle really a big and very nice project you realized here!

-kompass

Stock firmware is the one from the official Maslow repository… you can run triangular calibration with it. Holey firmware is the one that supports holey calibration and updated kinematics formulas…it hasn’t yet been adopted into the official repository, so it’s available there for people to use. Custom firmware is for something I work on (optical calibration) and shouldn’t be used. It likely will disappear as an option in the next release.

which version of Pi are you using? if it has built-in wifi you can configure it
in access point mode

search for “configure a raspberry pi as an access point”

otherwise a used wifi router is a good option.

David Lang

Madgrizzle, I cannot thank you enough for the work you have put into this to make it happen!

I have a pi 3b+ running this now and I am able to connect to it through a browser. I have gone through the steps you outlined.

I uploaded my old “ini” file.
I changed the com port (and can connect)
I enabled the “Z” axis

I am having an issue trying to move the motors. If i command a move, nothing happens. The motors do not come on.

The only thing that is shown in the “Controller Messages” area is:
Connected on port /dev/ttypr

This message repeated several times and was the only thing in that box if I scrolled to the top.

I switched back to my laptop (I was using originally). I made a few simple moves and I was able to verify it was not an Arduino or shield issue.

I am very excited to be able to use a pi and not have a laptop tied to the machine. I just wish i could figure out what simple thing I am overlooking!

Thanks in advance!

1 Like

I had a similar problem (nothing happens if you do ‘test motors’ under settings,
correct?)

to go gcode -> send custom gcode and enter B99 off in case fake servo has
somehow gotten set as it did in my case.

David Lang

1 Like

ttypr doesn’t sound like the correct port for the Arduino… is there something like ttyam0 or something?

1 Like

Thanks to you both for the FAST responses! I was doing a complete reinstall just in case i missed something.

When I refreshed the com port after after uploading the “ini” file, the only option shown earlier was the one I posted.

I just went back and checked and now had two additional options. I switched to ttyACM0 (ACM1 was also an option now) and we are in business!!!

I knew it would be something simple and it was!! thanks again.

I have a I have only had this up and running for about 2 weeks and already upgraded to the meticulous z style sled. My wife has been using this machine a TON.

I would eventually like to put a touch screen on the pi to run some basic functions on it (bit change, load file, start-stop).

Currently, I am beyond happy that this is working like this!

Thanks again!!

I did have one more quick question:

I see that you have implemented easy access to the GPIO pins through webcontrol. Are the pins being monitored for inputs or are they set up as outputs?

Example, if I set GPIO2 to “Shutdown”;
Is it looking for a switched input to trigger a shutdown?
-or-
Is the state of the pin changed (hi-lo or lo-hi) upon the Gcode ending and triggering a shutdown?

I would like to run something like this:

It looks like I could control this directly from the pi. How difficult would this be to implement?

Thank you very much for the help and all that you do for the Maslow community!

1 Like

Regarding the screen… know that using a web browser on the pi running webcontrol works, but I don’t know if it will slow webcontrol down or not. It shouldn’t be showstopping or anything if it does. Please try and report back.

Regarding gpio… I have no gpio connected to test with. So give it a try and let me know what you need it to work if it doesn’t. Shutdown is in input to trigger the rpi to “gracefully turn off”.

1 Like

some GPIOs are inputs (like the shutdown) and some are outputs (like motor
control)

I was very impressed by how simple this config is.

David Lang