Giter Club home page Giter Club logo

klipper-dwc2-installer's Introduction

klipper-DWC2-installer

This installer script is made to streamline the install or upgrade of KLIPPER and Duet Web Control front-end for it. with these 2 together no need to use octoprint, so your hardware will not be bloated nor overloaded. I run mine on orangepi zero with H2+ CPU 512MB and it works nicely. Now the script is based on a new multi-session method, to make an ultimate "Klipper server" to connect multiple printers or only one if needed. You can by running it get klipper installed with DWC2 and octoprint, in less than 5 minutes!

Do not run this script as root, as it will prevent you to do so.

To run it:

cd ~ 
sudo apt install git -y 
git clone https://github.com/manu7irl/klipper-DWC2-installer
cd klipper-DWC2-installer
./installer.sh

You will be presented to an interactive menu to install or update your system. This is pretty staright-forward but if you need help ping me. If you install DWC for the first time, the script will add the default sections, to the end of your printer.cfg file, in order to the tornado web server and the file manager can use the virtual_sdcard function: tip: the virtual_sdcard folder path, can point to your ~/.octoprint/sdcard folder. So an uploaded gcode file through the octoprint ui will also appears on DWC and vice versa.

     "=========================="
     "    INSTALL OR UPDATE     "
     "    KLIPPER & DWC2        "
     "    OCTOPRINT             "
     "    BY MANU7IRL           "
     "=========================="
     "1. Install KLIPPER"
     "2. Update KLIPPER"
     "3. Flash your MCU"
     "4. Install DWC2"
     "5. Update DWC2"
     "6. Install OCTOPRINT"
     "7. Uninstall KLIPPER & DWC"
     "8. Uninstall OCTOPRINT"
     "9. Exit"
[virtual_sdcard]
path: ~/PrinterFarm/KlipperFarm/printer-0/sdcard #use the folder of your choice

[web_dwc2]
# optional - defaulting to Klipper
printer_name: My_own_klipper_printer
# optional - defaulting to 127.0.0.1
listen_adress: 0.0.0.0
# needed - use above 1024 as nonroot user
listen_port: 4750
#	optional defaulting to dwc2/web. Its a folder relative to your virtual sdcard.
web_path: dwc2/web
# optional - defaulting to /tmp/printer, needed in order to get dwc multi-session
serial_path: /tmp/printer-$printer-num

your printer.cfg file should be placed under ~/PrinterFarm/KlipperFarm/printer-{0..9} folder and renamed after the corresponding printer-{0..9} folder. ex: if the folder is printer-0, the printer.cfg file should be printer-0.cfg

##NEW## You will be presented to a set of question to decide to run it on which user and how many printers to be added. Todo list:

  • haproxy to get url like http://localhost/dwc2/printer-0 to point to http://localhost:4750 (DWC2 web ui) and http://localhost/octo/printer-0 to point to http://localhost:5000 (octoprint web ui)
  • integrate the sdcard virtual folder to be symlinked to sdcard folder in klipper ~/sdcard/gcodes (created by DWC2)
  • integrate the new multisession scripts under the main script framework (DONE)
  • automatic install of generic printer.cfg, if needed (DONE PARTIALLY)
  • uninstall klipper script integration (DONE)
  • automatic add to a default printer.cfg file with the DWC & Virtual SDCARD sections (DONE)
  • script to create a klipper back-end server with multiple services to run multiple printers om it, by adding systemd services based on incremented virtual serial path /tmp/printer-{0..9}(DONE)
  • script to create a Octoprint back-end server with multiple services to run multiple printers om it (DONE)
  • script to create a DWC2 multiple server instances to run multiple printers om it, via incremented access port 475{0..9} (DONE)
  • automatic DWC update based on DWC releases (DONE)
  • git-source folder maintained to update all the main repos (klipper, dwc2-for-klipper). (DONE)
  • Octoprint automatically download the latest release from source, and is updatable inside the web ui, so no need to make a script update for it (DONE)
  • Octoprint script, installs autostart via init.d, webcam support (DONE)

klipper-dwc2-installer's People

Contributors

manu7irl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

klipper-dwc2-installer's Issues

klipper partial install, due to missing pip

I just set up fresh instance of octopi and run the script.
Found an error of the problems with the klipper service.
running the related python file manually, I got the multiple errors for missing python modules.
So, the pparent culprit is missing python pip.
As it seems, installing python setup tools doesn't install pip any longer, so PIP has to be installed manually.

Can't install Klipper

Hi!
When I try to install Klipper it interrupt.
How to make more verbose output during installation?
What reason?

==========================
    INSTALL OR UPDATE
    KLIPPER & DWC2
    OCTOPRINT
    BY MANU7IRL
==========================
1. Install KLIPPER
2. Update KLIPPER
3. Flash your MCU
4. Install DWC2
5. Update DWC2
6. Install OCTOPRINT
7. Uninstall KLIPPER & DWC
8. Uninstall OCTOPRINT
9. Exit
Please choose what to do, then press [ENTER] [ 1 - 9 ] 1


###### Starting KLIPPER install process...


###### Cloning the KLIPPER folder From GITHUB...
dietpi@DietPi:~/klipper-DWC2-installer$

Web Interface keeps on reseting - no temp or axis controls available.

I updated klipper today using this script and now my dwc web interface keeps rebooting. I see my temps for hotend and bed for a split second, then they disappear. over and over again.
I checked the log and i didnt see any errors in there.

