Updated external content (Jenkins build 728)
parent
0153593029
commit
a5af802b1c
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,142 @@
|
|||
---
|
||||
id: mycroft
|
||||
label: Mycroft
|
||||
title: Mycroft - Bindings
|
||||
type: binding
|
||||
description: "This binding connects to Mycroft A.I. in order to control it or react to events by listening on the message bus."
|
||||
since: 3x
|
||||
install: manual
|
||||
---
|
||||
|
||||
<!-- Attention authors: Do not edit directly. Please add your changes to the appropriate source repository -->
|
||||
|
||||
{% include base.html %}
|
||||
|
||||
# Mycroft Binding
|
||||
|
||||
This binding connects to Mycroft A.I. in order to control it or react to events by listening on the message bus.
|
||||
|
||||
Possibilies include:
|
||||
|
||||
- Press a button in openHAB to wake Mycroft without using a wake word.
|
||||
- Simulate a voice command to launch a skill, as if you just spoke it
|
||||
- Send some text that Mycroft will say (Using its Text To Speech service)
|
||||
- Control the music player
|
||||
- Mute the sound volume of Mycroft
|
||||
- React to all the aforementioned events ...
|
||||
- ... and send/receive any other kind of messages on the message bus
|
||||
|
||||
|
||||
## Supported Things
|
||||
|
||||
The only thing managed by this binding is a Mycroft instance
|
||||
|
||||
| Thing Type ID | Description |
|
||||
|--------------------|----------------------------------------------------------------------------|
|
||||
| mycroft | A Mark I/II, a Picroft, or any other variant exposing the message bus |
|
||||
|
||||
|
||||
|
||||
## Discovery
|
||||
|
||||
There is no discovery service, as Mycroft doesn't announce itself on the network.
|
||||
|
||||
|
||||
## Thing Configuration
|
||||
|
||||
The configuration is simple, as you just need to give the IP/hostname of the Mycroft instance accessible on the network.
|
||||
The default port is 8181, which can be changed.
|
||||
|
||||
```
|
||||
Thing mycroft:mycroft:myMycroft "Mycroft A.I." @ "Living Room" [host="192.168.X.X"]
|
||||
```
|
||||
|
||||
| property | type | description | mandatory |
|
||||
|--------------------------|------------------------|------------------------------------------------------------------|-----------|
|
||||
| host | IP or string | IP address or hostname | Yes |
|
||||
| port | integer | Port to reach Mycroft (default 8181) | No |
|
||||
| volume_restoration_level | integer | When unmuted, force Mycroft to restore volume to this value | No |
|
||||
|
||||
|
||||
## Channels
|
||||
|
||||
A Mycroft thing has the following channels:
|
||||
|
||||
|
||||
| channel type id | Item type | description |
|
||||
|------------------------------|-----------|------------------------------------------------------------------------------------------------|
|
||||
| listen | Switch | Switch to ON when Mycroft is listening. Can simulate a wake word detection to trigger the STT |
|
||||
| speak | String | The last sentence Mycroft speaks |
|
||||
| utterance | String | The last utterance Mycroft receive |
|
||||
| player | Player | The music player Mycroft is currently controlling |
|
||||
| volume_mute | Switch | Mute the Mycroft speaker |
|
||||
| volume | Dimmer | The volume of the Mycroft speaker. (Note : Value unreliable until a volume change occured) |
|
||||
| full_message | String | The last message (full json) seen on the Mycroft Bus. Filtered by the messageTypes properties |
|
||||
|
||||
|
||||
The channel 'full_message' has the following configuration available:
|
||||
|
||||
| property | type | description | mandatory |
|
||||
|---------------|---------------------------------|-------------------------------------------------------------------------|-----------|
|
||||
| messageTypes | List of string, comma separated | Only these message types will be forwarded to the Full Message Channel | No |
|
||||
|
||||
|
||||
## Full Example
|
||||
|
||||
A manual setup through a `things/mycroft.things` file could look like this:
|
||||
|
||||
```java
|
||||
Thing mycroft:mycroft:myMycroft "Mycroft A.I." @ "Living Room" [host="192.168.X.X", port=8181] {
|
||||
Channels:
|
||||
Type full-message-channel : Text [
|
||||
messageTypes="message.type.1,message.type.4"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Item Configuration
|
||||
|
||||
The `mycroft.item` file:
|
||||
|
||||
```java
|
||||
Switch myMycroft_mute "Mute" { channel="mycroft:mycroft:myMycroft:volume_mute" }
|
||||
Dimmer myMycroft_volume "Volume [%d]" { channel="mycroft:mycroft:myMycroft:volume" }
|
||||
Player myMycroft_player "Control" { channel="mycroft:mycroft:myMycroft:player" }
|
||||
Switch myMycroft_listen "Wake and listen" { channel="mycroft:mycroft:myMycroft:listen" }
|
||||
String myMycroft_speak "Speak STT" { channel="mycroft:mycroft:myMycroft:speak" }
|
||||
String myMycroft_utterance "Utterance" { channel="mycroft:mycroft:myMycroft:utterance" }
|
||||
String myMycroft_fullmessage "Full JSON message" { channel="mycroft:mycroft:myMycroft:full_message" }
|
||||
```
|
||||
|
||||
### Sitemap Configuration
|
||||
|
||||
A `demo.sitemap` file:
|
||||
|
||||
```
|
||||
sitemap demo label="myMycroft"
|
||||
{
|
||||
Frame label="myMycroft" {
|
||||
Switch item=myMycroft_mute
|
||||
Slider item=myMycroft_volume
|
||||
Default item=myMycroft_player
|
||||
Switch item=myMycroft_listen
|
||||
Text item=myMycroft_speak
|
||||
Text item=myMycroft_utterance
|
||||
Text item=myMycroft_fullmessage
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Ask Mycroft to say something
|
||||
|
||||
mycroft.rules
|
||||
|
||||
```java
|
||||
rule "Say Hello"
|
||||
when
|
||||
Item Presence_Isaac changed
|
||||
then
|
||||
myMycroft_speak.sendCommand("Hello Isaac")
|
||||
end
|
||||
```
|
|
@ -5,6 +5,7 @@ title: Renault - Bindings
|
|||
type: binding
|
||||
description: "This binding allow MyRenault App. users to get battery status and other data from their cars."
|
||||
since: 3x
|
||||
logo: images/addons/renault.png
|
||||
install: manual
|
||||
---
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ title: Sonnen - Bindings
|
|||
type: binding
|
||||
description: "The binding for sonnen communicates with a sonnen battery."
|
||||
since: 3x
|
||||
logo: images/addons/sonnen.png
|
||||
install: manual
|
||||
---
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ Number Volume "Volume" (Stereo) {alexa="VolumeLevel"}
|
|||
Switch Mute "Mute" (Stereo) {alexa="MuteState"}
|
||||
Switch Power "Power" (Stereo) {alexa="PowerState"}
|
||||
String Input "Input" (Stereo) {alexa="Input" [supportedInputs="HDMI1,TV"]}
|
||||
String Channel "Channel" (Stereo) {alexa="Channel"}
|
||||
Number Channel "Channel" (Stereo) {alexa="Channel"}
|
||||
String KeyCode "Key Code" (Stereo) {alexa="ChannelStep" [CHANNEL_UP="CHUP", CHANNEL_DOWN="CHDOWN"]}
|
||||
Player Playback "Playback" (Stereo) {alexa="Playback"}
|
||||
Switch Stop "Stop" (Stereo) {alexa="PlaybackStop"}
|
||||
|
@ -2012,6 +2012,7 @@ Asset Identifier | Supported Friendly Names
|
|||
`@Setting.Reverse` | Reverse
|
||||
`@Setting.Speed` | Speed
|
||||
`@Setting.Spot` | Spot
|
||||
`@Setting.TargetTemperature` | Target Temperature
|
||||
`@Setting.Tilt` | Tilt
|
||||
`@Setting.ToggleState` | Toggle State
|
||||
`@Value.Decrease` | Decrease
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<thing:thing-descriptions bindingId="mycroft"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
|
||||
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
|
||||
|
||||
<thing-type id="mycroft">
|
||||
<label>Mycroft</label>
|
||||
<description>A Mycroft instance</description>
|
||||
|
||||
<channels>
|
||||
<channel id="listen" typeId="listen-channel"/>
|
||||
<channel id="speak" typeId="speak-channel"/>
|
||||
<channel id="utterance" typeId="utterance-channel"/>
|
||||
<channel id="player" typeId="system.media-control"/>
|
||||
<channel id="volume" typeId="system.volume"/>
|
||||
<channel id="volume_mute" typeId="system.mute"/>
|
||||
<channel id="full_message" typeId="full-message-channel"/>
|
||||
</channels>
|
||||
|
||||
<config-description>
|
||||
<parameter name="host" type="text" required="true">
|
||||
<label>Hostname</label>
|
||||
<description>This is the host to connect to (ip or hostname)</description>
|
||||
<context>network-address</context>
|
||||
</parameter>
|
||||
<parameter name="port" type="integer" required="false" min="1" max="65535">
|
||||
<label>Port</label>
|
||||
<description>This is the port to connect to.</description>
|
||||
<default>8181</default>
|
||||
</parameter>
|
||||
<parameter name="volume_restoration_level" type="integer" required="false" min="1" max="100">
|
||||
<advanced>true</advanced>
|
||||
<label>Volume Restoration Level</label>
|
||||
<description>When unmuted, force Mycroft to restore volume to this value</description>
|
||||
</parameter>
|
||||
|
||||
</config-description>
|
||||
|
||||
</thing-type>
|
||||
|
||||
<channel-type id="listen-channel">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Listen State</label>
|
||||
<description>Switch to ON when Mycroft is listening. Can simulate a wake work detection to trigger the STT.</description>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="speak-channel">
|
||||
<item-type>String</item-type>
|
||||
<label>TTS</label>
|
||||
<description>The last sentence Mycroft spoke.</description>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="utterance-channel">
|
||||
<item-type>String</item-type>
|
||||
<label>Utterance</label>
|
||||
<description>The last utterance Mycroft received.</description>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="full-message-channel" advanced="true">
|
||||
<item-type>String</item-type>
|
||||
<label>Full Bus Message</label>
|
||||
<description>The last full message seen on the Mycroft Bus.</description>
|
||||
<config-description>
|
||||
<parameter name="messageTypes" type="text" required="false">
|
||||
<label>Full Message Channel Filter</label>
|
||||
<description>The full message channel will be updated on these message types only (comma separated value)</description>
|
||||
<default>message.type.1,message.type.2</default>
|
||||
</parameter>
|
||||
</config-description>
|
||||
</channel-type>
|
||||
|
||||
</thing:thing-descriptions>
|
Loading…
Reference in New Issue