Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Read the contents of a file via HTTP GET request / gcode

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    3
    4
    190
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • nickpmundefined
      nickpm
      last edited by

      Is it possible to have a http get request return the gcode contents of a file stored on the Duet? I have an external program thats separate from the duet web control and I was hoping to be able to read the contents of files on the Duet simply through GET requests. Any help is appreciated ! RRF3 if that helps.

      gtj0undefined 1 Reply Last reply Reply Quote 0
      • gtj0undefined
        gtj0 @nickpm
        last edited by

        @nickpm Yep...
        https://github.com/chrishamm/DuetWebControl/tree/legacy#rr_downloadnamexxx

        http://<your_duet>/rr_download?name=<yourfile>

        1 Reply Last reply Reply Quote 0
        • Danalundefined
          Danal
          last edited by Danal

          See: https://github.com/DanalEstes/DuetWebAPI

          Example invocation of getting a file:

          import DuetWebAPI as DWA
          printer=DWA.DuetWebAPI("http://192.168.7.101")
          printer.getFilenamed("/sys/config.g")
          
          ['; Jubilee CoreXY ToolChanging Printer - Config File', '; This file intended for Duet 3 hardware, main board plus two expansion boards (or, later, four tool boards)', '; As of 10/14/2019 INCOMPLETE AND ONLY PARTIALLY TESTED.  See the discord for more info. ', '', '; Name and Identification', '; Printer name is now set on the R Pi. ', '', '; Networking', ';;;M552 P192.16..........
          

          It is all python, but you can use it as an example to code in whatever you want.

          Delta / Kossel printer fanatic

          1 Reply Last reply Reply Quote 0
          • nickpmundefined
            nickpm
            last edited by

            You guys rock!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA