Skip to content
Wojciech Frącz edited this page Oct 26, 2017 · 10 revisions

Scenes

Voice commands

Execute a scene with assigned voice command

This endpoint executes all scenes that have at least one configured voice trigger that matches the given command. The trigger is consired matched if it is a substring of the given comomand.

Attribute Value
URL https://supla.fracz.com/api/voice-commands
Method PATCH
Body {"command": "THE VOICE COMMAND"}
Requires Authorization header yes
Response {"matchedActions": X, "feedback": "A FEEDBACK"}, where X is the number of executed scenes
cURL request example curl https://supla.fracz.com/api/voice-commands -X PATCH -m 10000 -H "Authorization: Bearer JWT_TOKEN" --data '{"command": "switch the bulb on"}'
example response {"matchedActions": 1, "feedback": "the bulb has been switched on"}

Clone this wiki locally