Release Candidate and Support: Amazon Echo Control Binding

No, not at the moment. I’am not sure if I should create a own channel for this. So I see 3 possibilities:

  1. Using the volume channel from TTS
  2. Adding a volume property to the JSON format syntax of the channel
  3. Own volume channel

You and all other users are welcome to discuss this!

This never worked for me.
I can change the TTS Volume channel to 100 and the Echo still uses the global volume :frowning:

Thank you for the quick answer.
Will you add a changelog again in future ?

I would like to try to do it with REST calls, could you give me some kind of example how it would work?
If I manage to realize the timer thing, then my amazon control setup would be complete.

Thanks for all the work you put into this, I use this binding daily for a lot of different usecases.

Michi gave it the thumbs up so here it is. Hope its useful…

3 Likes

I can confirm this behavior, but I figured out that the announcements typically uses the system volume (for music and so on).

I think it would be iseful if the volume can be defined in the message itself (json). So in this case it would not be necessary to define a own channel. And if somebody wants to control the volume using the gui he can use a dimmer item for example.

What do you think?

I do use the volume channel, without tts

That would be great and i think iobroker already does it this way.

I´m currently struggling to send TTS messages with different volumes and resetting the volume to the “normal” level afterwards.
Sometimes the two commands (volume + tts) are already enough for the Amazon servers to only do one of them.

From the iobroker Alexa Git:

Detailed information Speak: Type in here what you want Alexa to say. You can also adjust the volume of Alexa by giving a percentage before your text. Example: 10;Alexa is saying Alexa with 10% volume, while 100;Alexa is 100% volume. Normally you only can send 250 characters per speak command. By using the semicolon it is possible to write as much as you want, as long as you separate 250 characters with a semicolon. Alexa will then speak the text after each other with a small break. You also can use the volume together with more 255 blocks by writing #Volume;#Block1;#Block2, a.s.o A volume set here will be used over a defined speak-volume.

Kind regards

You should use the textToSpeechVolume channel instead of volume, then the tts setting and resetting is done automatically in one call to the sever

Could you please further explain that?
What do i need to do to achieve this?

When using TTS_Volume and TTS afterwards it´s still using the global volume.
I can´t find any explanation how to use the TTS_Volume correctly.

Example:

echoArbeit_TTSVolume.sendCommand(100)
echoArbeit_TTS.sendCommand('Test')

Hi, good news, the forum has a history function and so I got back my change log.
I have added it on the end of the top most posting in the Version History section.
Best,
Michael

1 Like

I checked it out, it works as expected! This is great work. There only was one plug left i did not have the motiviation to flash it yet. And it works fine. This is great news for beginners or people who are less in tinkering. love it.

Thats true for tts only, but not for announcements.

But if you have more alexas, you have to catch the current volume for each of them and after the announcement you have to put it back.

So, I still like the idea of changing the volume tomporary using a json parameter :wink:

As promised… Here is the code I am using

I have a choice of two styles of announcement. 1 Mode for user changes. 2 Status for automated announcements.

In some rule somewhere when I want an announcement…

Example of mode announcement. Snow mode…(Sets up monitoring of freezing conditions for downspout heaters… in case anyone was wondering Snow mode huh?)

AlexaModeAnnouncement.postUpdate('<speak> Snow mode is set </speak>')
rule 'Alexa group TTS broadcast. Mode change with attention tone'
when 
  Item AlexaModeAnnouncement changed
then
if (AlarmArmed_Sensor.state==OFF && now.getHourOfDay >= 05 && now.getHourOfDay <= 23){
  //start atention tone
  gAlexaAttentionTone.sendCommand('system_alerts_melodic_07')
  //end atention tone
  Thread::sleep(8200)
  gAlexaAttentionTone.sendCommand('')
  Thread::sleep(1000)
  gAlexaTTS.sendCommand(AlexaModeAnnouncement.state.toString)
  logInfo("Alexa" , 'Mode announcement:  '+ AlexaModeAnnouncement.state.toString)
}
end

rule 'Echo group TTS broadcast. Status change with attention tone'
when 
  Item AlexaStatusAnnouncement received update
then
if (AlarmArmed_Sensor.state==OFF && now.getHourOfDay >= 05 && now.getHourOfDay <= 23){
  //start attention tone
  gAlexaAttentionTone.sendCommand('system_alerts_soothing_01')
  //end atention tone
  Thread::sleep(8200)
  gAlexaAttentionTone.sendCommand('')
  Thread::sleep(1000)
  gAlexaTTS.sendCommand(AlexaStatusAnnouncement.state.toString)
  logInfo("Alexa" , 'Status announcement:  '+ AlexaStatusAnnouncement.state.toString)
}
end

I only set the volume on startup

rule "On restart"
when 
    System started
then
    Thread::sleep(10000)
    Echo_TTSVolume.sendCommand(40)
    Echo_NotificationVolume.sendCommand(40)
    EchoDot_TTSVolume.sendCommand(80)
    EchoDot_NotificationVolume.sendCommand(80)
    EchoShow_TTSVolume.sendCommand(30)
    EchoShow_NotificationVolume.sendCommand(30)
    logInfo("Startup" , "Startup time = " + now.toString("HH:mm dd-MM-yyyy"))
end

I haven’t found option to check if a flash briefing is currently running. Did I overlook something?

My vote; consistent then.

Best, Jay

Is it possible to add the newest release to OH 2.3?
I get this…
2019-09-17 15:05:19.230 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-binding-amazonechocontrol’: Error restarting bundles:
Could not resolve module: org.openhab.binding.amazonechocontrol [236]
Another singleton bundle selected: osgi.identity; osgi.identity=“org.openhab.binding.amazonechocontrol”; type=“osgi.bundle”; version:Version=“2.5.0.RC_3”; singleton:=“true”

Hi!

I am using alexa groups in the app and wonder if it is possible to do this with this binding instead.
I have 6 Echos. Is it possible to identify which one triggered?
I am thinking about creating a light switch item that gets triggered when i say „lights off“ and then a switch case or if statement to switch lights off in the room where alexa triggered.

It’s working now with OH 2.5 M3! :slight_smile:

is there any way to make my echo speak using URL’s so i can work it into bash scripts easily

Hi,

I have the binding configured and all the controls (TTS,alarms,music etc) are working, but when I try to send a TTS command with SSML tags Alexa just read the tags and the text (even the simplest example does’t work)

<speak> A test command </speak>

My echo device is using portuguese (Brazil) as language. I did tried to change to English US but the read tags thing keep happening. Any advice?