Add HTTP serve mode for Terminus/BYOS support#1
Open
ingm4r wants to merge 1 commit intopythcon:masterfrom
Open
Add HTTP serve mode for Terminus/BYOS support#1ingm4r wants to merge 1 commit intopythcon:masterfrom
ingm4r wants to merge 1 commit intopythcon:masterfrom
Conversation
Instead of pushing to TRMNL cloud webhooks, the collector can now run an HTTP server that Terminus Extensions poll for JSON data. This enables self-hosted Terminus users to use the Servarr dashboard without cloud webhook endpoints. - Add --serve, --port, --host CLI args and serve config section - Add DataHandler HTTP server (stdlib, no new deps) serving cached payloads at /data/<instance-name> - Add last_updated_local field for Terminus (lacks trmnl.user.utc_offset) - Add SERVE_PORT env var and EXPOSE 8080 to Dockerfile - Add docs/terminus.md setup guide - Webhook mode remains default and fully backward compatible Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
--servemode that starts a lightweight HTTP server (stdlibhttp.server, no new deps)/data/<instance-name>for JSON instead of relying on cloud webhooksSERVE_PORTenv var for Docker,serve:config section for YAMLlast_updated_localfield so Terminus templates work withouttrmnl.user.utc_offsetArchitecture
Endpoints
GET /{"instances": {"sonarr": "/data/sonarr", ...}}GET /data/<name>merge_variablespayload as JSONFiles changed
collector/trmnl_collector.pystore_payload(), CLI args,last_updated_localcollector/DockerfileSERVE_PORTenv,EXPOSE 8080, entrypoint handlingcollector/docker-compose.ymlcollector/config.example.yamlserve:section, webhook optional noteREADME.mddocs/terminus.mdTest plan
--dry-runstill worksSERVE_PORTenv var🤖 Generated with Claude Code