Skip to content

Interfacing with Mariner via CLI? #393

Answered by luizribeiro
daxliniere asked this question in Q&A
Discussion options

You must be logged in to vote

I don't use Node-RED myself, but you should be able to have Node-RED talk to mariner over the web API. The API is mostly meant to be used by the frontend, so there's no guarantees of backwards compatibility. But there's nothing preventing it.

For example, if you want to check the print status, you can simply run a request like this:

$ curl http://iot-mariner:5000/api/print_status
{
  "progress": 0.0,
  "selected_file": "spool-part1.ctb",
  "state": "IDLE"
}

If you want to pause the print, you can run:

$ curl -X POST http://iot-mariner:5000/api/printer/command/pause_print

You can check the module mariner.server.api to see all the API endpoints that are available.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@luizribeiro
Comment options

@daxliniere
Comment options

@daxliniere
Comment options

@luizribeiro
Comment options

@daxliniere
Comment options

Answer selected by luizribeiro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants