Feature to make REST POST calls from KMotionCNC / KFlop
Posted: Fri Sep 27, 2019 8:09 am
Hi,
I think a very valueable addition to KMotionCNC and KFlop, would be a feature to post simple REST calls. This would allow communication with other applications.
As an example, I want to recieve an email when my CNC machine has an error. Right now I have realised this by a KFlop program that writes an empty file to disk when this event happens. I then have a separate program that continuously checks for the presence of that file, and if its there, it deletes it and sends the email. This works, but it is an ugly solution.
I have an additional program with a dashboard with allsorts of buttons (to control the arc generator in an EDM machine). it would be very usefull if KMotionCNC supports simple REST calls, that would allow me to control the arc generator from KMotionCNC.
A practical implementation could look really similar to the feature of KMotionCNC that allows you to call a thread with a var upon a button press. For REST calls, the thread name could be the IP address instead and the var the text string of the REST post body.
Really curious what you think about this.
I think a very valueable addition to KMotionCNC and KFlop, would be a feature to post simple REST calls. This would allow communication with other applications.
As an example, I want to recieve an email when my CNC machine has an error. Right now I have realised this by a KFlop program that writes an empty file to disk when this event happens. I then have a separate program that continuously checks for the presence of that file, and if its there, it deletes it and sends the email. This works, but it is an ugly solution.
I have an additional program with a dashboard with allsorts of buttons (to control the arc generator in an EDM machine). it would be very usefull if KMotionCNC supports simple REST calls, that would allow me to control the arc generator from KMotionCNC.
A practical implementation could look really similar to the feature of KMotionCNC that allows you to call a thread with a var upon a button press. For REST calls, the thread name could be the IP address instead and the var the text string of the REST post body.
Really curious what you think about this.