Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order
    1. Home
    2. resam
    • Profile
    • Following 0
    • Followers 4
    • Topics 47
    • Posts 478
    • Best 98
    • Controversial 1
    • Groups 0

    resam

    @resam

    159
    Reputation
    76
    Profile views
    478
    Posts
    4
    Followers
    0
    Following
    Joined Last Online

    resam Unfollow Follow

    Best posts made by resam

    • Timelapse pictures & videos with Duet and webcam on layer change

      Hi all,

      I wrote a little tool that allows me to create timelapse videos with pictures on every layer change, using a Duet controller, a Telnet connection from a Raspberry Pi (or other PC), and a webcam (to get still pictures over a URL):

      https://github.com/kriechi/DuetRRF-timelapse
      (see the README for more information)

      Feel free to ask questions or post feature requests!
      I hope somebody finds it useful!

      posted in General Discussion
      resam
      resam
    • Filament spool weight measurements: plugin and hardware design

      I finally pulled all pieces together into a single project and wrote a README to have a nicely integrated filament weight sensor:

      https://github.com/Kriechi/duet-plugin-filament-load-cell

      Screenshot of the new weight field in DWC

      CAD model of the spool holder with integrated load cell

      It contains a DCS plugin to expose an HTTP endpoint, which returns a simple weight measurement in the style of approx. 762g filament left and displays that via a DWC plugin in the top menu bar in the browser - which makes it easy to prevent out-of-filament pauses or failed prints.

      The sensor itself is based on a 1kg load cell, mounted with a small bracket to my printer frame. The load cell gets read by an HX711 chip, which gets read by an Arduino Nano, which gets read over I2C by my Raspberry Pi / Duet SBC, which gets read by the DCS & DWC plugins.

      The Arduino Nano / ATmega168 firmware code is included and can be compiled & flashed via PlatformIO.

      While this was pretty much a "done" project for my printer, because its working for years already, I only recently merged and refactored everything into new Duet plugins. The DWC plugin is a very simple Javascript with an XHR/XMLHttpRequest/AJAX call to the new DCS HTTP endpoint and inject the returned measurement value into a new HTML element. No complicated Vue.js trickery involved - the JS code originated from a Tampermonkey script, so it is dead simple and only a few lines!

      Check out the README for more details!

      Enjoy!

      posted in Plugins for DWC and DSF
      resam
      resam
    • RE: 3.4RC1 QOI thumbnail parsing fails on SBC

      @dc42 Cura-DuetRRF Plugin to embed thumbnails just landed on the public Ultimaker Cura Marketplace - but due to this issue it is not yet compatible with 3.4-rc1.

      So, with the next RC it should immediately work with the latest Cura plugin version v1.2.5.

      posted in Beta Firmware
      resam
      resam
    • RE: Cura - Duet RepRap Firmware Integration Question

      v1.0.1 of the plugin is now published and available in the Cura Marketplace for Cura 3.6 and the 4.0-beta.

      posted in General Discussion
      resam
      resam
    • RE: Octolapse-Like Timelapses

      I'm using a Cura PostProcessing plugin to inject the following on every new layer:
      M118 P4 S"LAYER CHANGE"

      Then I'm using a small Python script running on a Raspberry Pi that connects via Telnet to the Duet and listens (waits and reads) for exactly that string LAYER CHANGE. Now I can pull a snapshot image (mjpg-streamer for the webcam) and save it to a jpg file:

              r = requests.get('https://127.0.0.1/webcam/?action=snapshot', timeout=5, stream=True)
              if r.status_code == 200:
                  now = datetime.datetime.now()
                  with open(os.path.join('images', now.strftime("%Y%m%dT%H%M%S") + ".jpg"), 'wb') as f:
                      for chunk in r:
                          f.write(chunk)
      

      And at the end of the print, I use ffmpeg to render a timelapse movie:
      ffmpeg -r 30 -y -pattern_type glob -i '*.jpg' -c:v libx264 output.mp4

      Fairly simple if you know your way around a bit of Linux and Python programming.

      If you use firmware retracts and z-hops, one could avoid the M118, and simple pull a snapshot image on every Z coordinate change. YMMV.

      posted in General Discussion
      resam
      resam
    • RE: Does anyone here work on Superslicer?

      @dc42 Here the file beginning with a 320x320 QOI (about 37kB, so only the first few lines):

      ;FLAVOR:RepRap
      ;TIME:4199
      ;Filament used: 3.57983m
      ;Layer height: 0.15
      ;MINX:69.693
      ;MINY:92.957
      ;MINZ:0.2
      ;MAXX:174.818
      ;MAXY:152.057
      ;MAXZ:7.55
      ;POSTPROCESSED
      ;Generated with Cura_SteamEngine 4.12.1
      ;Exported with Cura-DuetRRF by Thomas Kriechbaumer 1.2.5
      ; thumbnail begin 320x320 37140
      ; cW9pZgAAAUAAAAFABAAA/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f
      ; 39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39
      ; /f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f
      ; 39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39
      ; /f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f
      ; 39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39
      ; /f39/f39/f39/f39/f39/f396P8aFQYa/4BnHYIA/f39/f3F/xoVBRr/06sw1/+DaiCnAP39/f39xP
      ; 8aFQYb/9auMNr/+so5//9xXBp7AP39/f39wz//06sw2P/6yzn/wP9hTxduAP39/f39wgoWKcH/OzAR
      ; bgD9/f39/cEK/9SsMNgpwv83LxdVAP39/f39wP85Lg06FinCnnn/EA4GNQD9/f39/f86Lw07/+y/Nf
      ; Apw//3yDj+/wQEBCkA/f39/fz/OzANPP/uwTbzKcT/5rs2+wD9/f39/P86Lw08AinF/8WhMfsA/f39
      ; /fsQ/+/BNvMpxv+7mCzQAP39/f36EP/tvzXx//vLOf/H/450JMMA7/9CNQ9D/yoiCSv/AAAAAP39/f
      ; 3G/zwwDT09LMj/jHIisADs/wcFAQf/RTgPRv/AnCvE//nKOP7/IhwKRwD9/f39xf9HORBI/+3ANfEs
      ; yf9nVBqKAOr/AwIAA/9hThZj/9WtMNkpwP7bsjT/CAgFLgD9/f39xP9pVRdq//rKOP7/+8s5/8r/Vk
      ; cYigDo/xANAxD/c10adf/asDHeKcL+pYct/wICAQ4A/f39/cP/aFQXav/4yTj8LMv/RjkRWADm/w8M
      ; Aw//emMbfP/pvDXtLMT/b10k9v8BAQELAP39/f3C/2lVF2sS//vLOf/M/x4aC1EA5P8iHAcj/5Z5Ip
      ; n/6r017izFnXr/Ny8YwgD9/f3L/xcTBRj/Ix0IJADxEzEszf8cFwg5AOL/HxkHH/+ZfCKc//LEN/Ys
      ; ... snip
      ; thumbnail end
      
      T0
      M190 S60
      M104 S215
      M109 S215
      ...
      

      Latest changes pushed to https://github.com/Kriechi/Cura-DuetRRFPlugin/tree/next

      posted in General Discussion
      resam
      resam
    • RE: Statistics

      M929 is currently very verbose and fills up my SD card quickly.

      Just flashing out a few ideas for statistics:

      • Total print time, i.e., machine state in printing (general stats)
      • Active time for each tool / hotend being hot enough to extrude
      • Travelled distance per axis, i.e., X=42.7km, Y=23.6km, E=300m, etc. (for lubrication)
      • Number of firmware retractions (to clear our chips in the extruder gear)
      • Number of finished/canceled print jobs
      • Average duration of jobs

      All counters should have a total value (persistent on SD card), and a user-resettable (i.e., via UI) "trip mileage" value. Every time I do maintenance, I would reset the trip counter, while keeping the total counter intact.

      To save the SD card from early death, I suppose persisting both counters after a print job finishes / was canceled should be fine.

      posted in Duet Web Control wishlist
      resam
      resam
    • RE: Building DWC plugins with plain Javascript

      Ok - so here is how you can take full advantage of the pre-compile steps from DuetWebControl (skip ahead if you don't have a complex plugin):

      git clone https://github.com/Duet3D/DuetWebControl.git
      cd DuetWebControl
      git checkout v3.3-dev
      npm install
      

      Then call a heart and blood pressure specialist doctor due to:
      25 vulnerabilities (13 moderate, 12 high) and tons of this library is no longer supported messages...

      Then add the following snippet to the big plugin array/list at the bottom of src/plugins/index.js to include your new plugin:

      	new DwcPlugin({
      		id: 'MyNewPluginID',
      		name: 'My-New-Plugin',
      		author: 'Thomas Kriechbaumer',
      		version,
      		loadDwcResources: () => import(
      			/* webpackChunkName: "MyNewPluginID" */
      			'./MyNewPluginID/index.js'
      		)
      	}),
      

      Then continue with:

      # still in the root dir of DuetWebControl repo
      cd src/plugins/
      mkdir MyNewPluginID
      cd MyNewPluginID
      echo 'console.log("Hello World!");' > index.js
      npm run build
      

      This will create 4 new files with MyNewPluginID.123abc.<different-extensions> under dist/js/. Copy those into your plugin ZIP file under dwc/js/.


      And essentially all this can be shortened by directly doing this:

      Create a ZIP file with these files:

      MyNewPluginID.zip
        - plugin.json
        - dwc/
          - js/
            - MyNewPluginID.js
      

      With plugin.json being this:

      {
          "id": "MyNewPluginID",
          "name": "My-New-Plugin",
          "author": "Thomas Kriechbaumer",
          "version": "1.0.0",
          "license": "MIT",
          "homepage": "http://example.com",
      }
      

      (observe that I did not mention dwcFiles - it will figure itself out that there is a .js file to copy into the right place.

      With MyNewPluginID.js being this:

      (window["webpackJsonp"] = window["webpackJsonp"] || []).push([
          ["MyNewPluginID"], {
              "./src/plugins/MyNewPluginID/index.js": function (e, t, n) {
                  "use strict";
      
                   console.log("Hello World");
                   // YOUR CODE HERE!
              }
          }
      ]);
      

      Not sure if this is the best way to build new plugins, but it worked for me.

      posted in Plugins for DWC and DSF
      resam
      resam
    • RE: Duet 2 Ethernet and SBC

      Since this post is getting rather long, let me summarize briefly and post a few bits that I haven't found here yet:

      @deadwood83 has made a nice PCB nice PCB here with PCB and schematic sources in EasyEDA. It fits nicely on a Duet 2 WiFi and DuetEthernet without desoldering the existing WiFi module.

      The pins on the PCB are mostly self-explanatory to hook them up to a Raspberry Pi:

      • GND to GND / multiple physical pins
      • SCK to GPIO11 / SPI0 SCLK / Physical Pin 23
      • MOS to GPIO10 / SPI0 MOSI / Physical Pin 19
      • MISO to GPIO9 / SPI0 MISO / Physical Pin 21
      • 3V3 to 3V3/Physical Pin 1 or 17
      • RDY to GPIO25 (TransferReadPin) / Physical Pin 22
      • CS to GPIO8 / SPI0 CE0 / Physical Pin 24

      (see this for a Raspberry Pi pin out table to double check)

      posted in Beta Firmware
      resam
      resam
    • RE: Limited service from me for the next two weeks

      Happy vacation! You deserve some time off! 🏖

      Thanks for the great and almost around-the-clock support! 👍 👏

      posted in General Discussion
      resam
      resam

    Latest posts made by resam

    • RE: Cura gcode Save to Disk with Thumbnails

      @tfjield I've pushed a change to the next branch at https://github.com/Kriechi/Cura-DuetRRFPlugin/tree/next

      Would love to hear your feedback if this works for you!
      Please follow the Manual Installation + Install from Source instructions in the readme.

      posted in General Discussion
      resam
      resam
    • RE: Input shaping plugin, need src code pointer

      @gnydick https://github.com/Duet3D/DSF-Plugins/blob/f0d441fb7e3b4ff493a5e0be7cb740ae7c57bc46/InputShapingPlugin/src/InputShapingChart.vue#L123 and the config options around it.

      posted in Plugins for DWC and DSF
      resam
      resam
    • RE: Cura gcode Save to Disk with Thumbnails

      @tfjield thanks! I'll take a look on how to best integrate it into the existing plugin!

      If anyone wants to give it a try and send me a pull request - I'd be happy to review and merge it!

      posted in General Discussion
      resam
      resam
    • RE: Cura 5: Better print time estimates

      @oliof yes this should be possible - I had it on my ToDo list for a while, but so far either not enough people asking for it, or simply no time.
      I wanted to start by "importing" the bed size and other parameters from the printer - and speed and accel setting would be great addon to that!

      PRs are welcome and will be reviewed and merged!

      posted in General Discussion
      resam
      resam
    • RE: Software bundle 3.4.0 stable released!

      @tfjield short answer: the "Save to Disk" option is from plain Cura - not my plugin. If you want a dedicated "Save to Disk with thumbnails"-like option, let's move the conversation to a new thread.

      posted in Firmware installation
      resam
      resam
    • RE: hase anybody converter duet wifi to ethernet?

      @baenwort there are various forum posts about small adapter-PCBs to tap off the SPI interface from the Wifi/Ethernet modules to attach a RaspberryPi SBC.

      I think there are dedicated Wifi and Ethernet versions of similar style: https://forum.duet3d.com/topic/17203/duet-2-ethernet-and-sbc/183?_=1651350921819

      posted in Duet Hardware and wiring
      resam
      resam
    • RE: hase anybody converter duet wifi to ethernet?

      @johanv yes - search the forum and look at https://www.duet3d.com/duetethernet_module

      posted in Duet Hardware and wiring
      resam
      resam
    • RE: Cura thumbnails are not shown

      @tapirath thats a Cura problem - so please report it to them. I'm not even sure if they built this specifically to be compatible with Duet / RepRapFirmware.

      posted in Duet Web Control
      resam
      resam
    • RE: Cura thumbnails are not shown

      @tapirath I didn't specifically comment about your case - just general information.

      But regarding your case: the post-processing script is not generating valid thumbnail comments:
      https://github.com/Ultimaker/Cura/blob/5330e53ae60030d6ac4061642e818fb40ffafcb1/plugins/PostProcessingPlugin/scripts/CreateThumbnail.py#L40

      the width and height need to be separated by an x, not a space character. At least that's what the plugin is doing - and its working there.

      posted in Duet Web Control
      resam
      resam
    • RE: Cura thumbnails are not shown

      Cura-DuetRRF Plugin for Cura V5 is already submitted for review by the Ultimaker Marketplace team - usually takes a few days before the approve and its available. Until then, you can use the manual installation method from the next branch of the plugin - and download the zip file also from the next branch: https://github.com/Kriechi/Cura-DuetRRFPlugin/tree/next#manual-installation

      posted in Duet Web Control
      resam
      resam