Upload to repetier from slic3r prusa edition

2»

Comments

  • MSOHD said:
    WTF I tried it again and again and now it works without a change...
    I'm so happy at this moment! Thank you for your help!
    I have no clue why it didn't work...
    Can you post a screenshot from the line in Slic3r, and your correct line here Please...thanks

    Ahhhh... thanks it works...
  • D :\Dokumente\Prusa.bat; ? Hope you omitted the semicolon.
  • Repetier said:
    We will soon publish a new Desktop App to help with this. It will offer  watched upload directory so that you just need to save generated gcode to the right folder to upload to server.
    Definitely looking forward to this.  My current process is very cumbersome.  

    Have you considered direct integration with PrusaSlicer?
  • I'm trying to get this to work.  I'm getting the following error:

    PrusaSlicer has encountered an error
    Post-processing script C:\Users\cosmi\PrinterScript.bat on file C:\Users\cosmi\Downloads\3DBenchy.gcode failed.
    Error code:  1

    Using the following batch file:

    @echo off
    c:\Windows\System32\curl.exe -i -X POST -H "Content-Type: multipart/form-data" -H "x-api-key: fdb5b006-6131-45b0-b4e1-xxxxxxxxxxxxxxxx" -F "a=upload" --url "http://192.168.1.100:3344/printer/model/Prusa_MK2.5" -F "filename=@%1" > curl_log.txt

    Any suggestions?


  • Try running from command line
  • cosmith71 said:
    I'm trying to get this to work.  I'm getting the following error:

    PrusaSlicer has encountered an error
    Post-processing script C:\Users\cosmi\PrinterScript.bat on file C:\Users\cosmi\Downloads\3DBenchy.gcode failed.
    Error code:  1

    Using the following batch file:

    @echo off
    c:\Windows\System32\curl.exe -i -X POST -H "Content-Type: multipart/form-data" -H "x-api-key: fdb5b006-6131-45b0-b4e1-xxxxxxxxxxxxxxxx" -F "a=upload" --url "http://192.168.1.100:3344/printer/model/Prusa_MK2.5" -F "filename=@%1" > curl_log.txt

    Any suggestions?



    I modified the script with a fixed path to a gcode and just ran it.  I changed the printer name to be as simple as I could make it.

    @echo off
    c:\Windows\System32\curl.exe -i -X POST -H "Content-Type: multipart/form-data" -H "x-api-key: fdb5b006-6131-45b0-b4e1-*" -F "a=upload" --url "http://192.168.1.100:3344/printer/model/MK2" -F "filename=Test.gcode" > curl_log.txt
    curl_log.txt still shows this:

    HTTP/1.1 100 Continue
    HTTP/1.1 200 OK
    Date: Mon, 27 May 2019 13:53:19 GMT
    Connection: Close
    Server: 0.91
    Access-Control-Allow-Origin: *
    Content-Type: text/html; charset=utf-8
    Cache-Control: public, max-age=0
    {"error":"Unknown printer"}



  • Walli said:
    Try running from command line
    I get this output:

      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   276    0    27  100   249     27    249  0:00:01 --:--:--  0:00:01  8903


  • edited May 2019
    Double check your path in your web browser
  • Walli said:
    Double check your path in your web browser
    So it is different.  Now when I run it from a command prompt I get the following (API truncated for safety):

    c:\Windows\System32\curl.exe -i -X POST -H "Content-Type: multipart/form-data" -H "x-api-key: fdb5b006-6131-45b0-b4e1-*" -F "a=upload" --url "http://192.168.1.100:3344/printer/model/Prusa_MK26" -F "filename=C:\Users\cosmi\Downloads\Test.gcode" > curl_log.txt
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   274    0     0  100   274      0     18  0:00:15  0:00:15 --:--:--     0
    curl: (52) Empty reply from server
    

    curl_log.txt now only reads this:

    HTTP/1.1 100 Continue

    It still does not appear to have been sent.

    Thanks for your help!


  • "We will soon publish a new Desktop App to help with this. It will offer watched upload directory so that you just need to save generated gcode to the right folder to upload to server."

    Is progressing this feature? Thanks.
  • Sure. We are in the last phase of server release testing which is required for the new app. The app it self needs a bit more testing but will appear shortly after 0.92.0 is finished. Maybe as beta but it is already working quite well and also feature complete.
  • Repetier said:
    Sure. We are in the last phase of server release testing which is required for the new app. The app it self needs a bit more testing but will appear shortly after 0.92.0 is finished. Maybe as beta but it is already working quite well and also feature complete.
    Thanks, you did a fantastic job. If you need help with spanish translations, contact me.
  • Thanks, but for now we have a spanish translator that is active.
  • Repetier said:
    Sure. We are in the last phase of server release testing which is required for the new app. The app it self needs a bit more testing but will appear shortly after 0.92.0 is finished. Maybe as beta but it is already working quite well and also feature complete.
    Any news on this?  
  • Will come, but was not stable enough to publish yet. But will follow soon.
  • Aw, too bad.  I'm looking forward to it.
  • Walli said:
    Hi,

    I made a simple script to upload to repetier server waiting for slic3r native implementation as for octoprint or duet.

    Script for Windows is the following :
    @echo off
    c:\Windows\System32\curl.exe -i -X POST -H "Content-Type: multipart/form-data" -H "x-api-key: xxxxxxxxxxxxxxxxxxxx" -F "a=upload" --url "http://192.168.0.xx:3344/printer/model/xxxxxxx" -F "filename=@%1" > curl_log.txt

    You need to replace xxx by api key, ip adress and printer name.

    in slic3r, in post processing scripts, just call the file you created, file name shall be .bat or .cmd to work.

    In my case curl case already installed, you may need to install curl on a fresh windows...

    Easy to adapt to mac or linux... just change the path and create a shell script instead.

    Regards,
    Pierre


    Can you please show an example with Mac? Im not a programmer so I dont quite understand the shell script part
  • Are there any news to this topic?
  • Repetier-Server Monitor is released where you can upload by saving to the right folder. Prusa Slicer has no new function to support server.
  • Repetier-Server Monitor works well for this purpose, although its overall usefulness is limited for me because of the way it doesn't save preferences for folders and sorting.  I'm hoping an update fixes these issues and then Monitor will be my go-to instead of opening a browser window alongside it.

    The PrusaSlicer team doesn't seem to be too interested in adding this functionality.  I guess they are too busy with other things.
  • Working on monitor improvements. 
  • Repetier said:
    Working on monitor improvements. 
    Thanks for the hard work.  I'm looking forward to it.
  • I wanted to add some comments after struggling with this for a while... pretty much all of the suggested methods work as long as you run PrusaSlicer as an Administrator.

    Here is my working configuration:

    PrusaSlicer Post-processing scripts setting -  <path to your batch file>\<batch file name and file extension>

       Example - C:\Users\Bob\ExportGCode.bat

    Batch file contents:

    @ECHO OFF
    "C:\Windows\System32\curl.exe" -i -X POST -H "Content-Type: multipart/form-data" -H "x-api-key: <Repetier Server API Key>" -F "a=upload" --url "http://<Repetier Server IP Address>:3344/printer/model/<Repetier Server Printer Name (case sensitive)>" -F "filename=@%1"

    If you have any trouble or just want to see what's going on when the batch file is called, change the first line of the batch file from "@ECHO OFF" to "@ECHO ON" and add a new line at the end with "PAUSE". This will allow the batch file to pause after it runs and show you information that may help in troubleshooting.

    Example - 
    @ECHO ON
    "C:\Windows\System32\curl.exe" -i -X POST -H "Content-Type: multipart/form-data" -H "x-api-key: <Repetier Server API Key>" -F "a=upload" --url "http://<Repetier Server IP Address>:3344/printer/model/<Printer name (case sensitive) as shown in Repetier Server>" -F "filename=@%1"
    PAUSE

    I hope this helps and prevents others from spending way too much time getting this working like I did!
  • I gave it another try using your suggestions.  I can't see that PrusaSlicer even calls curl.

    Hopefully the new and improved version of Monitor will drop soon.
  • I had issues getting this to work, with an error popping up in PrusaSlicer:
    Post-processing script "V:\Other Program Files\Repetier-Host\Slic3rPE 2.2\upload_to_repetier_server.bat" on file V:\Documents\3d printing\Tests\test.gcode failed.
    Error code: 1
    Administrator mode did not help. The problem in my case was that the gcode path parameter passed into %1 was getting wrapped in quotes behind the scenes due to the spaces in my "3d printing" path AND the "Other Program Files" path has spaces in it too. I expect the same issue will crop up if the gcode filename has a space in it. Anyway, I moved my .BAT script to a path with no spaces and changed  -F "filename=@%1"   to  -F "filename=@%~f1"  which makes the parameter get interpreted as a path (and expanded to a full path if not already complete). Now everything I export to gcode from PrusaSlicer uploads into the "Default" group for my printer in Repetier Server, just like I wanted.

    I did not need to run anything in Administrator mode, but this computer is still running Windows 7, so not sure if that is needed on Windows 10.

    Since that worked I wanted to see some feedback about whether surl failed or succeeded and keep a log of past uploads. For anyone not using Repetier-Server Monitor that wants to get this working as a post processing script. here is my full batch file (with X's instead of actual API, IP, and printer model):

    @echo off
    echo Uploading %~f1 to Repetier Server...
    echo.
    echo.
    echo.
    echo %date% %time% >> "C:\scripts\PrusaSlicerUploadedToRepetierServer.txt"
    echo %~f1 >> "C:\scripts\PrusaSlicerUploadedToRepetierServer.txt"
    c:\Windows\System32\curl.exe -i -X POST -H "Content-Type: multipart/form-data" -H "x-api-key: 1d858fec-2bf4-450c-823c-XXXXXXXXXXXX" -F "a=upload" --url "http://XXX.XXX.XXX.XXX:3344/printer/model/XXXX" -F "filename=@%~f1" > "C:\scripts\PrusaSlicerUploadedToRepetierServer_curl.txt"

    if %errorlevel% == 0 (
        echo Upload successful! >> "C:\scripts\PrusaSlicerUploadedToRepetierServer.txt"
        echo.
        echo.
        echo.
        echo Upload successful!
    ) else (
        echo *** Upload failed! *** >> "C:\scripts\PrusaSlicerUploadedToRepetierServer.txt"
        echo *** Upload failed! ***
        pause
    )
    echo. >> "C:\scripts\PrusaSlicerUploadedToRepetierServer.txt"
    timeout /t 1 /nobreak > NUL
  • Repetier said:
    We will soon publish a new Desktop App to help with this. It will offer  watched upload directory so that you just need to save generated gcode to the right folder to upload to server.
    Has this ever been published? Would love to see it in action. 
  • I believe this is Repetier-Server Monitor, which is available on the download page.  PrusaSlicer now offers Repetier upload, though.
Sign In or Register to comment.