v1pi: Raspberry Pi Image with Octoprint and CNC.js (and wifi hotspot)

I use V1Pi on my LowRider and can use my phone to control it through the Pi and specifically use Octoprint to send the gcode to my miniRambo. IIRC, there is a plug-in for octoprint specifically for mobile phones that simplifies the interface and looks like I think a pendant would. Homing should work just as you expect it to since you’re effectively sending gcode to execute the commands.

2 Likes

Thanks for the reply, I will give it a go. - I will order another pi today and give it a go at the weekend. - I will report back on how it goes.

UPDATE:

I received the Pi yesterday and literally took 15 mins to get this set up. I simply replaced my laptop running RepetierHost with the pi running v1pi. I liked the look of cnc.js and am very familiar with Octoprint. I connected Octoprint to the printer and used OctoRemote to jog the router around a bit. All was fine until I realized that natively Octoprint doesn’t show the X,Y,Z coordinates. You have to issue an M114 to see the current position. I thought maybe that was a show stopper. - I took a look to see if they had plugin for this but I saw clearly that they don’t recommend realtime coordinate reading but they do have some code to create a custom control that allows you to receive the current position on demand.

I then thought giving cnc.js would be a good option, I connected it using the Marlin button but very quickly found that when trying to move the router around the software crashed and did not recover. After several attempts it left me without a choice but to forego that option.

