[amazonechocontrol] fix unnecessary refresh and add text commands (#9328)

* fixed: removed unnecessary refresh on push activity

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
Also-By: Tom Blum <trinitus01@googlemail.com>
Co-authored-by: Tom Blum <trinitus01@googlemail.com>
This commit is contained in:
J-N-K 2020-12-12 01:17:20 +01:00 committed by GitHub
parent 578807f452
commit 5d49188e0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 127 additions and 26 deletions

View File

@ -5,6 +5,7 @@ This binding can control Amazon Echo devices (Alexa).
It provides features to control and view the current state of echo devices: It provides features to control and view the current state of echo devices:
- use echo device as text to speech from a rule - use echo device as text to speech from a rule
- execute a text command
- volume - volume
- pause/continue/next track/previous track - pause/continue/next track/previous track
- connect/disconnect bluetooth devices - connect/disconnect bluetooth devices
@ -179,6 +180,7 @@ It will be configured at runtime by using the save channel to store the current
| announcement | String | W | echo, echoshow, echospot | Write Only! Display the announcement message on the display. See in the tutorial section to learn how its possible to set the title and turn off the sound. | announcement | String | W | echo, echoshow, echospot | Write Only! Display the announcement message on the display. See in the tutorial section to learn how its possible to set the title and turn off the sound.
| textToSpeech | String | W | echo, echoshow, echospot | Write Only! Write some text to this channel and Alexa will speak it. It is possible to use plain text or SSML: e.g. `<speak>I want to tell you a secret.<amazon:effect name="whispered">I am not a real human.</amazon:effect></speak>` | textToSpeech | String | W | echo, echoshow, echospot | Write Only! Write some text to this channel and Alexa will speak it. It is possible to use plain text or SSML: e.g. `<speak>I want to tell you a secret.<amazon:effect name="whispered">I am not a real human.</amazon:effect></speak>`
| textToSpeechVolume | Dimmer | R/W | echo, echoshow, echospot | Volume of the textToSpeech channel, if 0 the current volume will be used | textToSpeechVolume | Dimmer | R/W | echo, echoshow, echospot | Volume of the textToSpeech channel, if 0 the current volume will be used
| textCommand | String | W | echo, echoshow, echospot | Write Only! Execute a text command (like a spoken text)
| lastVoiceCommand | String | R/W | echo, echoshow, echospot | Last voice command spoken to the device. Writing to the channel starts voice output. | lastVoiceCommand | String | R/W | echo, echoshow, echospot | Last voice command spoken to the device. Writing to the channel starts voice output.
| mediaProgress | Dimmer | R/W | echo, echoshow, echospot | Media progress in percent | mediaProgress | Dimmer | R/W | echo, echoshow, echospot | Media progress in percent
| mediaProgressTime | Number:Time | R/W | echo, echoshow, echospot | Media play time | mediaProgressTime | Number:Time | R/W | echo, echoshow, echospot | Media play time
@ -199,7 +201,6 @@ E.g. to read out the history call from an installation on openhab:8080 with an a
http://openhab:8080/amazonechocontrol/account1/PROXY/api/activities?startTime=&size=50&offset=1 http://openhab:8080/amazonechocontrol/account1/PROXY/api/activities?startTime=&size=50&offset=1
### Example ### Example
#### echo.things #### echo.things

View File

@ -76,6 +76,7 @@ public class AmazonEchoControlBindingConstants {
public static final String CHANNEL_AMAZON_MUSIC_PLAY_LIST_ID = "amazonMusicPlayListId"; public static final String CHANNEL_AMAZON_MUSIC_PLAY_LIST_ID = "amazonMusicPlayListId";
public static final String CHANNEL_TEXT_TO_SPEECH = "textToSpeech"; public static final String CHANNEL_TEXT_TO_SPEECH = "textToSpeech";
public static final String CHANNEL_TEXT_TO_SPEECH_VOLUME = "textToSpeechVolume"; public static final String CHANNEL_TEXT_TO_SPEECH_VOLUME = "textToSpeechVolume";
public static final String CHANNEL_TEXT_COMMAND = "textCommand";
public static final String CHANNEL_REMIND = "remind"; public static final String CHANNEL_REMIND = "remind";
public static final String CHANNEL_PLAY_ALARM_SOUND = "playAlarmSound"; public static final String CHANNEL_PLAY_ALARM_SOUND = "playAlarmSound";
public static final String CHANNEL_START_ROUTINE = "startRoutine"; public static final String CHANNEL_START_ROUTINE = "startRoutine";

View File

@ -162,6 +162,8 @@ public class Connection {
private Map<Integer, AnnouncementWrapper> announcements = Collections.synchronizedMap(new LinkedHashMap<>()); private Map<Integer, AnnouncementWrapper> announcements = Collections.synchronizedMap(new LinkedHashMap<>());
private Map<Integer, TextToSpeech> textToSpeeches = Collections.synchronizedMap(new LinkedHashMap<>()); private Map<Integer, TextToSpeech> textToSpeeches = Collections.synchronizedMap(new LinkedHashMap<>());
private Map<Integer, TextCommand> textCommands = Collections.synchronizedMap(new LinkedHashMap<>());
private Map<Integer, Volume> volumes = Collections.synchronizedMap(new LinkedHashMap<>()); private Map<Integer, Volume> volumes = Collections.synchronizedMap(new LinkedHashMap<>());
private Map<String, LinkedBlockingQueue<QueueObject>> devices = Collections.synchronizedMap(new LinkedHashMap<>()); private Map<String, LinkedBlockingQueue<QueueObject>> devices = Collections.synchronizedMap(new LinkedHashMap<>());
@ -172,7 +174,8 @@ public class Connection {
ANNOUNCEMENT, ANNOUNCEMENT,
TTS, TTS,
VOLUME, VOLUME,
DEVICES DEVICES,
TEXT_COMMAND
} }
public Connection(@Nullable Connection oldConnection, Gson gson) { public Connection(@Nullable Connection oldConnection, Gson gson) {
@ -962,6 +965,8 @@ public class Connection {
replaceTimer(TimerType.VOLUME, null); replaceTimer(TimerType.VOLUME, null);
volumes.clear(); volumes.clear();
replaceTimer(TimerType.DEVICES, null); replaceTimer(TimerType.DEVICES, null);
textCommands.clear();
replaceTimer(TimerType.TTS, null);
devices.values().forEach((queueObjects) -> { devices.values().forEach((queueObjects) -> {
queueObjects.forEach((queueObject) -> { queueObjects.forEach((queueObject) -> {
@ -1354,7 +1359,7 @@ public class Connection {
private void sendAnnouncement() { private void sendAnnouncement() {
// we lock new announcements until we have dispatched everything // we lock new announcements until we have dispatched everything
Lock lock = locks.computeIfAbsent(TimerType.ANNOUNCEMENT, k -> new ReentrantLock()); Lock lock = Objects.requireNonNull(locks.computeIfAbsent(TimerType.ANNOUNCEMENT, k -> new ReentrantLock()));
lock.lock(); lock.lock();
try { try {
Iterator<AnnouncementWrapper> iterator = announcements.values().iterator(); Iterator<AnnouncementWrapper> iterator = announcements.values().iterator();
@ -1396,7 +1401,7 @@ public class Connection {
} }
// we lock TTS until we have finished adding this one // we lock TTS until we have finished adding this one
Lock lock = locks.computeIfAbsent(TimerType.TTS, k -> new ReentrantLock()); Lock lock = Objects.requireNonNull(locks.computeIfAbsent(TimerType.TTS, k -> new ReentrantLock()));
lock.lock(); lock.lock();
try { try {
TextToSpeech textToSpeech = Objects TextToSpeech textToSpeech = Objects
@ -1414,7 +1419,7 @@ public class Connection {
private void sendTextToSpeech() { private void sendTextToSpeech() {
// we lock new TTS until we have dispatched everything // we lock new TTS until we have dispatched everything
Lock lock = locks.computeIfAbsent(TimerType.TTS, k -> new ReentrantLock()); Lock lock = Objects.requireNonNull(locks.computeIfAbsent(TimerType.TTS, k -> new ReentrantLock()));
lock.lock(); lock.lock();
try { try {
Iterator<TextToSpeech> iterator = textToSpeeches.values().iterator(); Iterator<TextToSpeech> iterator = textToSpeeches.values().iterator();
@ -1424,8 +1429,7 @@ public class Connection {
List<Device> devices = textToSpeech.devices; List<Device> devices = textToSpeech.devices;
if (!devices.isEmpty()) { if (!devices.isEmpty()) {
String text = textToSpeech.text; String text = textToSpeech.text;
Map<String, Object> parameters = new HashMap<>(); Map<String, Object> parameters = Map.of("textToSpeak", text);
parameters.put("textToSpeak", text);
executeSequenceCommandWithVolume(devices, "Alexa.Speak", parameters, textToSpeech.ttsVolumes, executeSequenceCommandWithVolume(devices, "Alexa.Speak", parameters, textToSpeech.ttsVolumes,
textToSpeech.standardVolumes); textToSpeech.standardVolumes);
} }
@ -1441,9 +1445,60 @@ public class Connection {
} }
} }
public void textCommand(Device device, String text, @Nullable Integer ttsVolume, @Nullable Integer standardVolume) {
if (text.replaceAll("<.+?>", "").replaceAll("\\s+", " ").trim().isEmpty()) {
return;
}
// we lock TextCommands until we have finished adding this one
Lock lock = Objects.requireNonNull(locks.computeIfAbsent(TimerType.TEXT_COMMAND, k -> new ReentrantLock()));
lock.lock();
try {
TextCommand textCommand = Objects
.requireNonNull(textCommands.computeIfAbsent(Objects.hash(text), k -> new TextCommand(text)));
textCommand.devices.add(device);
textCommand.ttsVolumes.add(ttsVolume);
textCommand.standardVolumes.add(standardVolume);
// schedule a TextCommand only if it has not been scheduled before
timers.computeIfAbsent(TimerType.TEXT_COMMAND,
k -> scheduler.schedule(this::sendTextCommand, 500, TimeUnit.MILLISECONDS));
} finally {
lock.unlock();
}
}
private synchronized void sendTextCommand() {
// we lock new TTS until we have dispatched everything
Lock lock = Objects.requireNonNull(locks.computeIfAbsent(TimerType.TEXT_COMMAND, k -> new ReentrantLock()));
lock.lock();
try {
Iterator<TextCommand> iterator = textCommands.values().iterator();
while (iterator.hasNext()) {
TextCommand textCommand = iterator.next();
try {
List<Device> devices = textCommand.devices;
if (!devices.isEmpty()) {
String text = textCommand.text;
Map<String, Object> parameters = Map.of("text", text);
executeSequenceCommandWithVolume(devices, "Alexa.TextCommand", parameters,
textCommand.ttsVolumes, textCommand.standardVolumes);
}
} catch (Exception e) {
logger.warn("send textCommand fails with unexpected error", e);
}
iterator.remove();
}
} finally {
// the timer is done anyway immediately after we unlock
timers.remove(TimerType.TEXT_COMMAND);
lock.unlock();
}
}
public void volume(Device device, int vol) { public void volume(Device device, int vol) {
// we lock volume until we have finished adding this one // we lock volume until we have finished adding this one
Lock lock = locks.computeIfAbsent(TimerType.VOLUME, k -> new ReentrantLock()); Lock lock = Objects.requireNonNull(locks.computeIfAbsent(TimerType.VOLUME, k -> new ReentrantLock()));
lock.lock(); lock.lock();
try { try {
Volume volume = Objects.requireNonNull(volumes.computeIfAbsent(vol, k -> new Volume(vol))); Volume volume = Objects.requireNonNull(volumes.computeIfAbsent(vol, k -> new Volume(vol)));
@ -1459,7 +1514,7 @@ public class Connection {
private void sendVolume() { private void sendVolume() {
// we lock new volume until we have dispatched everything // we lock new volume until we have dispatched everything
Lock lock = locks.computeIfAbsent(TimerType.VOLUME, k -> new ReentrantLock()); Lock lock = Objects.requireNonNull(locks.computeIfAbsent(TimerType.VOLUME, k -> new ReentrantLock()));
lock.lock(); lock.lock();
try { try {
Iterator<Volume> iterator = volumes.values().iterator(); Iterator<Volume> iterator = volumes.values().iterator();
@ -1504,7 +1559,7 @@ public class Connection {
if (command != null && !parameters.isEmpty()) { if (command != null && !parameters.isEmpty()) {
JsonArray commandNodesToExecute = new JsonArray(); JsonArray commandNodesToExecute = new JsonArray();
if ("Alexa.Speak".equals(command)) { if ("Alexa.Speak".equals(command) || "Alexa.TextCommand".equals(command)) {
for (Device device : devices) { for (Device device : devices) {
commandNodesToExecute.add(createExecutionNode(device, command, parameters)); commandNodesToExecute.add(createExecutionNode(device, command, parameters));
} }
@ -1565,7 +1620,7 @@ public class Connection {
} }
private void handleExecuteSequenceNode() { private void handleExecuteSequenceNode() {
Lock lock = locks.computeIfAbsent(TimerType.DEVICES, k -> new ReentrantLock()); Lock lock = Objects.requireNonNull(locks.computeIfAbsent(TimerType.DEVICES, k -> new ReentrantLock()));
if (lock.tryLock()) { if (lock.tryLock()) {
try { try {
for (String serialNumber : devices.keySet()) { for (String serialNumber : devices.keySet()) {
@ -1707,6 +1762,9 @@ public class Connection {
JsonObject nodeToExecute = new JsonObject(); JsonObject nodeToExecute = new JsonObject();
nodeToExecute.addProperty("@type", "com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode"); nodeToExecute.addProperty("@type", "com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode");
nodeToExecute.addProperty("type", command); nodeToExecute.addProperty("type", command);
if ("Alexa.TextCommand".equals(command)) {
nodeToExecute.addProperty("skillId", "amzn1.ask.1p.tellalexa");
}
nodeToExecute.add("operationPayload", operationPayload); nodeToExecute.add("operationPayload", operationPayload);
return nodeToExecute; return nodeToExecute;
} }
@ -2047,6 +2105,17 @@ public class Connection {
} }
} }
private static class TextCommand {
public List<Device> devices = new ArrayList<>();
public String text;
public List<@Nullable Integer> ttsVolumes = new ArrayList<>();
public List<@Nullable Integer> standardVolumes = new ArrayList<>();
public TextCommand(String text) {
this.text = text;
}
}
private static class Volume { private static class Volume {
public List<Device> devices = new ArrayList<>(); public List<Device> devices = new ArrayList<>();
public int volume; public int volume;

View File

@ -743,11 +743,6 @@ public class AccountHandler extends BaseBridgeHandler implements IWebSocketComma
switch (command) { switch (command) {
case "PUSH_ACTIVITY": case "PUSH_ACTIVITY":
handlePushActivity(pushCommand.payload); handlePushActivity(pushCommand.payload);
if (refreshDataDelayed != null) {
refreshDataDelayed.cancel(false);
}
this.refreshAfterCommandJob = scheduler.schedule(this::refreshAfterCommand, 700,
TimeUnit.MILLISECONDS);
break; break;
case "PUSH_DOPPLER_CONNECTION_CHANGE": case "PUSH_DOPPLER_CONNECTION_CHANGE":
case "PUSH_BLUETOOTH_STATE_CHANGE": case "PUSH_BLUETOOTH_STATE_CHANGE":

View File

@ -114,6 +114,7 @@ public class EchoHandler extends BaseThingHandler implements IEchoThingHandler {
private boolean disableUpdate = false; private boolean disableUpdate = false;
private boolean updateRemind = true; private boolean updateRemind = true;
private boolean updateTextToSpeech = true; private boolean updateTextToSpeech = true;
private boolean updateTextCommand = true;
private boolean updateAlarm = true; private boolean updateAlarm = true;
private boolean updateRoutine = true; private boolean updateRoutine = true;
private boolean updatePlayMusicVoiceCommand = true; private boolean updatePlayMusicVoiceCommand = true;
@ -589,6 +590,16 @@ public class EchoHandler extends BaseThingHandler implements IEchoThingHandler {
} }
this.updateState(channelId, new PercentType(textToSpeechVolume)); this.updateState(channelId, new PercentType(textToSpeechVolume));
} }
if (channelId.equals(CHANNEL_TEXT_COMMAND)) {
if (command instanceof StringType) {
String text = command.toFullString();
if (!text.isEmpty()) {
waitForUpdate = 1000;
updateTextCommand = true;
startTextCommand(connection, device, text);
}
}
}
if (channelId.equals(CHANNEL_LAST_VOICE_COMMAND)) { if (channelId.equals(CHANNEL_LAST_VOICE_COMMAND)) {
if (command instanceof StringType) { if (command instanceof StringType) {
String text = command.toFullString(); String text = command.toFullString();
@ -713,6 +724,15 @@ public class EchoHandler extends BaseThingHandler implements IEchoThingHandler {
connection.textToSpeech(device, text, volume, lastKnownVolume); connection.textToSpeech(device, text, volume, lastKnownVolume);
} }
private void startTextCommand(Connection connection, Device device, String text)
throws IOException, URISyntaxException {
Integer volume = null;
if (textToSpeechVolume != 0) {
volume = textToSpeechVolume;
}
connection.textCommand(device, text, volume, lastKnownVolume);
}
@Override @Override
public void startAnnouncement(Device device, String speak, String bodyText, @Nullable String title, public void startAnnouncement(Device device, String speak, String bodyText, @Nullable String title,
@Nullable Integer volume) throws IOException, URISyntaxException { @Nullable Integer volume) throws IOException, URISyntaxException {
@ -770,11 +790,11 @@ public class EchoHandler extends BaseThingHandler implements IEchoThingHandler {
String type = currentNotification.type; String type = currentNotification.type;
if (type != null) { if (type != null) {
if (type.equals("Reminder")) { if (type.equals("Reminder")) {
updateState(CHANNEL_REMIND, new StringType("")); updateState(CHANNEL_REMIND, StringType.EMPTY);
updateRemind = false; updateRemind = false;
} }
if (type.equals("Alarm")) { if (type.equals("Alarm")) {
updateState(CHANNEL_PLAY_ALARM_SOUND, new StringType("")); updateState(CHANNEL_PLAY_ALARM_SOUND, StringType.EMPTY);
updateAlarm = false; updateAlarm = false;
} }
} }
@ -919,7 +939,7 @@ public class EchoHandler extends BaseThingHandler implements IEchoThingHandler {
} }
} catch (HttpException e) { } catch (HttpException e) {
if (e.getCode() == 400) { if (e.getCode() == 400) {
updateState(CHANNEL_RADIO_STATION_ID, new StringType("")); updateState(CHANNEL_RADIO_STATION_ID, StringType.EMPTY);
} else { } else {
logger.info("getMediaState fails", e); logger.info("getMediaState fails", e);
} }
@ -1069,27 +1089,31 @@ public class EchoHandler extends BaseThingHandler implements IEchoThingHandler {
// Update states // Update states
if (updateRemind && currentNotifcationUpdateTimer == null) { if (updateRemind && currentNotifcationUpdateTimer == null) {
updateRemind = false; updateRemind = false;
updateState(CHANNEL_REMIND, new StringType("")); updateState(CHANNEL_REMIND, StringType.EMPTY);
} }
if (updateAlarm && currentNotifcationUpdateTimer == null) { if (updateAlarm && currentNotifcationUpdateTimer == null) {
updateAlarm = false; updateAlarm = false;
updateState(CHANNEL_PLAY_ALARM_SOUND, new StringType("")); updateState(CHANNEL_PLAY_ALARM_SOUND, StringType.EMPTY);
} }
if (updateRoutine) { if (updateRoutine) {
updateRoutine = false; updateRoutine = false;
updateState(CHANNEL_START_ROUTINE, new StringType("")); updateState(CHANNEL_START_ROUTINE, StringType.EMPTY);
} }
if (updateTextToSpeech) { if (updateTextToSpeech) {
updateTextToSpeech = false; updateTextToSpeech = false;
updateState(CHANNEL_TEXT_TO_SPEECH, new StringType("")); updateState(CHANNEL_TEXT_TO_SPEECH, StringType.EMPTY);
}
if (updateTextCommand) {
updateTextCommand = false;
updateState(CHANNEL_TEXT_COMMAND, StringType.EMPTY);
} }
if (updatePlayMusicVoiceCommand) { if (updatePlayMusicVoiceCommand) {
updatePlayMusicVoiceCommand = false; updatePlayMusicVoiceCommand = false;
updateState(CHANNEL_PLAY_MUSIC_VOICE_COMMAND, new StringType("")); updateState(CHANNEL_PLAY_MUSIC_VOICE_COMMAND, StringType.EMPTY);
} }
if (updateStartCommand) { if (updateStartCommand) {
updateStartCommand = false; updateStartCommand = false;
updateState(CHANNEL_START_COMMAND, new StringType("")); updateState(CHANNEL_START_COMMAND, StringType.EMPTY);
} }
updateState(CHANNEL_MUSIC_PROVIDER_ID, new StringType(musicProviderId)); updateState(CHANNEL_MUSIC_PROVIDER_ID, new StringType(musicProviderId));
@ -1225,7 +1249,7 @@ public class EchoHandler extends BaseThingHandler implements IEchoThingHandler {
} }
if (lastSpokenText.isEmpty() || lastSpokenText.equals(spokenText)) { if (lastSpokenText.isEmpty() || lastSpokenText.equals(spokenText)) {
updateState(CHANNEL_LAST_VOICE_COMMAND, new StringType("")); updateState(CHANNEL_LAST_VOICE_COMMAND, StringType.EMPTY);
} }
lastSpokenText = spokenText; lastSpokenText = spokenText;
updateState(CHANNEL_LAST_VOICE_COMMAND, new StringType(spokenText)); updateState(CHANNEL_LAST_VOICE_COMMAND, new StringType(spokenText));

View File

@ -88,6 +88,9 @@ channel-type.amazonechocontrol.textToSpeech.description = Spricht den Text (Nur
channel-type.amazonechocontrol.textToSpeechVolume.label = Sprich Lautstärke channel-type.amazonechocontrol.textToSpeechVolume.label = Sprich Lautstärke
channel-type.amazonechocontrol.textToSpeechVolume.description = Lautstärke des Sprich Kanals. Wenn 0 wird die aktuelle Lautstärke verwendet. channel-type.amazonechocontrol.textToSpeechVolume.description = Lautstärke des Sprich Kanals. Wenn 0 wird die aktuelle Lautstärke verwendet.
channel-type.amazonechocontrol.textCommand.label = Befehl
channel-type.amazonechocontrol.textCommand.description = Führt einen Befehl aus (Nur schreiben). Der Befehl wird wie ein gesprochener Befehl ausgeführt.
channel-type.amazonechocontrol.lastVoiceCommand.label = Letzter Sprachbefehl channel-type.amazonechocontrol.lastVoiceCommand.label = Letzter Sprachbefehl
channel-type.amazonechocontrol.lastVoiceCommand.description = Befehl der zum Gerät gesprochen wurde. Schreiben zum Kanal started die Sprachausgabe. channel-type.amazonechocontrol.lastVoiceCommand.description = Befehl der zum Gerät gesprochen wurde. Schreiben zum Kanal started die Sprachausgabe.

View File

@ -73,6 +73,7 @@
<channel id="announcement" typeId="announcement"/> <channel id="announcement" typeId="announcement"/>
<channel id="textToSpeech" typeId="textToSpeech"/> <channel id="textToSpeech" typeId="textToSpeech"/>
<channel id="textToSpeechVolume" typeId="textToSpeechVolume"/> <channel id="textToSpeechVolume" typeId="textToSpeechVolume"/>
<channel id="textCommand" typeId="textCommand"/>
<channel id="remind" typeId="remind"/> <channel id="remind" typeId="remind"/>
<channel id="nextReminder" typeId="nextReminder"/> <channel id="nextReminder" typeId="nextReminder"/>
<channel id="playAlarmSound" typeId="playAlarmSound"/> <channel id="playAlarmSound" typeId="playAlarmSound"/>
@ -127,6 +128,7 @@
<channel id="announcement" typeId="announcement"/> <channel id="announcement" typeId="announcement"/>
<channel id="textToSpeech" typeId="textToSpeech"/> <channel id="textToSpeech" typeId="textToSpeech"/>
<channel id="textToSpeechVolume" typeId="textToSpeechVolume"/> <channel id="textToSpeechVolume" typeId="textToSpeechVolume"/>
<channel id="textCommand" typeId="textCommand"/>
<channel id="remind" typeId="remind"/> <channel id="remind" typeId="remind"/>
<channel id="nextReminder" typeId="nextReminder"/> <channel id="nextReminder" typeId="nextReminder"/>
<channel id="playAlarmSound" typeId="playAlarmSound"/> <channel id="playAlarmSound" typeId="playAlarmSound"/>
@ -181,6 +183,7 @@
<channel id="announcement" typeId="announcement"/> <channel id="announcement" typeId="announcement"/>
<channel id="textToSpeech" typeId="textToSpeech"/> <channel id="textToSpeech" typeId="textToSpeech"/>
<channel id="textToSpeechVolume" typeId="textToSpeechVolume"/> <channel id="textToSpeechVolume" typeId="textToSpeechVolume"/>
<channel id="textCommand" typeId="textCommand"/>
<channel id="remind" typeId="remind"/> <channel id="remind" typeId="remind"/>
<channel id="nextReminder" typeId="nextReminder"/> <channel id="nextReminder" typeId="nextReminder"/>
<channel id="playAlarmSound" typeId="playAlarmSound"/> <channel id="playAlarmSound" typeId="playAlarmSound"/>
@ -452,6 +455,11 @@
<label>Speak Volume</label> <label>Speak Volume</label>
<description>Volume of the Speak channel. If 0, the current volume will be used.</description> <description>Volume of the Speak channel. If 0, the current volume will be used.</description>
</channel-type> </channel-type>
<channel-type id="textCommand" advanced="true">
<item-type>String</item-type>
<label>TextCommand</label>
<description>Run a command (Write only). The command can run like a spoken command.</description>
</channel-type>
<channel-type id="lastVoiceCommand" advanced="true"> <channel-type id="lastVoiceCommand" advanced="true">
<item-type>String</item-type> <item-type>String</item-type>
<label>Last Voice Command</label> <label>Last Voice Command</label>