This guide is for setting up WebControl on Raspberry Pi using @johnboiles disk image. Attribution: Original posted to the Software category by @tinker.
Conventions: command = text to enter at the command prompt
[key] = hit the keyboard key with the text displayed
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.
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
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.
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.
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â.
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
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â.
Enable z-axis (optional)
Click âSettingâ -> 'Maslow Setting. Scroll down to âZ-axis installedâ and click on the toggle to enable it.
Ideally yes. There are many ways of doing this. I prefer to have my router assign a static IP, as that also assigns a local domain name, but that varies per router manufacturer.
Awesome! Any chance there are step-by-step directions out there for going from a blank SD card on the Pi to a functioning Webcontrol environment with the pyinstaller version? My background is very much not in computer science, but I can read the heck out of some instructions.
Thereâs really nothing special thatâs needed. If you want a headless system without keyboard/monitor, you just need a functioning rpi with network access (i.e., wifi and ssh). Then you use putty or some other terminal application to access it to download, extract, and execute webcontrol. As of right now, I donât have a script developed to autorun a pyinstaller release, so you have to manually run it.
Gotcha. Iâm good with getting wifi and ssh taken care of through raspi-config, but itâs the download, extract, and execute commands that Iâm not familiar with.
Is it as simple as using the following command to download and extract it after getting wifi and ssh up and running?
No problem, we are all learners⌠below is a list of commands⌠the wget and the URL are all on one line, it might look like two separate lines on your screen
The ./ is important on Linux systems. The & at the end tells it to launch in a separate session so it doesnât close out when you shutdown or lose ssh connection.
The ./ is important on Linux systems. The & at the end tells it to launch in a separate session so it doesnât close out when you shutdown or lose ssh connection.
actually, to be sure that it doesnât shutdown when you logout, you need to then
to
disown %1
otherwise, even if itâs in the background, it will shutdown if you logout.
(and with some apps, you need to add </dev/null >/dev/null 2>/dev/null to make
sure that closing stdin/stdout/stderr doesnât cause the app to exit)
Iâm hung up on one last part. Everything is installed and working properly, except for the /etc/rc.local part.
I can get into the file and edit it, but Iâm not adding the right code to get webcontrol to run.
My last attempt was removing everything in the file except for the exit 0 at the end and then adding the following line to try to run webcontrol from the directory.
Based on my recent googling, if you are running it from rc.local, it is run as root. Therefore it is my understanding that since you are not typing it from the command line, you should be able to use this line in your rc.local file:
/home/pi/webcontrol/webcontrol &
and not need the âdisown %1â at the end. If you were typing it in, you would use the disown so when you log out, the process would not stop. If it works, I think you are good to go. When you log out is the web page still being served?