# Klipper

> Monitor a Klipper 3D printer through its Moonraker server.

App · 10 actions. Web page: https://docs.lodol.com/docs/integrations/klipper

## Actions

### Get endstop status

Report which printer endstops are open or triggered.

**Inputs**: None.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "result": {
      "x": "open",
      "y": "TRIGGERED",
      "z": "open"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get G-code history

Read the recent commands and responses recorded by Moonraker.

**Inputs**

- Count (`count`, number): Maximum entries to return. At least 1.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "result": {
      "gcode_store": [
        {
          "message": "STATUS",
          "time": 1735689600.0,
          "type": "command"
        }
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get print status

Read the current job name, print state and progress.

**Inputs**: None.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "result": {
      "eventtime": 123.4,
      "status": {
        "print_stats": {
          "filename": "example.gcode",
          "state": "printing"
        },
        "virtual_sdcard": {
          "progress": 0.42
        }
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get printer info

Read the printer state and Klipper version.

**Inputs**: None.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "result": {
      "software_version": "v0.13.0",
      "state": "ready",
      "state_message": "Printer is ready"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get server info

Read the status of Moonraker and its connection to Klipper.

**Inputs**: None.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "result": {
      "klippy_connected": true,
      "klippy_state": "ready",
      "moonraker_version": "v0.9.3"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get temperature history

Read recent temperature readings recorded by Moonraker.

**Inputs**

- Include monitors (`include_monitors`, true/false): Include temperature monitors as well as sensors and heaters.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "result": {
      "extruder": {
        "targets": [
          0.0
        ],
        "temperatures": [
          21.0
        ]
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get toolhead status

Read the toolhead position and motion limits.

**Inputs**: None.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "result": {
      "eventtime": 123.4,
      "status": {
        "toolhead": {
          "homed_axes": "xyz",
          "position": [
            0.0,
            0.0,
            0.0,
            0.0
          ]
        }
      }
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List G-code commands

Read the printer’s available documented G-code commands and help text.

**Inputs**: None.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "result": {
      "STATUS": "Report the printer status"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List print history

Read recorded print jobs and their status from Moonraker.

**Inputs**

- Limit (`limit`, number): Maximum jobs to return. From 1 to 100.
- Offset (`offset`, number): Number of matching jobs to skip. At least 0.
- Order (`order`, text): Choose the chronological sort order. One of: `asc` (Oldest first), `desc` (Newest first).

**Outputs**: Response.

- `data` (object): Moonraker response.
- `has_more` (true/false): Whether another page may be available.
- `next_cursor` (text): Offset for the next page, when available.

**Example output**

```json
{
  "data": {
    "result": {
      "count": 1,
      "jobs": [
        {
          "filename": "test-print.gcode",
          "job_id": "00001A",
          "print_duration": 322.5,
          "status": "completed"
        }
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List printer objects

List the printer objects this Klipper installation exposes.

**Inputs**: None.

**Outputs**

- `data` (object): Data.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page, when available.

**Example output**

```json
{
  "data": {
    "result": {
      "objects": [
        "toolhead",
        "print_stats",
        "extruder"
      ]
    }
  },
  "has_more": false,
  "next_cursor": null
}
```
