Jonathan et al-
I would like to request the ability to run a script from within KISS, specifically to upload to Octoprint.
This is how they do it from within S3D-
https://github.com/foosel/OctoPrint/wik ... -Octoprint
using CURL- https://curl.haxx.se/using command lines to send data.
best regards,
dennis
Ability to run script from within KISS
- pjr
- Posts: 704
- Joined: 05 May 2015, 10:27
- Location: Kamnik, Slovenia
Re: Ability to run script from within KISS
Is it possible to use the Settings/Printer/Firmware/Post-Process entry field for this?
Peter
Peter
-
- Posts: 150
- Joined: 20 Aug 2016, 18:25
Re: Ability to run script from within KISS
It is. That's how I upload and print from kisslicer on the duet.pjr wrote:Is it possible to use the Settings/Printer/Firmware/Post-Process entry field for this?
Peter
-
- Posts: 55
- Joined: 28 Nov 2017, 10:06
Re: Ability to run script from within KISS
Thank you for showing me where this is.
How are you connecting and sending to the duet? What is the connection or protocol that you are using?
How are you connecting and sending to the duet? What is the connection or protocol that you are using?
-
- Posts: 55
- Joined: 28 Nov 2017, 10:06
Re: Ability to run script from within KISS
[quote="pjr"]Is it possible to use the Settings/Printer/Firmware/Post-Process entry field for this?
It IS possible! We should move this from Feature requests to Tips & Tricks! Here is my script using curl. I got some assistance in final debug from Jubaleth on freenode reprap irc.
It IS possible! We should move this from Feature requests to Tips & Tricks! Here is my script using curl. I got some assistance in final debug from Jubaleth on freenode reprap irc.
Code: Select all
ECHO ON
ECHO FILENAME %1
curl -k -H "X-Api-Key: *YOUR_OCTOPRINT_API_HERE*" -F "select=false" -F "print=false" -F "file=@""%1""" "http://192.168.*.*/api/files/local"
PAUSE
Last edited by sinned6915 on 01 Feb 2019, 00:45, edited 1 time in total.
-
- Posts: 150
- Joined: 20 Aug 2016, 18:25
Re: Ability to run script from within KISS
The duet's protocol is described somewhere on the duet site or in the reprapfirmware's code, can't tell now, been a while, but it's basicallysinned6915 wrote:Thank you for showing me where this is.
How are you connecting and sending to the duet? What is the connection or protocol that you are using?
Code: Select all
curl --data-binary @"$inf" "${endpoint}rr_upload?name=$upf&time=$ft
Code: Select all
ft="$(TZ=UTC date -r "$inf" +%Y-%m-%dT%H:%M:%S)"
Code: Select all
curl -s "${endpoint}rr_gcode?gcode=M32%20%22/${upf}%22"
-
- Posts: 55
- Joined: 28 Nov 2017, 10:06
Re: Ability to run script from within KISS
The syntax that works in KISS_2.0 seems to be -
YOUR_SCRIPT.BAT "<FILE>"
YOUR_SCRIPT.BAT contains-
YOUR_SCRIPT.BAT "<FILE>"
YOUR_SCRIPT.BAT contains-
Code: Select all
curl -k -H "X-Api-Key: **API_KEY**" -F "select=false" -F "print=false" -F file=@%1 "http://octoprint.local/api/files/local"