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

New Home Forum Software / Firmware Development v1pi: Raspberry Pi Image with Octoprint and CNC.js (and wifi hotspot)

This topic contains 83 replies, has 20 voices, and was last updated by  FX 5 days, 18 hours ago.

Viewing 30 posts - 31 through 60 (of 84 total)
  • Author
    Posts
  • #61606

    Jeffeb3
    Participant

    Oh sorry, I forgot about you Barry.

    First off, I made one version without the hotspot at all. That would be my choice:
    https://github.com/jeffeb3/v1pi/releases/download/0.1.1-no-hotspot/2018-04-28-v1pi-no-hotspot.zip

    If you’re already attached to that image, you need to do two things:

    sudo systemctl disable autohotspot.service

    And

    crontab -e
    Then put a # in front of this line:
    * * * * * /usr/bin/autohotspotN

    Let me know if that doesn’t work.

    1 user thanked author for this post.
    #61615

    Derek
    Participant

    I am not sure if this has been asked already (if so sorry), but is there a way to use a 3.5 inch Rpi Touchscreen with this distro? Thanks for your work by the way!

     

    #61619

    Jeffeb3
    Participant

    I am not sure if this has been asked already (if so sorry), but is there a way to use a 3.5 inch Rpi Touchscreen with this distro? Thanks for your work by the way!

    This distro doesn’t have a GUI installed. The stock octopi doesn’t either though. If you find some instructions on using it with octopi (I remember this a long time ago) then it should work with this image and octoprint. If you want it to work with CNC.js, then please, figure out how, and let us know :). There is a plugin for CNC.js that makes a small screen a pendant, and I think that’s easy to install, but you still need to configure the little screen.

    So basically, it shouldn’t be any worse than octopi, but I don’t know what you need to do to make it work.

    1 user thanked author for this post.
    #62302

    Tom Cole
    Participant

    It took me 3 days to get CNCjs loaded and running on a pi zero w because the standard instructions are a little disorganized and over my head.  I did not see The “How To” here on Ryan’s site until today…would have saved me 2 days!  But now, this thing you have done is simply outstanding!

    #62304

    Jeffeb3
    Participant

    It took me 3 days to get CNCjs loaded and running on a pi zero w because the standard instructions are a little disorganized and over my head. I did not see The “How To” here on Ryan’s site until today…would have saved me 2 days! But now, this thing you have done is simply outstanding!

    Which How to helped you?

    #62322

    Tom Cole
    Participant

    I used a bit of several linked from their git, a bit from one on the Shapeoko site, a bit from an Instructables, and a blog post about getting to a freshly imaged pi via ssh through usb.    The “How To” from Mr. Dunn linked from Ryan’s “How To”page on the “Information” page in the “Home” drop-down here on v1 is the one that would have saved me days.  It is very well done and I think would help folks learn a bit about the pi.

    However, that pales in comparison to the plug-n-play distro you have made.

    I just loaded your “pi-no-hotspot” image on a pi zero w and got cncjs running my MPCNC while Octopi is running my 3D printer – Prusa MK2s.  That’s simultaneously through the one usb port hooked to a usb hub.  Your distro works flawlessly and it just doesn’t get any easier.  Incidentally, I don’t recommend doing what I have done with a pi zero that has a camera.  I think Gina, who wrote Octoprint, advises against a camera with the zero.

    And thanks for the link to Guy’s distro builder.  I am going to try it out.

    #62324

    Jeffeb3
    Participant

    Aha, thank you for clarifying. I was a bit confused.

    Thanks for the kind words. And Guy’s builder is pretty slick. As a longtime linux amd bash user, it’s very powerful, with very little work.

    I haven’t tried hooking up a cnc and a printer and using different services. Very clever. Besides the camera, have you noticed any limitations?

    #62346

    german
    Participant

    Hi Jeffe, great work. really coll stuff and easy to set up .

    I just got issues to log in by ssh, so i had to plug my hdmi to log in. (after some troubleshooting and surfing the web i found it was a problem with the ssh host keys) i leave what i did to solve in case anyone else has the same problem and wants to still be able to open in putty. (the erorr “was network error software caused connection abort”)

    Step # 1: Delete old ssh host keys

    Login as the root and type the following command to delete files on your SSHD server:

    /bin/rm -v /etc/ssh/ssh_host_*

    Step # 2: Reconfigure OpenSSH Server

    Now create a new set of keys on your SSHD server, enter:

    dpkg-reconfigure openssh-server

    can you help me out with the HAproxy settings? i want the server to be accessible over internet but with higher security settings. i already created the forwarding and port translations rules on my router as i did with my other octopi but the HAproxy file with the new CNC frontend lines confuses me. ( i am a newbie on raspbian)

    this is where i copied my actual config in the other octopi server

    Access OctoPrint over the Internet

    #62356

    Jeffeb3
    Participant

    1) wrt the ssh problem, that is a very generic message and it can be caused by any number of things. I’m surprised messing with the host keys on the pi did anything, because recreating them is part of the first boot process. Each pi gets it’s own set of host keys when the SD image is noted the first time (that way, I don’t know the keys to your pi). That message could also be cause by two machines with the same hostname, for example.

    2) the haproxy is a bit of a hack, and I know it doesn’t support https. I moved the port numbers so octopi is on 4080 if you want to expose that port and connect without https (but you username and password would be transmitted without encryption). There are plugins (octoprint anywhere, polar cloud, astroprint) that will connect out without configuring your router.

    #62369

    Tom Cole
    Participant

    Besides the camera, have you noticed any limitations?

    I have run both off the same zero using Reptier server and it worked well…until a power outage killed Repetier and I lost my registration.

    I don’t really have any experience testing the dual setup with your distro…yet!  But preliminary stuff worked without a hitch.

    #65174

    Robert Kyle
    Participant

    Have been away from my MPCNC for almost a year due to several issues, anyway have started back again and amazed at the progress with the MPCNC by Ryan and Jeffeb3.

    I have rewired my MPCNC for dual end stops and touch plate, downloaded the firmware and uploaded to my Arduino/Ramps. All works great through the LCD.

    After seeing the new Pi interface from Jeffeb3 I downloaded and installed on P1 3 Model B V1.2, all works great except CNCjs. Using MacBook Pro to communicate wirelessly to the Pi, Octoprint works perfectly. I have tried for almost two days now to try and get CNCjs working with no success. The port used is /dev/tty/ACM0 (same as Octoprint) and the CNCjs console shows that the port is connected, however I am unable to send Gcode commands, jog the MPCNC through the keyboard and unable to run a Gcode file.

    Have looked at the CNCjs site and there would appear to be issues in the past with Marlin communications, wondering if anyone else is having the same issues?

    Thanks in advance, once again some great progress on the software!!

    (Just to add the Pi software I downloaded is the no hotspot version)

    #65176

    Jeffeb3
    Participant

    This is the main issue I’ve seen:

    https://github.com/cncjs/cncjs/issues/312

    AFAIK, there hasn’t been a fix yet. I should probably try the latest version though, it’s been a while now.

    Try sending ‘G0 X0’ in the command line, after connecting. I think after that, it should sort of work. The marlin support isn’t 100%.

    #65178

    Robert Kyle
    Participant

    Thanks for the quick reply, I tried your suggestion of G0 X0 – no response from the Arduino.

    For information I have setup the Pi with the desktop, added chromium and run the Pi interface from this, works really well with Octoprint, same issues with CNCjs though.

    All points to issues with CNCjs itself, I’ll leave this for the moment, I can work through Octoprint as I just need to send Gcode commands for setup.

    Thanks again for your support.

     

    #65184

    Barry
    Participant

    I think you actually need a move command, so G0 X100 is what I was using when testing.  Until that gets fixed, I went back to moving my laptop between the routers and running off repetier.

    #69364

    Daniel
    Participant

    Downloaded the image and got it all working , strange thing is if I use octoprint I can see the webcam but if I use the cncjs I cannot see the webcam. Any ideas on why ?

    Also see nothing on the pi touchscreen which I was going to use to do homing etc , I tried a display with hdmi and nothing except the kernel so I enabled the desktop ? No idea how to get cncj to show on the screen ?

    Can anyone offer any help

     

    1 user thanked author for this post.
    #69374

    Jeffeb3
    Participant

    if I use octoprint I can see the webcam but if I use the cncjs I cannot see the webcam. Any ideas on why ?

    I didn’t do much configuration. The webcam streaming address isn’t set in cnc.js. You should be able to get the address from the octoprint settings. Oddly enough. I’ll make a note. I need to spin up a new one for the newer versions and I’ll see if I can add that easily.

    Also see nothing on the pi touchscreen which I was going to use to do homing etc , I tried a display with hdmi and nothing except the kernel so I enabled the desktop ? No idea how to get cncj to show on the screen ?

    You can open a web browser on the desktop and navigate to http://localhost

    I didn’t set it up, but there are some neat cnc.js plugins for a tablet. One has less stuff on it, but has big buttons for tablet use. There is also an octoprint plugin for touch screens.

    You can also configure the browser to come up on startup. That might help. I would search for “autostart browser rasbperry pi”.

    #69501

    Daniel
    Participant

    Thank , couldnt find anywhere in cncjs to configure the video stream , will try and do some more research on the tablet plugin, sseens octoprint is a lot better supported  than cnjs with regard to setup and use.

    I tried 4 times to go the procedure but kept getting errors on the npm install. Your image made rhe process a lot easier thanks.

     

    #69502

    Jeffeb3
    Participant

    Yeah, installing npm on raspberry pi was the tricky part. There steps I finally took were easy, but they were there 3rd or 4th things I tried. Glad it’s working for you. I’ll see if I can at least post instructions on the camera stuff soon.

    #70014

    Daniel
    Participant

    Got the pi desktop working on the touchscreen and can access cncjs via my phone logging in but cant work out how to initiate cncjs from the pi desktop .

    I can see why windows won the interface to the world. Lol

    Looked through the files browser and cant see a exectable for cncjs

     

    #70021

    Jeffeb3
    Participant

    I can see why windows won the interface to the world. Lol

    Those are fighting words 🙂

    cant work out how to initiate cncjs from the pi desktop .

    Just open the browser (midori?) To http://locslhost .

    Looked through the files browser and cant see a exectable for cncjs

    Things are different in Linux. You don’t use the file browser to look for programs. Cnc.js isnt an executable. You’re thinking like a windows user.

    #70022

    Daniel
    Participant

    Yep a long time windows user drowning in llinux lol .

    Worked out this afternoon it is a browser based program and got it working on the screen . Now just need to get the shoptablet software worked out and im good to go .

    #70023

    Jeffeb3
    Participant

    It is a lot to drink in. No doubt about that. You can Google some general pi or linix tips. You will need the command line more than you’ll need the file browser. Most software gets installed from software manager (apt). I would look for a tutorial to install Google chrome and autostart it in kiosk mode. Then you can ignore the desktop. You’ll learn some basic Linux skills while doing it.

    #70026

    Daniel
    Participant

    I worked out cromium today but kiosk mode is a good pointer.

    Now i just need to get as clean install of tinyweb or shopfloortablet so its usable on the small touchscreen .

    #70329

    Ryan
    Keymaster

    Success!!! I finally figured out why I could only ever connect with the hotspot version. Both my pi’s are only 2.4ghz wifi…. 😳 I guess only the pi 3 model b+ has 5ghz, I have the plain b and a zero w

    I kept trying 5ghz, not even thinking. So everything is groovy now!

    Dropping in bonjour to windows makes v1pi.local work easy peasy. Thanks Heffe. Now I am going to try and make a “controller options” page or post or something.

    1 user thanked author for this post.
    #70337

    Jeffeb3
    Participant

    Yeah, bonjour is a quick fix. I just can’t talk to how to do it.

    #70352

    Barry
    Participant

    Danged newfangled wifi!  802.11b worked just fine!!   😯

    #70717

    Jeffeb3
    Participant

    Thank , couldnt find anywhere in cncjs to configure the video stream , will try and do some more research on the tablet plugin, sseens octoprint is a lot better supported than cnjs with regard to setup and use.

    I tried 4 times to go the procedure but kept getting errors on the npm install. Your image made rhe process a lot easier thanks.

    I made a page in the documentation for setting up the webcam in CNC.js:

    https://v1pi.readthedocs.io/en/latest/camera-setup.html

    Let me know how it goes.

    1 user thanked author for this post.
    #70778

    dkj4linux
    Participant

    Downloaded the new image file and wrote it to a couple of SD cards. Both start okay and connect on both “sides” (Octoprint and CNCjs) but the webcam still only works on the Octoprint side. No error messages that I can see… just a black screen on the CNCjs side. Just to let you know, no joy so far… 🙁

    EDIT: Never mind… it helps if you follow directions. Didn’t type in the proper URL… silly me  =8^P

    1 user thanked author for this post.
    #70786

    Jeffeb3
    Participant

    Many thanks!

    The new image (which is still in testing) isn’t required for the webcam to work, it just has the latest octoprint and cnc.js versions. I also disabled the console serial port, which is needed if the pi serial port is connected to the cnc controller.

    Thanks for testing the new image, and the webcam instructions. I think I’ll change the URL formatting so it’s easier to copy and paste. When I copy/pasted, I got the ‘.’ in there too (which won’t work).

    1 user thanked author for this post.
    #71294

    Melvin
    Participant

    Great! cant wait to test. Thanks.

    f you’re already attached to that image, you need to do two things: sudo systemctl disable autohotspot.service And crontab -e Then put a # in front of this line: * * * * * /usr/bin/autohotspotN Let me know if that doesn’t work.

    I do not see that line in the crontab. Nevermind. I see it now, had to sudo crontab -e

    Is it possible to have the hotspot image, and be able to connect to another wi-fi (hotspot not connected)? And by possible, I mean possible for me to do, not expecting you to write any more code.

    My issue is when connected to hotspot, my device does not have internet connection.

    And Octoprint works good on here, just wish I could get the CNC.js to work. the G1 X0 commands do nothing for me, I will try the timeout/commenting line method.

Viewing 30 posts - 31 through 60 (of 84 total)

You must be logged in to reply to this topic.