-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add pause http api command (#15)
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
- Loading branch information
Showing
4 changed files
with
131 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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