WebControl - RaspberryPi Install from Image File

For a headless install, I followed steps 1 and 2 above, then followed:


from step 3 to step 7.
Picked up back here at step 8.
I logged into my router to get the ip address of the raspberry under attached devices.
Once logged in, nothing seemed to be happening for quite sometime, but typing in:
“sudo systemctl status webmcp” seemed to show it was updating files, but with some errors. I rebooted numerous times over several hours but it finally came up once I got to this:
pi@maslowpi:~ $ sudo systemctl status webmcp
● webmcp.service - WebMCP
Loaded: loaded (/etc/systemd/system/webmcp.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-01-04 05:21:51 GMT; 12h ago
Process: 722 ExecStartPre=/usr/bin/docker pull madgrizzle/webmcp (code=exited, status=0/SUCCESS)
Process: 712 ExecStartPre=/usr/bin/docker rm -f webmcp (code=exited, status=0/SUCCESS)
Main PID: 740 (docker)
CPU: 4.167s
CGroup: /system.slice/webmcp.service
└─740 /usr/bin/docker run --name webmcp --network=host -v /home/pi/.WebControl:/root/.WebControl -v /var/run/docker.sock:/var/run/docker.sock -e HOST_HOME=/h

Jan 04 05:21:47 maslowpi systemd[1]: Starting WebMCP…
Jan 04 05:21:49 maslowpi docker[712]: webmcp
Jan 04 05:21:49 maslowpi docker[722]: Using default tag: latest
Jan 04 05:21:51 maslowpi docker[722]: latest: Pulling from madgrizzle/webmcp
Jan 04 05:21:51 maslowpi docker[722]: Digest: sha256:bc380d5a5e62d73a5c8dd0e11db88b589884980099b67ce752992bd19d236580
Jan 04 05:21:51 maslowpi docker[722]: Status: Image is up to date for madgrizzle/webmcp:latest
Jan 04 05:21:51 maslowpi systemd[1]: Started WebMCP.

1 Like

after installing @johnboiles disk image, I shutdown WebControl, stopped WebMCP, and followed the above steps for the pyinstaller version. “./webcontrol &” didn’t work i had to use “sudo ./webcontrol &”. I have no idea what I’m doing, but this seems to work, except once you shutdown, you have to manually start webcontrol?
I’m not sure why I had to wait hours after installing the disk image before WebControl came up. Is the pyinstaller version now the preferred installation, making the disk image slightly outdated? Should I reformat my sd card and install Raspbian Buster Lite, and just follow the pyinstaller version directions again? Or just go play with what I have?

Thank you for your work on this, neat to get this working on the phone.

I’m not sure why I had to wait hours after installing the disk image before
WebControl came up.

It should not take that long, but the system does try to check for updates and
download them if they exist at every startup, so if you have a very slow network
connection, that could be the problem.

Is the pyinstaller version now the preferred installation, making the disk
image slightly outdated? Should I reformat my sd card and install Raspbian
Buster Lite, and just follow the pyinstaller version directions again? Or just
go play with what I have?

The pyinstaller version gets updates with every release, the docker version
(used with the disk image) only gets updated occasionally.

the pyinstaller version is also available for Windows and Mac as well as for
Linux (including the Pi), so it’s what will be used by people who don’t use a
Pi.

So if you want all the latest fixes, use the pyinstaller version.

David Lang

this seems to work, except once you shutdown, you have to manually start webcontrol?

If you want webcontrol to automagically start every time the pi does, then you need to add a script and start it as a service or set it to start as a cron job every time it reboots.

One service tutorial is here. Your script file would have just a couple lines:

#!/bin/bash
/home/pi/webcontrol/webcontrol &

Then you would copy the script file, let’s say you called it webservice.sh, to the correct location (/usr/bin/).

Your unit file would have this line in it at the appropriate location to reference the script you made:

ExecStart=/bin/bash /usr/bin/webservice.sh

With those minor modifications to the tutorial at the link provide, you should be good to go. See if it comes up after you reboot.

I installed a fresh image of 2019-09-26-raspbian-buster-lite, added the ssh and supplicant file, followed madgrizzles direction’s above:

mkdir webcontrol
cd webcontrol
wget https://github.com/madgrizzle/WebControl/releases/download/v0.918/webcontrol-0.918-rpi-singledirectory.tar.gz
tar -zxvf webcontrol-0.918-rpi-singledirectory.tar.gz

and added:
sudo /home/pi/webcontrol/webcontrol &
to rc.local and webcontrol comes up on reboot.

to test:
sudo reboot

Thanks everyone.

2 Likes

So, I decided to follow your example and start with at fresh image of Buster Lite and the directions you indicated from @madgrizzle . Everything seemed to go fine until I tried to run WebControl using

./webcontrol &

And now the rPi has been trying to connect for nearly an hour… This was taken before I left for my daughter’s daycare meeting:

When I returned about 50 minutes later (about 10 minutes ago) the whole screen was filled with “connecting” and it is continuing to do the same.

** EDIT ** I went in and edited the rc.local file to have webcontrol start on startup, which appears to work, but with the same “connecting” loop. I also noticed that it says: "
0.919
v0.919
webcontrol-0.909-rpi-ingledirectory.tar.gz
https://api.github.com/repos/madgrizzle/WebControl/releases/assets/17214522
None
connecting
connecting…"

The reason I mention that is bc of the different version number from the one I installed. Not sure if that’s relevant. Also, I am connected via ethernet and am able to SSH in.

Any advice or diagnosis would be appreciated!

Thanks!

it is trying to connect to the maslow (the arduino), do you have it connected
and powered up?

David Lang

Crap, I am a moron!

That is likely it! I am trying again now…

That message tells you it’s trying to connect to the Arduino… that’s normal on a new install because you haven’t told it the port to use. The latest release, I think, has a slightly more descriptive message.

ah, ok. So, I am able to get to WebControl on my IP:5000 (but not 5001) and am now looking at “Getting Started”

Thank you @dlang and @madgrizzle

Hopefully I can take it from here. This is what comes from only getting to play with the Maslow every few months :frowning:

Here to help… when I see the messages.

Thank you!

Successfully connected! Now I just need to go update the firmware of the arduino. I assume I will need to go to the latest firmware? (perhaps embarrassingly, I am still on version 1.06, but hey, it was working for me)

Use the one included within WebControl (under Actions menu). If you want to try holey calibration, feel free… It’s there…

I had the same reaction to the message :slight_smile:

David Lang

Well, that is handy :slight_smile: I am looking forward to getting more familiar with WebControl. For now, my daddy time is done, so hopefully this weekend will afford me some more time.

Thanks again!

yes, the pyinstaller doesn’t have the supervisor process running on 5001

David Lang

Glad you got it figured out, thought I was going to be in trouble there :slight_smile:
I see an update is available and am doing it now, cool!

So, I was able to get the Maslow moving with WebControl! I am super excited. I was a little worried that the INI file didn’t import properly, but a little playing later and it appears that it did. I did run into a couple of times that the motors would hum, but the sled wouldn’t move, and it only seemed to happen when attempting to move upwards, but I think that has resolved itself.
I have also been getting the notification of an available update, which I attempted to install twice, and it appeared to work, but the notification persists.

I haven’t had a chance to actually run any g-code through it, but I am now in the middle of mounting the rPi and setting up a switch that will shut it down when I turn off the power to the rest of the maslow (through my e-stop) and turn it back on again when the e-stop is restored. I realize that that means a loss of whatever I was working on if I actually use the e-stop, but I figure that if I am in an emergency stop situation that perhaps the hassle of losing a cut isn’t so bad.
I purchased one of these shutdown switches instead of making my own, so I will report back on how effective it is. I’m planning to use a low power relay as a switch (directly powered from a 5V usb outlet for simplicity). Ideally, this will make it easy to start up and shut down and not have the rPi powered on all the time.

I’ll look into it… thats weird.


I thought it updated, and the notification persisted, so I plugged it into the monitor to make sure. Second time it completed, and message went away, and it shows the new version under “about”