Release Candidate and Support: Amazon Echo Control Binding

Beta 3 is finished. See the top most post for more informations

working great but what is “bluetooth ID”?
how can i connect to a special bt device? needs a rule?

edit:
works with rules and bt mac adress:
Echo_Living_Room_BluetoothId.sendCommand(“11:11:11:11:11:11”)

Hi horschte,

Yes, you are right, I think it is the mac address. Amazon named it ‘address’. Maybe using a ‘Selection’ type in the sitemap for the bluethoothId item is simpler than a rule (https://docs.openhab.org/configuration/sitemaps.html#element-type-selection)

Kind regards,
Michael

yes maybe…but i need some rules for my scenario.
only “device-connect” selection isnt enough for me.
it must work automatically with devices and radiostations.
my girlfriend loves mainstream pop-music…and i hate it :nauseated_face::smile:.
so sitemap:
dummy switch (mymusic) with function “connect device” and "play great rock music"
dummy switch (girlfriend-music) with function “connect device” and “play shit mainstream”
:upside_down_face:
thx for your great work @michi

1 Like

Hi, this looks really interesting.

I couldn’t get it to work with my old 2.0 installation, so have updated to 2.3.

When I try to edit the Thing and I enter email and password, I get an error :

Status: OFFLINE - COMMUNICATION_ERROR java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 4 column 1 path $

I’m using a UK account.

Grateful for any help with fixing this.

Could you do a restart of openHAB? I experienced this issue when i used the first beta and a restart solved it.

1 Like

Hi,

I have not tested the binding with the daily 2.3 build. But it runs with the stable 2.2 released version. But I am not sure, if this is your problem, because it is not yet testet with amazon uk, but the exception is not what I aspect in case of login problem. Maybe there is a problem with the thing configuration.

First try:

  • Remove your thing configuration
  • Restart openHAB
  • Open PaperUI
  • The inbox should show you now a discovered Amazon Account
  • Accept this
  • Go to the Thing configuration in the PaperUI
  • Configure here your account which you can use for the login of the alexa web site (Is this https://alexa.amazon.co.uk/ site? Maybe you should also try to use your credentials there, so that we absolutly sure that the are correct.)
  • After accepting the configuration, the device should go online after view seconds.

Please give me feedback what happens.
Regards,
Michael

Hi,

I’ve tried a few restarts, but that’s not helped.

I just followed your suggestions, but still getting the same error.

2018-01-07 15:58:24.495 [hingStatusInfoChangedEvent] - ‘amazonechocontrol:account:account1’ changed from OFFLINE (COMMUNICATION_ERROR): java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 4 column 1 path $ to OFFLINE (COMMUNICATION_ERROR): Login fails.
2018-01-07 15:58:24.761 [hingStatusInfoChangedEvent] - ‘amazonechocontrol:account:account1’ changed from OFFLINE (COMMUNICATION_ERROR): Login fails. to OFFLINE (COMMUNICATION_ERROR): java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 4 column 1 path $

https://alexa.amazon.co.uk/ is the site. Just logged out and back in again to check that I’m using the correct credentials.

Hi,
maybe you have turned on the 2 factor authentifcation in your account? You should find this information in your account unter ‘Sign and Security’ and there in the advanced settings or so, I don’t now how the menus are exactly named in the english version.
And just to be sure, you are entered only the web site part (amazon.co.uk) without alexa in the account thing configruation.

Anyway, I will add more log informations in my next build, so maybe we get more informations which step of the login exactly goes wrong. But this can take a few days…
Regards,
Michael

Just checked, I don’t have two-factor authentication and I’m just selecting amazon.co.uk from the dropdown list.

I’ll have another go when you release the next build.

Thanks for your help.

Hi all!

currently it seem’s that amazon.co.uk accounts doesn’t work with the binding. I’am currently working on this issue, but I don’t know if it could be fixed.
Thank you for your understanding.

Regards,
Michael

Beta 4 is out. Amazon.co.uk accounts and all other should work now! Thanks to tmn103 for beta testing and the feedback which was necessary to provide this feature!

Awesome binding. Tried Beta 4 and having problem on “amazon.com” without 2FA
Will give a shot for next beta.

I suggest to have a channel feature to control Echo Show/ Echo Spot to display a photo which already uploaded on Amazon Prime. Echo spot is ideally to show indicator. Hence users could upload some indictor photo to Prime and have this binding to show up which photo by openhab rules.

13:04:24.563 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘amazonechocontrol:account:8dc413d3’ changed from ONLINE to OFFLINE (CONFIGURATION_PENDING): Wait for login
13:04:41.330 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘amazonechocontrol:account:8dc413d3’ changed from OFFLINE (CONFIGURATION_PENDING): Wait for login to OFFLINE (COMMUNICATI
ON_ERROR): sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection

Unfortunately I have an error message when trying to add the thing via PaperUI
–> ERROR 409: conflict
The OPENHAB.LOG:
2018-01-11 12:01:40.077 [ERROR] [home.core.thing.binding.ThingFactory] - Thing factory (class org.openhab.binding.amazonechocontrol.internal.AmazonEchoControlHandlerFactory) returned null on create thing when it reports to support the thing type (amazonechocontrol:echo).
2018-01-11 12:01:40.078 [WARN ] [g.discovery.internal.PersistentInbox] - Cannot create thing. No binding found that supports creating a thing of type amazonechocontrol:echo.

When adding thing, item and sitemap manually it detected my ECHOS:
Added new thing 'amazonechocontrol:echo:account1: …
2018-01-11 12:00:16.545 [INFO ] [mazonechocontrol.handler.EchoHandler] - Amazon Echo Control Binding initialized

So the binding seems to be installed.

When using the commands in the sitemap I receive “2018-01-11 11:52:17.152 [INFO ] [mazonechocontrol.handler.EchoHandler] - Not Found”

I am using amazon.de!

I hope someone can support me.

Thanks in advance and regards!

I just created things file & items file and changed them prior uploding into OH to the real settings. As next I copied the files and the jar file into OH structure et voila --> started immediately working. :slight_smile:

Regarding feedback:

Does the setup work? Yes, see comments above
Which amazon site does you use for the login? DE
Does all the channels works? Yes
Do you have wishes for new channels (All functions which are readable from the alexa web site should be possible to provide)?
Do you understand german (because than we can communicate in the german)? Yes

Not sure if the microphone could be switched off / on via channel as well? Thinking on scenes such as “Good Night” and Alexa falls asleep or at least turn off the microphone

Thing binding sounds brilliant - will certainly look to test this out tonight :slight_smile:

My main issue with alexa is that there isn’t currently any way to schedule volume control (wife listens to music in the day, then the kids go to bed, then we ask alexa something and get it blurted out at volume 8! :p)

Being able to automate the volume to a lower level using Openhab will be a godsend!

Hi PapaSchlumpf,

Which version open openHAB does you use?

Kind regards,
Michael

Hello Marcus,

unfortunately I do not know how the microphone can turned off. Only functions which are available in the alexa.amazon.de site can be currently supported at the moment. If you find somewhere a script (eg. shellscript) which can do does, give me link and I will a channel for this feature. I would also be happy to have it!

Thanks for testing and feedback,
Best regards, Michael

Hi van.shava,
This is a very strange behavior. It seems the the login request will be redirected to a http-url, while I expect to get https. Can you test for me what you see in the browser as url if you open https://alexa.amazon.com while the login is open and what will be shown after the login?

Thank you for the testing!

I can’t support Echo Show in the moment, because I don’t own one. Can you do this selection of a photo with the alexa app? If yes and if you have a little bit expirence in web-development (so you know the development tool window of your webbrowser) and you are want support me, it would be possible.

Best Regards,
Michael

I seem to get the same.
When I go to https://alexa.amazon.com I get

https://www.amazon.com/ap/signin?showRmrMe=1&openid.return_to=https%3A%2F%2Falexa.amazon.com%2F&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.assoc_handle=amzn_dp_project_dee&openid.mode=checkid_setup&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&

After login it is:

https://alexa.amazon.com/spa/index.html#cards