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

added audio and voice console commands #132

Merged
merged 2 commits into from Nov 12, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
106 changes: 67 additions & 39 deletions administration/runtime.md
Expand Up @@ -7,16 +7,14 @@ title: Runtime Commands

# Runtime Commands

It is also possible to query and even change the state of entities like items or things. Therefore the console offers commands in various areas:
It is possible to query and even change the state of entities like items or things. Therefore the console offers commands in various areas:

- [Commands](#commands)
- [Firmware](#firmware)
- [Inbox](#inbox)
- [Things](#things)
- [Items](#items)
- [Discovery](#discovery)
{::options toc_levels="3..4"/}

__Please note: Some of the commands described here are executed on the internal database and could brake your installation. So please use this functionality only if you know what you are doing!__
* TOC
{:toc}

**Please note: Some of the described commands are executed on the internal database and could break your installation. Please use this functionality only if you know what you are doing!**


## Examples
Expand All @@ -42,49 +40,79 @@ openhab> help smarthome:send
Usage: smarthome:send <item> <command> - sends a command for an item
```

### Items

### Commands

| smarthome interpret <command> | interprets the human language command
| smarthome update <item> <state> | sends a status update for an item
| smarthome send <item> <command> | sends a command for an item
| smarthome > <script to execute> | Executes a script
| smarthome status <item> | shows the current status of an item
| Command | Description
| :------ | :------
| `smarthome:status <item>` | shows the current status of an item
| `smarthome:update <item> <state>` | sends a status update for an item
| `smarthome:send <item> <command>` | sends a command for an item
| `smarthome:items list [<pattern>]` | lists names and types of all items (matching the pattern, if given)
| `smarthome:items clear` | removes all items
| `smarthome:items remove <itemName>` | removes the given item

### Firmware
### Discovery

| smarthome firmware list <thingTypeUID> | Lists the available firmwares for a thing type.
| smarthome firmware status <thingUID> | lists the firmware status for a thing
| smarthome firmware update <thingUID> <firmware version> | updates the firmware for a thing
| Command | Description
| :------ | :------
| `smarthome:discovery start <thingTypeUID!bindingID>` | runs a discovery on a given thing type or binding
| `smarthome:discovery enableBackgroundDiscovery <PID>` | enables background discovery for the discovery service with the given PID
| `smarthome:discovery disableBackgroundDiscovery <PID>` | disables background discovery for the discovery service with the given PID

### Inbox

| smarthome inbox | lists all current inbox entries
| smarthome inbox listignored | lists all ignored inbox entries
| smarthome inbox approve <thingUID> <label> | creates a thing for an inbox entry
| smarthome inbox clear | clears all current inbox entries
| smarthome inbox ignore <thingUID> | ignores an inbox entry permanently
| Command | Description
| :------ | :------
| `smarthome:inbox` | lists all current inbox entries
| `smarthome:inbox listignored` | lists all ignored inbox entries
| `smarthome:inbox approve <thingUID> <label>` | creates a thing for an inbox entry
| `smarthome:inbox clear` | clears all current inbox entries
| `smarthome:inbox ignore <thingUID>` | ignores an inbox entry permanently

### Things

| smarthome things list | lists all things
| smarthome things clear | removes all managed things
| Command | Description
| :------ | :------
| `smarthome:things list` | lists all things
| `smarthome:things clear` | removes all managed things

### Items
### Links

| smarthome items list [<pattern>] | lists names and types of all items (matching the pattern, if given)
| smarthome items clear | removes all items
| smarthome items remove <itemName> | removes the given item
| Command | Description
| :------ | :------
| `smarthome:links list` | lists all links
| `smarthome:links addChannelLink <itemName> <channelUID>` | links an item with a channel
| `smarthome:links removeChannelLink <itemName> <thingUID>` | unlinks an item with a channel
| `smarthome:links clear` | removes all managed links

### Links
### Audio

| smarthome links list | lists all links
| smarthome links addChannelLink <itemName> <channelUID> | links an item with a channel
| smarthome links removeChannelLink <itemName> <thingUID> | unlinks an item with a channel
| smarthome links clear | removes all managed links
| Command | Description
| :------ | :------
| `smarthome:audio play [<sink>] <filename>` | plays a sound file from the `conf/sounds` folder through the optionally specified audio sink(s)
| `smarthome:audio stream [<sink>] <url>` | streams the sound from the url through the optionally specified audio sink(s)
| `smarthome:audio sources` | lists the audio sources
| `smarthome:audio sinks` | lists the audio sinks

### Discovery
### Voice

| Command | Description
| :------ | :------
| `smarthome:voice say <text>` | speaks a text on the default audio sink with the default TTS and voice
| `smarthome:voice voices` | lists available voices of the active TTS services
| `smarthome:voice interpret <command>` | interprets a human language command

### Automation

| Command | Description
| :------ | :------
| `smarthome:> <script to execute>` | Executes a script from the `conf/scripts` folder

### Firmware

| Command | Description
| :------ | :------
| `smarthome:firmware list <thingTypeUID>` | Lists the available firmwares for a thing type.
| `smarthome:firmware status <thingUID>` | lists the firmware status for a thing
| `smarthome:firmware update <thingUID> <firmware version>` | updates the firmware for a thing

| smarthome discovery start <thingTypeUID!bindingID> | runs a discovery on a given thing type or binding
| smarthome discovery enableBackgroundDiscovery <PID> | enables background discovery for the discovery service with the given PID
| smarthome discovery disableBackgroundDiscovery <PID> | disables background discovery for the discovery service with the given PID