Skip to content

CashPilot: make the tile work with CashPilot's read-only key - #1090

Open
GeiserX wants to merge 1 commit into
linuxserver:masterfrom
GeiserX:cashpilot-readonly-key
Open

GeiserX wants to merge 1 commit into
linuxserver:masterfrom
GeiserX:cashpilot-readonly-key

Conversation

@GeiserX

@GeiserX GeiserX commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

The CashPilot tile no longer tells the truth when its key is wrong, and it can lose its key.

  • Since CashPilot 2.3.1, the fleet key (CASHPILOT_API_KEY) reads nothing and gets a 403. A tile set up with that key now shows as active with two dashes, and Test says only "Something went wrong... Code: 403".
  • The key field is not filled in when you edit the tile. If you save the tile without typing the key again, the key is gone.
  • When CashPilot cannot be reached, livestats() calls getBody() on a null response.
  • The icon still shows the old plane. CashPilot changed its mark in September.

The fix:

  • livestats() reads the response only on a 200. Anything else shows the tile as inactive, with dashes.
  • Test names the key to use when CashPilot answers 403: CASHPILOT_READONLY_API_KEY. That key was added in CashPilot 1.22.0 for dashboards. It can read the earnings summary and nothing that changes state.
  • The URL and key fields show the saved values on edit, as most enhanced apps here do. The key field's placeholder names the read-only key.
  • cashpilot.svg is the current mark, run through the repo's svgo config.

The config key is still access_token, so saved tiles keep working. app.json, livestats.blade.php and the endpoint have not changed.

I wrote CashPilot and added this app in #971.

I checked the PHP with php -l and phpcs --standard=PSR12 (the linter's settings). I have not run the tile inside a live Heimdall.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant