Maslow Home Maslow Community Garden Newsletter

Best setup for raspberry pi

Hey all,
The most recent posts I can see on using webcontrol with raspberry pi are over a year old. I just wanted to check in and see what the best way is to use the RPI. Ideally, I’d like to run webcontrol on my pi connected to the arduino, but be able to control it from my phone or another laptop.
I should preface this with - this is my first raspberry pi project, and I have no clue what I’m doing. So any guidance would be appreciated :slight_smile:
Thanks!
Shae

There haven’t been a lot of posts, because not much has changed :slight_smile:

load webcontrol onto the pi, connect it to the arduino, connect the pi to your
wifi network (or configure it to be an AP if your maslow is a long distance from
your wifi) and it ‘just works’

David Lang

1 Like

Gotcha!
I know I’m just naive in this area so forgive the “no judgments” style questions:

  1. I have Raspberry OS installed on it…you’re saying I should now install webcontrol on it, then connect it to the arduino, and since it’s already linked to wifi, it should just “work”? that’s it?
  2. How do I access it from my phone/laptop once the RPI is running?
  1. I have Raspberry OS installed on it…you’re saying I should now install webcontrol on it, then connect it to the arduino, and since it’s already linked to wifi, it should just “work”? that’s it?

exactly

  1. How do I access it from my phone/laptop once the RPI is running?

http://:5000

David Lang

Sorry for being so thick, but I’m not sure how to install webcontrol? I see a premade image, and I downloaded that, but I tried to create the service to auto-start webcontrol on startup, and it gave be a “bad message” error when I tried to check it (as prompted in the instructions). What am I missing?

Alright - now that I’m not sleep deprived, let me give a bit more information.

I have webcontrol installed on my RPi4, 8GB. I can pull up WebControl on the pi when it’s connected to a monitor, but I can’t access it from “http://:5000” on any other device. Do you have to be connected to the arduino in order to pull up the local server for the Pi on a separate device?

I’m not currently connected to the arduino, just trying to get it all set up with my monitor/keyboard before I go blind and plug it into the arduino.

Lastly, I installed using the command line instructions on the GitHub page for RPI, do I need to do anything else now to get it to run upon startup? I tried the instructions on the webcontrol page, but it just gave me “Bad Message” errors. Are there certain conditions that must be met in order to succeed?

Thanks in advance for the help,
Shae

@shaedmorgan in the “http://xxx:5000” input the IP address for your RPi for the “xxx” and leave off the ". That should bring up the WC browser interface. I can say that it just works as I just did this a few weeks ago and used it for the first time this weekend (life happened).

I used the following forum post to get everything set up. I didn’t use the premade image, but I believe there were instructions on how to do it regardless.

Let us know if you have any any further issues.

Rick

I tried including the IP address and it still wouldn’t connect… maybe I’ll just reimage the memory card with the buster lite version. Any other ideas?

at this point, that would be my suggestion, though that is always my fail-safe…if it doesn’t work the first time, reformat and start over from the beginning. The RPi for the Maslow was my first foray into RPi, and it just…worked, so I was happy I didn’t screw anything up. I followed that “Dummies” post and it is all working…for now.

I have some other adjustments I am going to do to my machine (adding a shut down button for the RPi, a new enclosure for all the electronics, and new frame - hinged mounted like you did - and other stuff). Who knows what will happen when I take everything apart and do it all over again!

1 Like

One thing that I did was to get the RPi OS from the RPi website (I did not use any premade images). It had an installer that was just click on what version you wanted (Desktop, Lite, Full Version, and some others), select the SD card, and then install. I did the desktop version (even though I am using it headless), and from there I started the Pi with a keyboard, mouse, and monitor, and set everything up for wifi, etc. I then went through the procedures to get webcontrol via the “wget” command, and followed everything else from the dummies. I tested the WC interface on the Pi desktop, as well as on my laptop and the Surface Pro I will use. The only issue I had was when I brought up the browser, it linked to the USB port I had the mouse/keyboard - it was wireless - in WC. Like you, I was just testing it as I didn’t want to do all of this out in my garage with the machine. It took a couple of reboots out in the garage to get it to connect to the Mega, but it eventually did. (Of Note: ensure you enable SSH or VNC BEFORE you try to take it out and use it headless with your machine!! ooops!! :upside_down_face: :thinking:)

AH! I was using the wrong IP address for the RPI! It’s working now, I can access it from another computer. My question now is what do I do about the fact that the IP address is dynamic? Do you all fix your IP address to a static address?

Shae

Yes. I went through my router and made that IP address a static IP so it will always be that, and then made a bookmark for WC on my Surface so I can be lazy and not have to type it in all the time. How you do that on your router will depend on what equipment you have and your service provider. I have Spectrum and their router/modem combo, and I had to use their app to set the router up the way I want (not really happy about that, but it is what it is).

Rick

1 Like

if you leave the system on, it will generally keep the same IP, but it should be
fairly simple to assign a static IP in your access point.

David Lang

newer routers will also allow you to reserve a DHCP address as well. not quite the same thing but it will accomplish the goal of the Pi always having the same ip.

I actually was a little confused for a minute about what routers have anything to do with DHCP addresses…

1 Like

I think I got everything all up and running! Will make a practice cut in the next few days. Can I transfer over my old webcontrol settings to the RPI?

excpet for the port everything else should transfer. There is an option to
export the config to a json file in webcontrol

David Lang

Only in the world of CNC do those two worlds collide so frequently and with such catastrophic outcomes :wink:

You should be able to transfer the settings. Search your PC for the .WebControl folder (I found mine under “users”) and in that folder will be a webcontrol.json file. You can either copy and paste that into the RPi .WebControl folder (make sure you can see hidden folders) --or-- you can go to WC and under Actions, there should be an option to import webcontrol.json. So on the old PC, you can access WebControl (https://:5000) and import it form there. That is how I did it and had no issues that I can tell so far. Did a project this weekend for a customer and it turned out great and I didn’t have to re-calibrate in adding the RPi.

Hahaa!!! I see what you did there!! :+1:t2: