WebControl Open Beta

I tested my new Pi with linux laptop, i-pad and ardroid phone in the workshop yesterday.
It was when i realised that i shutdown my laptop before the Pi when i thought of asking for this feature :slight_smile:

Here’s an idea.

1 Like

A push-button would work for me and avoiding programming it into WebControl.
The Pi isn’t using the IC2 pin is it?
https://www.reddit.com/r/raspberry_pi/comments/77y22j/combined_restart_shutdown_button_for_raspberry_pi/doprgwm/

Edit:
Tested on Pi3 B+

Simplest hardware solution is a push button between GPIO3 (pin5) and GND (pin 6)
RaspberryPi Power Button
All that is required is to add a line to /boot/config.txt :

dtoverlay=gpio-shutdown,gpio_pin=3

All file system tasks and write operations shut down right away. I assume it’s safe to power off directly.

It takes 2min and 22sec for WebMCP and Docker to stop.


A few seconds later the screen turns off.

Only at this point, the button works also to wake up the Pi again.

My guess is that you can turn of the power directly after pressing the button and don’t have to wait the 2 minutes. From the file system messages, neither WebMCP nor the Docker should be writing at this point. Correct me if i’m wrong, please.

This shuts down in the same way as shutdown -h now or halt does. It does not completely cut the power (like some hardware add-ons do).

2 Likes

Great tip!!

Is it safe to turn off right after pressing the button? :slight_smile:

Questions:

I finally gave up on the Atomic Pi (for now) and loaded up a RasPi 3B+ which seems to be working properly. I have a few questions and possible enhancements based on those answers.

  1. What is WebMCP settings supposed to do? When I click it it appends a hash onto the URL but nothing appears on screen with any settings. I’ve tried FF and Chrome.

  2. Is there a way to automatically start Web Control on boot? I have Web MCP starting but then I have to open that page and manually start Web Control. Seems like an unnecessary step.

  3. If there’s some technical reason for manually starting Web Control, can we add a link to the Web MCP page to the Web Control page? That way I don’t have to manually type in the other URL (port change) or maintain two separate bookmarks.

That’s it for the moment. Unfortunately it may well be June before I can drag the full machine out and do any cutting. I have event prep until late next month, then an event, then a welding gig that might well eat up May. I’ll get it out sooner if I’m able.

I have an embedded pi and an Rpi 2b from awhile ago. I’ve never used the EP and the 2b may need reformatted. I have it in a tackle box with a switch that turns the monitor on/off and a switch that turns the 2b on/off.
I understand so little about this… Would this be useful?
For webcontrol or the second generation stuff?
Should I leave it alone due to the learning curve :joy:? Just looking for advice because if there’s a chance this could be easier in the long run, I don’t want to throw it out (the idea not the tackle box unit):grin:

:mage: I’ve asked my crystal ball and the answer was:

“Only the man named ‘TheMerryYeoman’ can answer this question.”

There is no harm in trying. You are long enough in the Forum to know that you will not lack support.
You need to learn how to write a pre-built image onto a SD-card. And on first boot, log in and type a few things to the right place. That’s about it :slight_smile:
I don’t know the embedded and tried and test Rpi 2b. It will work if you can connect it wired to your LAN.
If you want wifi, it gets a little more complicated but not unsolvable.

1 Like

I actually have a “WiPi” WiFi dongle for the pi but stole it for the desktop that you were on! I did have a problem getting on line with it (with the rpi) but first try on the windows desktop and bang!
I was told that it needs reformatted. Is that what you mean about the SD card?

Yes, there is a ready made image available that has WebMCP and WebControl already installed.
With the wifi dongle and the arduino i have a ‘overvoltage warning’ with the Pi2b. This is nothing good. Wondering if an additional power-supply for the arduino would solve that issue. I tested a usb-wifi-antenna with its own power supply and that also worked. I would not run the Pi2b permanent without taking care of the warning. It won’t last long. That’s why i suggested wired.

It’s a matter of editing 1 text file and adding the SSID and password for the wifi into it. Save, reboot → connected. (if all goes well :wink: )

Edit: But this is already highjacking this post :frowning: Sorry guys.

1 Like

This would be great (a software button in the interface to turn off the rPi). If I hook a rPi into my current electrical setup, I’d prefer to have it squirreled away behind the wasteboard, which would mean that the main interface is my e-stop button out front. I am certain that I would forget to use a separate button to shut down the rPi :frowning:

Nothing yet… sort of a placeholder.

Not yet, but maybe I can make that a setting :slight_smile: Great suggestion.

No technical reason for manual start. I’m pretty sure I can add a link to the page. Great suggestion.

I added it as a feature request on github.

1 Like

Sweet, thanks!

If you’re using the prebuilt image you don’t necessarily need to log in at all. webMCP will download itself and start automatically.

Yeah we can probably steal the systemd unit file from WebMCP and use it to start up webcontrol as well. Or just have WebMCP start WebControl when it starts up. I don’t feel strong conviction about which is right

Hey @madgrizzle,
I know you had mentioned a difficulty related to managing units changes, and the fallout on all the connected computers.

I believe Ground Control leverages kivy Events to simplify this. However, if you aren’t using kivy, this becomes more difficult.

I just wanted to point to a potential alternative to kivy Events. It is the python Traits module, maintained by Enthought. I believe it is here is a link.

My intent is just to notify you of an alternative. I haven’t followed this closely enough to really know if this is still an issue. So, I apologize if that is the case.

Thanks for the link… I glanced at it and need to study it more to understand it… but yes, I would like to add observer pattern to the program.

Trying to get the machine set up and calibrated using Webcontrol. I decided after some initial testing that my top beam wasn’t long enough so I extended it a couple of feet and moved it up a couple of inches. Now I’m stuck.

I’ve entered the new measurements in Quick Configure. When I go to set the sprockets to vertical it always brings me to extend the chains by 1651mm. That works, but that distance is no longer enough to actually reach the sled, even if it’s hung directly from the top bar. That needs to be a longer distance.

I tried Actions > Reset Chain Lengths but it generates an error saying it can’t find a valid machine position for 1650.99, 1650.99 and to use Actions > Set Chain Lengths. Problem is, that doesn’t exist under Actions. I’ve tried wiping the EEPROM and reloading it but that didn’t help. Wiping the controller data doesn’t help either.

So, how do I get it to extend the chains more than 1651mm? If I push the button twice it doesn’t center the sled.

Under Advanced Settings, there an “Extend Chain Distance” that’s set to 1651. Try changing it to 2032 mm.

1 Like

text logs are small, and it’s not writing at a high rate, so you will eventually
have the SD card break, but I would expect years of service before having any
problems.

I’ve used a Pi for home automation where it pulls data from a bunch of sources
every minute and stores it in a database, this is probably 1000x or more the
amount of activity, and I’ve had SD cards fail after about a year.

so, it’s something to be aware of, but not something to worry that much about.
When the SD card fails, just burn a replacement and swap them out.

David Lang