WebControl on RPI 3B - boots, ssh works, but no web response

I imaged the 8 GB SD card for my 3B with the Webcontrol image found on the shared drive in the readme.md file.

I added the following to the SD card before ejecting it:

 wpa_supplicant.conf (with appropriate information)

booted rpi: router shows it is there at the router assigned IP address for that mac address.

ssh connects, so that is good. It didn’t the first few times I tried, but, I’m in now…

The issue: IPaddress:5001, IPaddress:5000, all fail to connect. How to start the web service??

I also tried this:

docker run -it -v $HOME/.WebControl:/root/.WebControl -v /var/run/docker.sock:/var/run/docker.sock -p 5001:5001 -e HOST_HOME=$HOME --network=host --privileged madgrizzle/webmcp
docker: Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2/c090355c40e71a72096d5800c800c48c8293ea39bf830f1034ab586a60209ac8-init/merged: too many levels of symbolic links.
See ‘docker run --help’.

If you are using the docker version, it can take several minutes to boot, check
for an updated version, and startup (one of the advantages of the new pyinstall
version)

give it 5-10 min the first time.

David Lang

2 Likes

Thanks David for responding. yes… 10 minutes… or more… I reimaged and started over. This time I started the pi and waited a full 20 minutes before doing anything. SSH connection was rejected, but both web pages showed up. I then shut down the pi, put the ssh file in the root directory of the SD card and then restarted it so ssh and the webcontrol now work!!

It was a toss up for me to initially try the 5" touch screen (already have) with the raspberry pi or to just try webcontrol. With the downloadable image, the webcontrol appeared to be the low lying fruit if paired with my 8" kindle fire tablet. I got it to load, but with the browser address bar, there isn’t much real-estate on the kindle.

When things initially didn’t work with webcontrol, I started installing things for ground control installation on it, but I got hung up on installing kivy because Cython didn’t exist and that rabbit hole was several hours. I bagged both for now and just finished calibration with a laptop. Before I go back to web control or a raspberry pi touch screen, I’d like to learn the freecad tool path.

a 5" screen is small, really too small for WC, but you may want to try going to
full screen (f11) to get rid of the address bar to see if that works.

I find myself using my phone to do the ‘set sprocket to 12 o’clock’ setting, and
then a computer for just about everything else.

David Lang

1 Like