it reads the config file which has not changed since before the update, but this is whats after it.
DWC2 starting at: http://0.0.0.0:4750 Extruder max_extrude_ratio=0.266081 Starting serial connect Loaded MCU 'mcu' 80 commands (v0.8.0-617-g54166567-20200626_192601-octopi / gcc: (GCC) 5.4.0 binutils: (GNU Binutils) 2.26.20160125) MCU 'mcu' config: RECEIVE_WINDOW=192 BUS_PINS_spi=PB3,PB2,PB1 SERIAL_BAUD=250000 STEP_DELAY=-1 ADC_MAX=1023 PWM_MAX=255 RESERVE_PINS_serial=PE0,PE1 BUS_PINS_twi=PD0,PD1 MCU=atmega2560 STATS_SUMSQ_BASE=256 CLOCK_FREQ=16000000 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (629 moves) Starting heater checks for heater_bed Starting heater checks for extruder Stats 1193.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=1116 bytes_read=3368 bytes_retransmit=0 bytes_invalid=0 send_seq=113 receive_seq=106 retransmit_seq=0 srtt=0.006 rttvar=0.004 rto=0.025 ready_bytes=56 stalled_bytes=0 freq=16004067 heater_bed: target=0 temp=0.0 pwm=0.000 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=0.0 pwm=0.000 sysload=0.08 cputime=9.518 memavail=751584 DWC2:225367.5 - 10.0.0.44 - GET - /rr_connect?password=reprap&time=2020-6-26T19%3A35%3A53 DWC2:25367.63 - 10.0.0.44 - GET - /rr_filelist?dir=0%3A%2Fmacros&first=0 Stats 1194.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=1183 bytes_read=3423 bytes_retransmit=0 bytes_invalid=0 send_seq=115 receive_seq=115 retransmit_seq=0 srtt=0.006 rttvar=0.005 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=16004601 heater_bed: target=0 temp=0.0 pwm=0.000 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=0.0 pwm=0.000 sysload=0.08 cputime=9.559 memavail=751552 DWC2:25368.15 - 10.0.0.44 - GET - /rr_config DWC2:25368.61 - 10.0.0.44 - GET - /rr_config Stats 1195.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=1189 bytes_read=3516 bytes_retransmit=0 bytes_invalid=0 send_seq=116 receive_seq=116 retransmit_seq=0 srtt=0.006 rttvar=0.004 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=16004822 heater_bed: target=0 temp=29.9 pwm=0.000 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=28.3 pwm=0.000 sysload=0.08 cputime=9.617 memavail=751552 Stats 1196.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=1195 bytes_read=3622 bytes_retransmit=0 bytes_invalid=0 send_seq=117 receive_seq=117 retransmit_seq=0 srtt=0.006 rttvar=0.003 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=16004777 heater_bed: target=0 temp=29.9 pwm=0.000 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=29.2 pwm=0.000 sysload=0.08 cputime=9.652 memavail=751552 Stats 1197.7: gcodein=0 mcu: mcu_awake=0.000 mcu_task_avg=0.000000 mcu_task_stddev=0.000000 bytes_write=1201 bytes_read=3728 bytes_retransmit=0 bytes_invalid=0 send_seq=118 receive_seq=118 retransmit_seq=0 srtt=0.005 rttvar=0.003 rto=0.025 ready_bytes=0 stalled_bytes=0 freq=16004772 heater_bed: target=0 temp=30.1 pwm=0.000 print_time=0.001 buffer_time=0.000 print_stall=0 extruder: target=0 temp=29.2 pwm=0.000 sysload=0.07 cputime=9.687 memavail=751552

It looks like its getting the info, just for some reason the web page is freaking out.
I rebooted the PI and no good, still happens.

Any idea whats up?

URL to duetwebcontrol wrong

This URL incorrect too:

latest_DWC=`curl -s https://api.github.com/repos/chrishamm/duetwebcontrol/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep SD`

You changed only dwc_update script :)

Maybe it will be easy to define it at top in one place?

syntax error

Getting the following error:

Creating some folders...

./installer.sh: line 232: syntax error near unexpected token `else'

permission denied

Creating some folders...

mkdir: cannot create directory ‘/home/1’: Permission denied

Cant install DWC2

Every time I try to install DWC I got this:

Capture

Is there something I can do about it?

Thanks

Proposal: Change the Klippy Log to be stored on the virtual SD card for DWC

Hey - I was just doing some updates to my config and I think it would be another neat step if the log file could be changed to be stored in the virtual SD card, where it could be seen by DWC under sys and you could interact with it there. It beats every time needing to SSH into the machine to review and delete the klippy log when tracking down issues.

Thanks!

Stopping klipper-0 service...

ERROR: Failed to stop klipper-0.service: Unit klipper-0.service not loaded
done on fresh Raspberry Pi OS install
Klipper installed fine, went to "flash your MCU" and got this.

Klipper not installing

Fresh raspbian buster install.

I run the installer, use "pi" as my user for one instance.

Ended successfully with an empty printer-0.cfg and no services to start klipper.

An install log would be helpful as I have no idea what the script has done (or failed to do).

Install?

So to understand it correct I just have to install Buster Lite, make an "git clone" and run your klipper-dwc2-installer.sh that's all?

New Install

Good afternoon. Thank you for your work. I would like to correct a more correct installation in the README file

cd ~
git clone https://github.com/manu7irl/klipper-DWC2-installer
./klipper-DWC2-installer/klipper-dwc2-install.sh

Then next when prompted

=================================
KLIPPER SERVICE INSTALL FOR SOC:

Please choose the install needed:
(1)install-beaglebone.sh
(2)install-centos.sh
(3)install-debian.sh
(4)install-octopi.sh
(Q)uit

need to select (4)install-octopi.sh

And update the line
wet https://github.com/chrishamm/DuetWebControl/releases/download/2.0.4/DuetWebControl-SD.zip
on
wget https://github.com/chrishamm/DuetWebControl/releases/download/2.0.6/DuetWebControl-SBC.zip
so how did the update come out.
thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.