Release Candidate and Support: Amazon Echo Control Binding

This is a pity

Is there a possibility to get the information if someone speaks to alexa.
eg: I say “Alexa” and openhab would trigger a rule because it knows that someone activated alexa.

“Alexa broadcast” uses your voice, “Alexa Announce” TTS’s alexas voice
When can we roll this into the feature set? :grin:

This is not the case for me, both “announce” and “broadcast” use my own voice, can you confirm it works for you?

Here’s the feature description by Amazon.

Is there a function in the Alex Web Site where you can enter the text? If so, it should not be problem. If the feature can only be controlled with your voice, it can not be integrated. But anyway, the feature is not available in Austria yet :wink:

1 Like

Sorry my bad - was a combination of alexa confirmation being different and noisy kids making me sound like alexa - it only repeats what you say as per google home broadcasts

I installed this binding recently and it’s amazing that I can now control my echo via rules :slight_smile:

However, I have two issues (not sure whether the second is already discussed here):

  1. if the login on the amazon website fails for a certain time period, the binding reports a huge number of stack traces into the log files (>50 stacktraces within 10min). If the internet connection is bad, the log files grow rapidly.
    What about the following strategy? In case of a connection failure, the binding could try to reconnect 3 or 5 times and in case of failure, reports a single line in the log file with the info to retry again 5min later?
    This is one of the many (equal) stacktraces:
2018-04-17 04:42:17.908 [INFO ] [mazonechocontrol.internal.Connection] - Login failed:{} 
org.openhab.binding.amazonechocontrol.internal.ConnectionException: Login fails.
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeLogin(Connection.java:422) ~[?:?]
	at org.openhab.binding.amazonechocontrol.handler.AccountHandler.checkLogin(AccountHandler.java:340) ~[?:?]
	at org.openhab.binding.amazonechocontrol.handler.AccountHandler.lambda$0(AccountHandler.java:286) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
  1. The remind command does not work on the device. When I senda command to the remind channel, I only get a reminder on the Alexa app on my phone, but the echo device remains silent. Did I miss anything? Can I manually test this feature on the amazon website somehow?

This worked for me:

item:

String Alexa_WZ_Remind {channel="amazonechocontrol:echo:account1:G090LF0999999YY:remind"}

rule:

Alexa_WZ_Remind.sendCommand("Garage still open")

Find the id (G090LF0999999YY) for the channel in your items definition in the things section of PaperUI.

@sihui thank you for your example. Since I get the reminder in the Alexa app, I assume that my channel configuration is correct. This is why I wonder how to set the reminder manually to make sure that the problem is not the binding?

Sure, got to alexa.amazon.de and set a reminder manually:

Hi Patrick,

have you checked the system clock on the open hab installation? This is a common reason why the reminder does not work.
If you got a notification to the app, I am sure, that the call itself is correct. Maybe you use the wrong serial number and the notification is spoken from an other device? You can check the reminder also in the alexa app. If you start the reminder in openHAB, it will be visible for a short time in the Alexa App.

Would be nice, but currently I do not want spent more time in the development of things which are useless for myself. It is only logged, if the trace configuration is set to INFO level which is not the default.

Regards,
Michael

QUESTION FOR BETATESTER: Is there anyone who have problems with the automatic state update after some days?

In my own installation, I have the problem that the automatic state update (through the polling) stop working after some time. The session is alive, so I can control the echo device from openHAB and than I get the new state, e.g. current played title, but there is no automatic update anymore. It seems the the Scheduler for the background update stops. Is there anyone else who have this problem?

The following information would be nice:

  1. Do you have this problem?
  2. Have you found any hint in the trace for an exception in the binding?
  3. If you are a openHAB developer, maybe you can give me a hint what can stop a scheduler.scheduleWithFixedDelay job? E.g. an unhandled Exception in the task function? Or what happen if a function does not return (deadlock)?

Regards,
Michael

Hey Michi,

The binding is freaking awesome!! I have been looking for something like this for a while. Especially the reminders.

Outstanding work!

There are a couple of things that I am unable to get to work:

  • Playing Spotify lists: Is this supported?
  • Playing in the All Group. I am trying TuneIn. It works very well on indiviadual devices but I am unable to broadcast to the all group.

Thanks again!

Hi,

there exist a beta spotify binding. Google for “Spotify Binding” or “Spotify connect binding” to find it.

or

Create a routine in the alexa app on your smartphone (routines are not supported in the normal web interface). You can start there playing spotify as action. Then you can trigger the routing with my binding by providing the voice command. But the limitation is, that it is not possible to control from openhab which song will be played. So I think it will make only sense for playlist, which can then be startet from openHAB.

or

wait for one of the next versions. I will provide this function in one of the next versions. I will provide this feature in the binding, than can the voice command for the song provided as text in a channel.

Sorry, no idea, it seems to be a problem of the alexa software. For the binding a group is handled in the same way as a single device. But I know that group devices to not support all features. Maybe this is one off them. Maybe you try to create a rule for it, where you trigger all devices.

Regards,
Michael

Hi!

As i added more and more items, i realize how great this binding is.
There is one requirement i think of it:
Transfer the current played title to the Multiroom group independent of source (spotify, tunein). Does anyone have a idea how this could look like?
Are we able to feed the binding with all this information, so a echo can play media without any preprocessed selection via GUI?

Best regards

Hi Michael,

For the moment I have created a routine for Spotify. It works just fine, I just hope I could do shuffle with it! Great work anyway!

What functionalities all supported for the ALL group? I can test them for you.

I don’t know why, but neither my Echo, nor my Dot tell any reminders at all :frowning:
Not even the reminders that are created by voice (which I believe was working last week
)

Thank you for pointing that out. I did not change any loglevel in my openhabian installation, so in my case INFO is the default loglevel. I’ll change that :slight_smile:

Hello!

I’ve noticed that some reminders aren’t triggered (or, at least, not being spoken). Maybe they have some problems, because I have a recurring reminder, and most of the time its triggered, but, on some occasions, it doesn’t get triggered (even though I receive reminder on Alexa Android app).

Best regards,
Davor

Tunein is possible because we get the stationID and we get the information that tuneIn is playing. So it would be possible to read them out in a rule and start them on a other device. The same can be done for spotify, but you must use the spotify connect binding, the alexa web api does not provide a function to start spotify with an song or playlist id.

At least it should be possible by setting the shuffle channel as an extra step in an openHAB rule. But maybe it works with the “voice”-text by adding “shuffle” or “Zufallswiedergabe” in the alexa routine. I have not tried it yet.