I had 3 issues today with webcontrol:

  1. no motor movement though it said it was connected (is there an amperage requirement for the arduino on the USB? I was connected through a hub and the green light on the motor shield furthest from the USB got much brighter when plugged directly in to the pi. I got the full screen going in web control on the host raspberry pi the motors were not working and I selected both serial ports and neither worked.

  2. How do I troubleshoot webcontrol on the pi? Error logs, manual restart via ssh, etc.? I was trying to enter values for calibration manually and it stopped responding, so I ssh’d in and rebooted. Now webmcp is up, but webcontrol is not responding. Webmcp tries to start and stop webcontrol, but the webcontrol page won’t load anymore and says it is Not Running and Nonresponsive.

  1. How do you export the configuration file from groundcontrol (I see old.ini in the file system) ?
    I reset the chain lengths in groundcontrol - menu was much more intuitive in webcontrol though, but it would not work. Importing it looks really easy in webcontrol.

side question: How many screens can be connected at once? I had 3… the pi, my phone, and my laptop. It was cool to see the screens all change in concert with input from only one of devices.

I had 3 issues today with webcontrol:

  1. no motor movement though it said it was connected (is there an amperage requirement for the arduino on the USB? I was connected through a hub and the green light on the motor shield furthest from the USB got much brighter when plugged directly in to the pi. I got the full screen going in web control on the host raspberry pi the motors were not working and I selected both serial ports and neither worked.

try sending g-code B99 off to disable fake servo mode in case it’s enabled (and
let us know if this fixes it)

  1. How do I troubleshoot webcontrol on the pi? Error logs, manual restart via ssh, etc.? I was trying to enter values for calibration manually and it stopped responding, so I ssh’d in and rebooted. Now webmcp is up, but webcontrol is not responding. Webmcp tries to start and stop webcontrol, but the webcontrol page won’t load anymore and says it is Not Running and Nonresponsive.

there is an option in the webcontrol settings to download a diagnostics bundle,
which includes the config and logs

  1. How do you export the configuration file from groundcontrol (I see old.ini in the file system) ?

you just grab the .ini file and upload it to webcontrol

side question: How many screens can be connected at once? I had 3… the pi, my phone, and my laptop. It was cool to see the screens all change in concert with input from only one of devices.

There is no limit coded, eventually you will overload the pi and things will get
slow, nobody has reported hitting a limit.

David Lang

The problem is webcontrol won’t start. So short of reimaging, what can I do to see what is failing? Is there a way to download its diagnostics if it isn’t running?

how long did you wait? the first time can take a long time (10-20 min)

David Lang

1 Like

we are going on 12 hours.

Something must have gone wrong when your were entering the data… no real idea what, but maybe something got corrupted. Try running it outside of webmcp:

docker run -it -v $HOME/.WebControl:/root/.WebControl -p 5000:5000 --privileged madgrizzle/webcontrol python main.py

VIDEOIO ERROR: V4L: can’t open camera by index 0
Traceback (most recent call last):
File “main.py”, line 33, in
app.nonVisibleWidgets.setUpData(app.data)
File “/WebControl/Connection/nonVisibleWidgets.py”, line 122, in setUpData
self.gpioActions.setup()
File “/WebControl/Actions/gpioActions.py”, line 24, in setup
self.setGPIOAction(pinNumber, setting[“value”])
File “/WebControl/Actions/gpioActions.py”, line 46, in setGPIOAction
type, pinAction = self.getAction(action)
TypeError: ‘NoneType’ object is not iterable

It appears that I must have enabled the camera by accident. I don’t have a camera on it, but I could plug one in if it will help…

No, it’s not the camera . It’s a problem with the gpio. Can you go to ~/.WebControl and grab the webcontrol.json file and email it to masgrizzlemaslow at gmail dot com? To get it running again, if you edit that file and set all your gpio settings values to “” then I think it will start.

1 Like

I removed the gpio settings and webcontrol is serving pages again. Thanks!

Is the GPIO button part not ready for use? I was reading the gpiozero button documentation and it appears that the pins are pulled up and to trigger, they just need to contact ground. Do you have the debounce set?

Well, it was ready for testing but apparently something isn’t working. Did you send me the webcontrol.json file so I can figure out what was the problem?

Sorry. I edited it and didn’t save a copy, then uploaded the ini from my local machine and restarted because it was in fake servo mode. I went back and put the GPIO settings the way they were and saved it and it seems to be ok… until I rebooted. I’ve sent you the file (but your email rejected it) and changed mine back to no GPIO so it starts up again.

The only thing different is that GPIO assignments that were not blank are below:

13 is “Home”
16 is “Play”
19 is “Return to Center”
20 is “Pause”
21 is “Stop”

After they are set, the system functions fine. The problem is after restarting, the page does not start up.

Ok, thanks… I’ll look into it. Good to know the issue occurs on restart

If you are into doing a little more troubleshooting, redo the settings but only use play, pause, and run (no home or return to center) and let me know if it works on restart.

WebMCP says:

settings updated
gpio2 =
gpio3 =
gpio4 =
gpio5 =
gpio6 =
gpio7 =
gpio8 =
gpio9 =
gpio10 =
gpio11 =
gpio12 =
gpio13 =
gpio14 =
gpio15 =
gpio16 =
gpio17 =
gpio18 =
gpio19 =
gpio20 =
gpio21 =
gpio22 =
gpio23 =
gpio24 =
gpio25 =
gpio26 =
gpio27 =
settings updated
gpio2 =
gpio3 =
gpio4 =
gpio5 =
gpio6 =
gpio7 =
gpio8 =
gpio9 =
gpio10 =
gpio11 =
gpio12 =
gpio13 =
gpio14 =
gpio15 =
gpio16 = Play
gpio17 =
gpio18 =
gpio19 =
gpio20 = Pause
gpio21 = Stop
gpio22 =
gpio23 =
gpio24 =
gpio25 =
gpio26 =
gpio27 =
settings updated
One Machine Position Report Command Misread
One Error Report Command Misread

My actions:
copy working webcontrol.json to webcontrol.json.ok
changed IO 16, 20, 21 as indicated above
in webMCP, shut down the webcontrol
sudo reboot
waited reloading webmcp until it restarted
reloaded webcontrol. it is ok…

I added in the home command on IO 13 and it doesn’t work anymore.

so Home or Return to Home or Shutdown commands are not ok?

Right now, home, return to center, shutdown doesn’t work. I can try to get them added while out of town and update the docker, but no guarantees as I left my laptop charger back at home.

not in a hurry on those if it works… any thoughts on using an unpowered USB hub with the arduino? the port is dropping intermittently on my rpi, so it is losing connection.