|
| 1 | +--- |
| 2 | +id: homepage |
| 3 | +title: Homepage |
| 4 | +description: Show Unpackerr queue counts on a Homepage dashboard. |
| 5 | +--- |
| 6 | + |
| 7 | +[Homepage](https://gethomepage.dev/) can show Unpackerr queue counts with its |
| 8 | +[custom API widget](https://gethomepage.dev/widgets/services/customapi/). |
| 9 | +`GET /api/stats` returns those counts as JSON. |
| 10 | + |
| 11 | +## API key |
| 12 | + |
| 13 | +The widget calls Unpackerr on a timer. Give it a key from **Settings → Web |
| 14 | +server**. The header is `X-Api-Key`. `Authorization: Bearer` plus the same |
| 15 | +key also works. Details are on |
| 16 | +[API keys and metrics](/docs/install/web-ui#api-keys-and-metrics). |
| 17 | + |
| 18 | +1. Under **Custom roles**, add a role named `homepage` and select |
| 19 | + `system:stats:read`. |
| 20 | +2. Under **API keys**, add a key, assign the `homepage` role, and |
| 21 | + **Generate** the secret. Save, then copy the key into `services.yaml`. |
| 22 | + |
| 23 | +A key on the built-in `admin` role can read stats as well. The `homepage` |
| 24 | +role above is limited to this endpoint. |
| 25 | + |
| 26 | +## services.yaml |
| 27 | + |
| 28 | +Homepage fetches `url` from the Homepage process. That address has to open |
| 29 | +from the Homepage container or host. When both apps share a Docker network, |
| 30 | +use the Unpackerr service name and port `5656`. `href` is the link people |
| 31 | +click, so that one can be the public site. |
| 32 | + |
| 33 | +With `urlbase` set to `/unpackerr`, the stats path is |
| 34 | +`http://unpackerr:5656/unpackerr/api/stats`. |
| 35 | + |
| 36 | +```yaml |
| 37 | +- Unpackerr: |
| 38 | + icon: unpackerr |
| 39 | + href: https://unpackerr.example.com |
| 40 | + description: Automated Archive Extractions |
| 41 | + widget: |
| 42 | + type: customapi |
| 43 | + url: http://unpackerr:5656/api/stats |
| 44 | + headers: |
| 45 | + X-Api-Key: your-api-key |
| 46 | + refreshInterval: 10000 |
| 47 | + display: block |
| 48 | + mappings: |
| 49 | + - field: queued |
| 50 | + label: Queued |
| 51 | + format: number |
| 52 | + - field: extracting |
| 53 | + label: Extracting |
| 54 | + format: number |
| 55 | + - field: finished |
| 56 | + label: Finished |
| 57 | + format: number |
| 58 | + - field: failed |
| 59 | + label: Failed |
| 60 | + format: number |
| 61 | +``` |
| 62 | +
|
| 63 | +`icon: unpackerr` is the |
| 64 | +[dashboard icon](https://dashboardicons.com/icons/unpackerr). |
| 65 | +`refreshInterval` is milliseconds. `10000` is ten seconds, which matches the |
| 66 | +widget default. |
| 67 | + |
| 68 | +## Fields |
| 69 | + |
| 70 | +`queued`, `waiting`, `extracting`, `extracted`, `imported`, `deleted`, and |
| 71 | +`failed` are items in that state right now. |
| 72 | + |
| 73 | +| Field | Meaning | |
| 74 | +| --- | --- | |
| 75 | +| `queued` | Queued for extract. | |
| 76 | +| `waiting` | Waiting, before the extract queue. | |
| 77 | +| `extracting` | Extract in progress. | |
| 78 | +| `extracted` | Extracted, waiting on import. | |
| 79 | +| `imported` | Imported by a Starr app. | |
| 80 | +| `deleted` | Deleted, or a delete still running. | |
| 81 | +| `failed` | Extract failed, or delete failed. | |
| 82 | + |
| 83 | +Completed Starr downloads with no extractable files can remain in `waiting`. |
| 84 | + |
| 85 | +`finished` and `retries` keep climbing for the life of the process. |
| 86 | +`finished` goes up when a deleted item ages out of history, and when you |
| 87 | +forget an item that was already deleted. `retries` goes up on each extract |
| 88 | +restart. |
| 89 | + |
| 90 | +| Field | Meaning | |
| 91 | +| --- | --- | |
| 92 | +| `hookOK` | Webhook deliveries that succeeded. | |
| 93 | +| `hookFail` | Webhook deliveries that failed. | |
| 94 | +| `cmdOK` | Command-hook runs that succeeded. | |
| 95 | +| `cmdFail` | Command-hook runs that failed. | |
| 96 | +| `starrs` | Configured Starr apps. | |
| 97 | +| `folders` | Watched folders. | |
| 98 | +| `webhooks` | Webhooks. | |
| 99 | +| `cmdhooks` | Command hooks. | |
| 100 | + |
| 101 | +Each internal channel is an object with `len` and `cap`. A Homepage field |
| 102 | +uses a dot, such as `stackXtractr.len`. |
| 103 | + |
| 104 | +| Field | Channel | |
| 105 | +| --- | --- | |
| 106 | +| `stackXtractr` | Starr extract callbacks. | |
| 107 | +| `stackFS` | Folder-watch filesystem events. | |
| 108 | +| `stackFolder` | Folder-watch extract callbacks. | |
| 109 | +| `stackHook` | Webhook and command-hook delivery. | |
| 110 | +| `stackDel` | File deletes. | |
| 111 | +| `stackTask` | Config apply and queue actions. | |
| 112 | + |
| 113 | +`starrQueues` contains one object per configured Starr app instance, ordered |
| 114 | +by app (Lidarr, Radarr, Readarr, Sonarr), then by sorted instance key. |
| 115 | +Check each entry's `app` and `name` before selecting its zero-based index. |
| 116 | +Each object has `app`, `name`, `url`, |
| 117 | +`queued`, `retrieved`, `complete`, `match`, `issues`, `downloading`, |
| 118 | +`updatedAt`, and `error`. `queued` on that object is the Starr activity |
| 119 | +queue. Unpackerr's own `queued` count is the table above. |
| 120 | + |
| 121 | +```yaml |
| 122 | +- field: starrQueues.0.queued |
| 123 | + label: First app queued |
| 124 | + format: number |
| 125 | +``` |
| 126 | + |
| 127 | +Change the index to pick another app, and set the label to that app's name. |
0 commit comments