Add REST API endpoints for OpenClaw and external integrations#418
Open
nevan69 wants to merge 2 commits into
Open
Add REST API endpoints for OpenClaw and external integrations#418nevan69 wants to merge 2 commits into
nevan69 wants to merge 2 commits into
Conversation
Owner
|
Hi @nevan69 !!! Thank you for this, it's a nice pattern to include the API endpoints in this way. For the PiFinder repo the The I've switch this MR to be against |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a small machine-readable REST API to PiFinder so external tools such as OpenClaw can access PiFinder state, camera/solve data, screen images, and optionally send key events for remote UI automation.
The motivation is to make PiFinder easier to integrate with observing assistants, local automation systems, voice-control tools, and external display/annotation tools, while reusing PiFinder's existing shared state and starfield rendering logic.
Why
OpenClaw and similar tools need a stable way to query PiFinder without scraping the web UI or screen image. This PR exposes selected PiFinder state through JSON endpoints, including:
This makes it possible for external tools to build higher-level workflows such as voice-assisted observing, large-screen starfield visualization, object explanation, or remote control.
Added endpoints
Read-only JSON endpoints
GET /api/statusGET /api/timeGET /api/locationGET /api/solutionGET /api/visible_starsGET /api/imuGET /api/sqmImage endpoints
GET /api/screenGET /api/camera/rawGET /api/camera/debugOptional control endpoint
POST /api/key/api/keyallows an external tool to send PiFinder button events. This is useful for remote UI automation, voice-control integrations, or accessibility workflows.Example: