Maslow Home Maslow Community Garden Newsletter

Prebuilt Image for WebControl.. Sort of

I swore I posted about this before but I can’t seem to locate it… so here it is… perhaps again

I think I managed to create a recipe to use PiBakery to create and burn a pre-built image for a Raspberry Pi that will automatically install and run webcontrol. I need some testers though.

Step 1: Download and install PiBakery from:


Do NOT download PiBakery V2

Step 2: Download this recipe from the webcontrol github repo:

https://raw.githubusercontent.com/madgrizzle/WebControl/master/webcontrol-us-recipe.xml

Step 3: Startup PiBakery. I think it downloads stuff for a while when it starts…

Step 4: Import the webcontrol-us-recipe.xml file.

Step 5: Go to this portion of the recipe and enter in your WiFi’s network SSID, password, etc.

image

Change the WPA/WPA2 if you are using something insecure and adjust the country code if you aren’t in the U.S.

Step 6: Click ‘Write’ to write the prebuilt image to the RPI.

After done, you should be able to insert the SD card into the RPI, boot it, wait a minute or two (has to download and install webcontrol) and then access it from the RPI’s IP address, port 5000.

1 Like

If someone with a pi 3 and a spare SD card can try this out, I would greatly appreciate it. Please report back as to whether or not it works, particularly the part about webcontrol autostarting on reboot.

Thanks.

I’ll try it out soon, thanks for the work on this.

1 Like

Does it work with the Raspberry PI 3 B+? I can confirm it doesnt work with a Raspberry PI 4.

Anyone got Groundcontrol running on a Raspberry PI 3 or, preferably 4?

cheers,

Pibakery does not support rpi4. Webcontrol will run just fine on an rpi4, but I don’t have a prebuilt image for it. You’ll have to install buster or whatever flavor you want and then download the release, extract it, and run it. It’s really not that hard and there’s some posts on the forum that takes you through all that

I didnt get Groundcontrol compiled on the latest raspbian buster on Raspberry PI 4. Groundcontrol needs way too old libraries. I will give it a another try though.

Anyone knows on which rasbian release groundcontrol will compile?

if you are using a raspberry pi, you are better off with webcontrol, not groundcontrol.

I downloaded, installed, imported your xml link, made a couple changes:

  1. added space before & in every reboot command line
  2. changed 922 to 927 in all file references
  3. put in my wifi information (as instructed)

wrote the SD card


put in rpi and booted it.

It works just fine.

ssh also works:
Capture2PNG

I loaded the lite version. That is the slickest rpi startup I have ever used. I’ll be using that from now on for my other pi images. Now we just need to add the setup for samba and optional hotspot.

Pibakery is based on stretch, so its rather outdated… and doesn’t support RPI4… the author was working on V2 but he’s gone quite for a while now. To make it all work I had to patch a bunch of stuff in pibakery… Ideally we’d just use pi-gen but I can’t figure it out and I’ve got other things to do.

I’ll see what I can do. Pygen is for creating our own distro. Do you want to do that? It would make sense that bibakery if open source could be adapted for buster. It is cool that the are using the scratch programming blocks.

I don’t know that pibakery will ever support RPI4/buster. Ideally we’d have an image with pifi built-in to create an AP initially and allow it to be switched over to a wifi network and then have it download and install webcontrol and run it at every boot. Not much to ask :wink:

I know how to make an AP. I had to for my raspicast device. Most screen casting devices use existing wifi, but I had to set mine up to be the access point so I could stream movies from my phone to my projector for the firepit movie nights. Pi bakery for buster would make a lot of sense, but I don’t know what I don’t know about the degree of difficulty on this. Are you suggesting we have it boot as AP? I wonder if webmin could be used to change it via the web interface, then reboot it to your network or let it run as an access point all the time… I guess then the image would need to include the webcontrol archive… it could be dropped in the /boot folder.

So to add to the ideally… it would boot as AP and offer up a web interface to allow the user to change it to infrastructure. But even if it would boot in AP mode with ssh enabled, someone could log in and change it manually. I suggested this:

because I’m familiar with it… but it doesn’t offer a web interface to make adjustments (that I am aware of).

A Maslow may be used in an area that has no wifi coverage, so it makes sense to
have the Pi image initally come up as an AP (with the ability to then
reconfigure it through a browser to connect to another network)

I would have the image include a copy of webcontrol, and update the image
regularly, rather than requiring that it have Internet connectivity to be able
to download the most current copy when started (webcontrol already includes an
update mechanism)

what we need is a very minimal (which also translates into small), Pi image that
can:

  1. run webcontrol
  2. be configured via a browser, which implies an initial AP mode to allow
    connections to it.

it really doesn’t need to have much else.

If you can make an AP mode, you are probably at least 80% of the way there.

David Lang

1 Like

I’ll see if I can post something later this evening.

EDIT: there is A LOT to this. I did find RaspAP. This sets up the pi as an access point, provides a web site to manage the router functions for dhcp and such, but does not turn itself off for reboot on a std wifi network. This is a start. I’ve forked that repo and I’ll see if I can get it to transition from AP to wifi device.

To enable the ssh server on a raspberry pi, a file “ssh” must be added to the /boot folder on the sd card. That’s it. one file, nothing in it and then it will turn that server on. If we can get an Access Point tool set up in the boot directory of a rpi image similar to how ssh works, then this could be useful.
If the file wpa_supplicant.conf with network information is included in the /boot folder, then it copies it to the correct folder to set up the wifi and assuming the information is correct, the device joins the network. I think I’m going to try to find how that works and see if I can strip down raspap for just wifi setup and maybe a couple boxes to autostart services on boot up. If you put a file named AP in the /boot folder, it will start, you can log in, put in your wifi information, reboot and it will join your network. That along with a recent copy of webcontrol with samba configured should be a reasonable goal.

Webmin isn’t a good idea for rpi. PiBakery was an awesome tool that made setup super easy, but it is outdated and needs a complete rewrite. I’d love to have that tool with raspian buster.

I’ll report back when I have something useful.

3 Likes

Thanks for sharing such valuable information with all of us. This has really helped me with it

Is this the most current implementation of WEbControl?
I’ve gotten back to my Maslow and I found my RPi and wanted to get going again. Pretty sure its a 3+

Doesnt really matter. Once you get it running, upgrading is easy to do from within webcontrol to get to the latest version.

I’m trying to set up an access point for maslow that a user can enter their network information that will then shut down the access point and function as a device. RaspAP is more complicated that we need.I It appears that the easiest route is to have the user input the information on a form, write a new wpa_supplicant.conf file in /boot, then reboot. How does one check if wlan0 has a legit connection? if it does, then leave it alone, otherwise turn on the AP… I am not a web programmer, but we have this whole flask python environment that works pretty well, so I started hacking off parts that aren’t needed and ended up with UIprocessor, webpageprocessor, main.py, and some templates. It might be faster to just start from the ground and build a simple tool that does this. It could be a module in webcontrol or just a super stripped down version of it. The functionality it needs is the ability to start and stop dnsmasq and dhcpcd services. does this make sense?