Trigger http request from gcode?
CarlosR last edited by
I need to trigger a http request to call a service from an application backend I'm developing. This request is suposed to be triggered multiple times during the printing process to control external devices and processes.
I know this topic had been treated previously in this forum, but almost a year ago.
Just wondering if any advances in that.
I don't think Telnet would be a solution regarding the security, as I would need to integrate a telnet client inside the application and I'm not familiar with this technology.
Thanks in advance.
fcwilt last edited by
Telnet is very simple - it is essentially a TCP socket connection passing strings of characters.
jay_s_uk last edited by
MintyTrebor last edited by
@carlosr @jay_s_uk is right I developed the Node-Red nodes with functionality specifically to intercept specially formatted M291 msgs which can be embedded in your gcode, or you can setup a monitor to watch for specific machine model variable changes. If you give me a few more details about what conditions will trigger your event, I may be able to help further.
If you want to develop your own application from scratch have a look at the Duet api's on the Duet Git repo. I used them a while ago to create a rules/event based MQTT messaging system (which you can also find on my repo, and reviewing the code may help you get to your desired goal quicker).
Both of these approaches work on the principle of establishing a unix/web socket subscription to Duet and then parsing the updates as they arrive.