Start job from html request

I’ve got a lowrider 3 with a tangential knife head making cardboard shipping boxes. I’d like to be able to start a specific job by sending an html request (say something like, lowrider.local/box1.gcode) or a webhook

Is there any way to do this? I can’t find anything in the fluidnc docs

1 Like

Assuming the following:

  • FluidNC is using lowrider.local
  • File is on SD card named box1.gcode

You would use this URL:
http://lowrider.local/command?cmd=%24SD%2FRun%3Dbox1.gcode

The data after cmd= is $SD/Run=box1.gcode that has been URL encoded. So,

  • $ → %24
  • / → %2F
  • = → %3D

It doesn’t completely connect these dots but this is the supporting documentation:

6 Likes

Awesome, thanks so much Jason! That worked perfectly

Can I do a similar thing in a webhook?

I think I could run a pi as a intermediary but it would be much simpler if I could access fluidnc directly.

Ultimately I’m trying to get our ERP system (odoo) to run a server action to start the cutting of a cardboard box. Because it’s a locked down environment I can send webhooks but I cannot directly send an http request.

I’m not connecting the dots on how a webhook would help? Maybe my understanding of a webhook is wrong but that’s still over HTTP.

I’m not aware of webhook support in FluidNC. You can connect via HTTP, websockets, telnet, wired via UART…

The ERP system I’m using allows me to send webhooks, but not to call an arbitrary url. I was hoping I could send a webhook to the FluidNC with a reference to the gcode file to run, but of course i’d need to expose the FluidNC to the outside internet so it’s not a great idea anyway.

What you’ve provided is fantastic.

I think what I’ll do is use an pi or esp32 with some physical buttons attached to fire the web requests. This would give me a handful of physical start buttons rather than needing to use the web interface.

Thanks for the help :slight_smile:

2 Likes