Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add pause http api command #15

Merged
merged 5 commits into from
Jan 2, 2024
Merged

Conversation

brchri
Copy link
Owner

@brchri brchri commented Jan 2, 2024

Adds a simple http listener with endpoints /pause and /resume GET endpoints, listening on port 8555. Calling these endpoints will pause and resume garage door operations respectively. /pause can be called with the optional query string argument duration, where the duration is the number of seconds the operations should be paused for. Omitting this or setting the value to 0 will pause indefinitely, until the app is restarted or the /resume endpoint is called. /resume can also be called to resume a timed pause operation early.

Only garage door operations are paused with this endpoint. Tracking operations will continue during a pause.

Examples:
curl http://geogdo-ip:8555/pause?duration=10 - pauses garage door operations for 10 seconds
curl http://geogdo-ip:8555/pause - pauses indefinitely
curl http://geogdo-ip:8555/resume - resumes garage door operations

@brchri brchri merged commit 85a9187 into main Jan 2, 2024
2 checks passed
@brchri brchri deleted the add-pause-http-api-command branch January 2, 2024 05:47
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