I went back to Octoprint and started setting up the job that I had previously machined using RepetierHost without too much grief. I set the job up on the table and homed my X, Y then jogged my router into position with my phone running Octoremote. I had one hiccup here, I accidentally hit the home Z and it drove my cutter straight down and would not quit. I had to quickly pull the plug but I think I have damaged one of the PLA parts which I will need to reprint (gotta love having a mostly printed CNC). Once I had the position I sent an M114 and noted the co-ordinates before zeroing. - I do this in case something goes wrong and emergency stop is required, this can change the X,Y,Z zero so getting back to the half finished job can be hard unless you have a reference to go from. Anyway, I then zeroed my co-ordinates using a G92 X0 Y0 and the same for Z0 - I have found that separating these is usually best for my set up as I move the X,Y from zero to set up Z. Once it was set to go, I let Octoprint do its thing by starting the print with OctoRemote. - I have installed the software emergency stop on Octoprint but for some strange reason on the MPCNC instance of Octoprint it keeps disappearing (I use it on my Tevo instances (Carlos and Amelia) without a problem.

The net outcome was that it machined the job flawlessly however, I think given this approach I am going to hard wire a physical emergency stop that shuts down both the router and the Rambo board.

I have also noted that the legs to my MPCNC are too short as most of the jobs I have done have been raised up thus I am working on the limit of the retracted height for the Z axis. I am going to make longer ones.

 

I’ve been looking for a way to replace my various control PCs in the basement with a headless solution, and recently saw this, thank you putting this image together.

One thing I want is a way to jog and zero while at the machine and not at a workstation. CNCJS provides some good looking pendant options that can be used on a tablet or mobile phone.

It took me a bit to figure out the best way to get mount points setup with CNCJS on the image, but I thought I’d include it here for anyone else that may want to try it out.

I’ve started with trying out the Tinyweb pendant (https://github.com/cncjs/cncjs-pendant-tinyweb) and will be looking at the ‘shop floor tablet’ as well (https://github.com/cncjs/cncjs-shopfloor-tablet).

I downloaded tinyweb to /home/pi/cncjs/tinyweb

Update DAEMON_ARGS to include the mount point in ‘/etc/default/cncjs’

DAEMON_ARGS="–host=$HOST --port=$PORT -m /pendant:/home/pi/cncjs/tinyweb/src"

1 Like

I’m a bit confused and maybe some one can bump me in the right direction. I have a raspbery pi 3b+ connected to an arduino with a ramps1.4. If I open octoprint or cncjs the ports available to select is /dev/ttyAMA0 and /dev/ttyACM0.

Which one do you select ? If I pick AMA0 the cpu and memory gets depleted to a stage where you have to pull the power.

If I pick ACM0 it is stable so is this the right one ? Running the v1pi version of software.

 

Thanks

If you disconnect it, which one goes away (or isn’t there after reboot)?

It’s probably ACM though.

Thanks,

Jip correct. If i pull the usb cable to the arduino ttyACM0 is gone.So we assume this is the right port then.

I’m trying to install node-red but this break cncjs. So I assume it have to do with nodejs version compatibility.

I am not sure. I haven’t used node-red in a long time. I tried to install node.js several times, in different ways, and the only one that worked was downloading and installing a precompiled version. Here is the script that generates it for the image:

And here are the params it uses:

1 Like

Got a running version now with:

Node.js - v10.15.3

CNCjs - V1.9.18

octopi - V1.3.10

Node-RED - V0.20.3

rasbian stretch

Raspberry Pi 3 Model B Plus Rev 1.3

 

 

I’m up and running with cncjs! Thanks @jeffeb3!

I added a 5" touchscreen and set up kiosk mode with the Tinyweb pendant but the Tinyweb pendant doesn’t support Marlin yet. I’ve started changing the code to make it work. I’m at the point where the pendant now will control jogging on my laptop, but the pendant still doesn’t do anything from the touchscreen on the pi. But I think I’m close!

I definitely lost some time on the ‘first move’ bug before I came back and read the forums more thoroughly. Is the right fix cheton’s solution in the issue? I’d be happy to give implementing that a go.

Oh neat. That should be a nice interface. You could even do it with a second pi in the shop, connected via wifi if, for example, you had a low rider and didn’t want to chase it around for the interface or have a big cable.

As for the bug, I was assuming he would fix it, and the next version would work. I’ve also found that some builds of Marlin are fine, and I suspect it has to do with which features (which comes down to a race condition). Long story short, I am not sure, but you should go ahead and make that PR. If nothing else, it will give it a kick start.

OK I made the PR. I’ll try it out this weekend. It would be great if others get a chance to validate it as well since this is an intermittent issue.

I’m seeing the same issue as @FX where the GCode processing is jerky in CNCJS (but not OctoPrint). I’m just using the TestCrown file but dialing up the speed to F7200 and I can really obviously see major differences between OctoPrint and CNCJS. My MPCNC pauses mid-arc. I could make a side-by-side video if anyone is interested.

I’ve filed a MPCNC issue

1 Like

That is awesome. Thank you.

I made a comparison video and updated the issue with some early thoughts about causes for slowness based on my digging through code.

4 Likes

Big thanks to John Boilea. John and Cheton are making good progress on the bug and I think this will get fixed or worked around by the next CNC.js release. I’ll make a new cut of v1pi then too. The video is solid gold. There are so many questions it answers.

Wow the troubleshooting in that thread is impressive.

I built another version of v1pi. This one (v0.16.0) has these features:

  • CNC.js 0.9.20, with two specific Marlin bugfixes
  • OctoPrint 1.3.10 and based on OctoPi 0.16.0
  • Added buttons to start or stop the servers to the landing page
  • Disabled the https to the landing page, since connecting to the servers wasn’t secure anyway
  • Enabled OctoPrint api functions to connect without adding the :4080 to the address
  • Changed the landing page server to be flask based, which will be slightly more secure
  • Built using docker, not that it matters to v1pi users
  • Based off of raspian 2019-04-08-raspbian-stretch-lite.zip

Auto hot spot isn’t working right now. I’m not really sure how many people use it. I like the feature, but I don’t like this implementation. I can fix it if there’s interest.

I did not connect this to my low rider. I’ve just been playing with it on my desk, but I know some people are having trouble with the old CNC.js so I pushed it forward a bit.

5 Likes

I for one use the hotspot…

 

Thank you for the updates!

1 Like

Thanks for letting me know. I’ve made a poll here, just so I can get a sense of it. It’s not going to be a majority wins or anything.

https://www.v1engineering.com/forum/topic/v1pi-hotspot/

As a separate item, I can add a line to the html so the website will “call home” to google analytics and I can get a count of how many people actually use it. That feels a little too Big Brother for a web page on a pi, but maybe I’m the only one? It is really hard to know how many people actually use it, since I don’t have many statistics on it.

n/m I can see the download count, and although that’s maybe not as good as knowing the number of people actively using it, it’s still better than adding a tracker to your home pi.

If I were as cool as octoprint, I would make it an option…