POST /activity
Sets the active activity, automatically running the power, input, and sequence transition. Pass null to deactivate all activities.
Request
Body
| Field | Type | Description |
|---|---|---|
name | string | null | Activity name as defined in config, or null to deactivate |
state | “on” | “off” | (optional) Explicity set the desired state of the activity. No value defaults to toggle operation |
Responses
| Status | Body |
|---|---|
| 200 OK | |
| 404 | "message": Not found"} |
Example
curl --header "Content-Type: application/json" \
--request POST \
--data '{"name": "Watch tv", "state": "on"}' \
http://192.168.0.100/api/activity