I think I need a tutorial for a dummy. I have an RPi 3 B+, and all the trimmings including a touch screen. I feel like a dummy but can’t figure out if I need to configure the RPi with one of the available Os offerings or just the webcontrol package? If there is already a tutorial on this please point me to it.
Webcontrol is a package that you install on top of a standard Raspian image, you
can use either the light or the full image. If you want to run a browser to
access webcontrol on the same pi (with the touchscreen you mention) you will
want to install the full image.
there was a long thread recently on installing webcontrol, but I don’t remember
the title offhand
To set up your RPI, you have 2 options for the basic OS called Raspian:
raspian Lite (current version is Buster)
or
raspian (current version is Buster)
the first option does not have the ability to display graphics. It is a command line interface (CLI) with just the cursor and looks like a terminal window. The second is the full desktop and since you have a touchscreen this would be the option.
In both cases, you do open a terminal window if you are on the desktop version or simply type in the command line (don’t type the "$ ". It represents a command line command : EDIT → the $ show up in the preview on the right when I make the post, but once it saves, some of them get stripped out. no idea why):
$ mkdir webcontrol
$ cd webcontrol
$ wget https://github.com/madgrizzle/WebControl/releases/download/v0.927/webcontrol-0.927-rpi-singledirectory.tar.gz
$ tar -zxvf webcontrol-0.927-rpi-singledirectory.tar.gz
(927 is the version as of today. Verify the newest version here). Run the program:
$ cd webcontrol
$ ./webcontrol
halt it with CTRL+C
if you want it to run in the background of your window, you can do this:
$ ./webcontrol & disown %1
The disown is supposed to kill the terminal print messages so you don’t see them, but it didn’t work in my ssh window however the & puts the process in the background so commands can be entered at the same time.
once you are certain it functions and you want it to run whenever the rpi is on, you can make it run automatically as a service
$ sudo nano /etc/systemd/system/Maslow.service
You can name it whatever you want. Maslow.service, webcontrol.service… totally your call.
paste this in that file and adjust the Description, working directory, ExecStart if necessary:
[Unit]
Description=webcontrol
After=network.target
[Service]
ExecStart=/home/pi/webcontrol/webcontrol
WorkingDirectory=/home/pi/webcontrol
StandardOutput=inherit
StandardError=inherit
Restart=never
User=pi
[Install]
WantedBy=multi-user.target
then exit and save with CTRL+X, Y, Enter
to start it, type
$ sudo systemctl start Maslow
if it works, then enable it and it will start automatically when you reboot.
$ sudo systemctl enable Maslow
if you change the “Restart = never” line to “restart=always” then it will try to restart whenever it crashes, but it won’t allow itself to shut down when you click on the upgrade link. you will have to manually stop it.
Once you have the server side running, if you are on command line, you are done for now. To open the web browser on your desktop version, use your mouse to open the webpage and use “http://localhost:5000” as the web page address and you should be able to interact with it.
Type $ ifconfig in a terminal window, you can get your IP address and use that on your phone with :5000 at the end and control Maslow from your phone via webcontrol. Do the same on your design computer (whatever the type) and you can upload gcode to it. Import your groundcontrol.ini file using the actions->import button in webcontrol, to avoid recalibrating.
Another nice option is if you set up /home/pi/.WebControl/gcode as a shared SAMBA folder (instructions here), and give that folder permissions, you can open the folder from your design computer and drag and drop your gcode in without uploading via the web page. This is not entirely necessary, but I find it easy to do. More recently, when I generate gcode, I have it save there directly so no copying or uploading is required.
Many thanks, I will give it a go tonight. Your patience and effort on behalf of a Raspberry neophyte is much appreciated.
can we turn this into a wiki page please?
David Lang
Sure. I’ll put it in for webcontrol setup on RPI 3. @ShadyG, please modify the wiki with any updates or clarifications you can suggest based on following the instructions.
Will do, installing raspberian now, If I can get that done sucessfully tonight I will move on tomorrow.
Got down to
$ ./webcontrol & disown %1
could not proceed.
txt file of terminal window attachedrun webcontrol.txt (3.1 KB)
to make sure, first try
$ ./webcontrol
(but when you close the ssh window, it will close the process and your window is busy until you stop the process or log out)
alternatively
$ ./webcontrol &
will allow you to get back the prompt and be able to type commands, but you will still have status information printed on the terminal.
I’m at the edge of my understanding. the “disown %1” I copied from a post doesn’t do what I thought it did. To test the system, just run
./webcontrol
the output should look like this with some variation depending on your directory names:
/home/pi/.WebControl/log.txt
Initializing Configuration
Camera initialized
##
raspbian gnu/linux
##
-—
rpi
singledirectory
-—
Starting Console Queue Processor
/home/pi/.WebControl/webcontrol-*.port
-$$$$$-
/home/pi/wiiControl/main.py
/home/pi/wiiControl
-$$$$$-
opening browser
Checking latest pyrelease.
starting Maslow GPIO button service
Latest pyrelease: 0.927
Your error looks like it was running twice and the second instance isn’t happy. When you load the web page does it show up?
Will work on this again tonight, thanks for working on this.
I tried all of the above the following is the result evey time. run webcontrol2.txt (3.7 KB)
edit: after I initially posted this I tried and was able to connect to webcontrol. Strangely the terminal continues to repeat “trying to connect on”. Is this because it cannot find the maslow?
yes. its trying to connect to the arduino controller but a port hasn’t been set yet, so that’s why its blank after “on”.
Thanks guys, I have not tried connecting to the Arduino yet, I was just trying to get webcontrol installed and connect to it. I need to work on importing the ground control settings now, the settings I have now are really good and I don’t want to recalibrate unless I have to.
(i.e., should work by going to Actions->import groundcontrol.ini file and select your current file )
The command ./webcontol & disown %1 works just fine. The problem was user based.
I changed the post, because when I tried it, it didn’t work either. If you are just using it to test out the system, it isn’t needed anyway. The service won’t show you the terminal prints.
I was able to import groundcontrol.ini. It pointed to COM3, so that is what webcontrol is looking for now. I haven’t connected the maslow yet so I don’t know what that will do.
When you connect it, it should sync settings with the controller and off you go.
if you are using a rpi, you will need to click the refresh on the right (in maslow settings) and select the tty/ACM? port where ? is a number, most likely 0 and then it will connect.