Release Candidate and Support: Amazon Echo Control Binding

A while ago I had success using another browser … clearing the browsers cache should do the same.

Already tried that, even from multiple devices. As the error message states a 500 this clearly points towards Jetty itself but I have no clue how to further debug :frowning:

After a reboot yesterday, I’m back to getting the error too.

Ahhhh… I see. I was hoping there was a way to silently send Alexa a command and have it respond as If I had actually said that. Just as an example, if I could send the string “what time is it” and when that executed, it would just verbally say “the time is…” but no luck there. Is there any way to do something like this today with the current Binding state?

This error is solved by
sudo systemctl stop openhab2.service

rm -rf /var/lib/openhab2/cache/*

rm -rf /var/lib/openhab2/tmp/*

sudo systemctl start openhab2.service

then http://:8080/amazonechocontrol/account1 - Re-login

Now it is working no error since last 24 hrs

But now when I select Amazon Music Playlist Id to Play play list defined in my amazon music library it gives following error

[nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.amazonechocontrol.handler.EchoHandler@cc934d’: POST url ‘https://alexa.amazon.in/api/cloudplayer/queue-and-play?deviceSerialNumber=&deviceType=&mediaOwnerCustomerId=&shuffle=false’ failed: Bad Request

Not sure how to correct this ?

Strange: TTS stopped working:
I bought one of Alexa’s “sisters”, an Onkyo P3 speaker. This one replaced an Echo 1st gen.

While e.g. Remind-function works, TTS does not work any more with this specific device. It works with others (echos) though. The log shows normal activity as it does with the echos when a TTS command is sent. I checked configuration in Paper UI, .things file and rules.

The only difference I see for this device compared to my other echos is the length of the serial number. It has 32 characters instead of 16 for the echos.

Any known problems with “sister devices”?

(Running OH 2.3 with the official Amazon Echo Control 2.3 binding)

Hello there,
I am impressed of this binding. It is really awesome. Downside is the communication between openhab server to alexa server. It slows down the commands. Does anybody know the reason why it is not supported by amazon for direct communication to the echo device?

Further to that I have a programming problem. I have the air quality value in my town. I check the value every hour and want to send a TTS command to alexa. Two values, number ‘quality index’ and string ‘air quality description’.

items:
Number AQI_No_Inside “Air Quality” (Living Room) {channel=“airquality:aqi:local:aqiLevel”}
String AQI_Description “Air Description” (Living Room) {channel=“airquality:aqi:local:aqiDescription”}
… ECHO items

Rule:
How should the command look like? It does not accept the string for example:
Echo_Living_Room_TTS.sendCommand(AQI_Description)

How does the command look like to let Alexa tell me the value of AQI_No_Inside_

Thanks in advance.
Regards

AQI_No_Inside.state.toString

Still no luck for me. Still server error.

Same thing is happening to me. Since this morning I’m getting this message every minute

2018-06-18 14:15:27.430 [INFO ] [mazonechocontrol.internal.Connection] - Login failed: Login fails. Check your credentials and try to login with your webbrowser to http(s)://<youropenhab:yourport>/amazonechocontrol/bc5a158d
Important Message! To better protect your account, please re-enter your password and then enter the characters as they are shown in the image below.

If I go to http(s)://youropenhab:yourport/amazonechocontrol/bc5a158d and click on the link, I get the amazon page asking for my password and a Captcha. If I fill the password and the captcha, it goes back to OH but it says “wrong password”.

Any clue??

1 Like

I think it’s not the same thing as I don’t even see the login mask of Amazon but getting Server Error right away.

I’ve been digging a littlebit more and its even more extrange. The connection is flapping form online-offline.online.

I’ve changed account numbers and serials with some xxx. Don’t know if it’s relevant information, but just in case… (By the way, I have two echos connected to OH)

2018-06-17 04:09:27.401 [hingStatusInfoChangedEvent] - 'amazonechocontrol:echo:bc5xxxxx:90F007186XXXXXX' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2018-06-17 04:09:28.330 [hingStatusInfoChangedEvent] - 'amazonechocontrol:echo:bc5xxxxx:G090LF0964xxxxxxx' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2018-06-17 04:09:30.015 [hingStatusInfoChangedEvent] - 'amazonechocontrol:account:bc5xxxxx' changed from OFFLINE (CONFIGURATION_ERROR): Login fails. Check your credentials and try to login with your webbrowser to http(s)://<youropenhab:yourport>/amazonechocontrol/bc5xxxxx

Important Message! To better protect your account, please re-enter your password and then enter the characters as they are shown in the image below. to ONLINE

2018-06-17 04:09:30.017 [hingStatusInfoChangedEvent] - 'amazonechocontrol:flashbriefingprofile:bc5xxxxx:1' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2018-06-17 04:09:37.915 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:3fd2e501:node7' has been updated.
2018-06-17 04:10:06.317 [hingStatusInfoChangedEvent] - 'amazonechocontrol:account:bc5xxxxx' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR): Login fails. Check your credentials and try to login with your webbrowser to http(s)://<youropenhab:yourport>/amazonechocontrol/bc5xxxxx

Important Message! To better protect your account, please re-enter your password and then enter the characters as they are shown in the image below.

2018-06-17 04:10:06.320 [hingStatusInfoChangedEvent] - 'amazonechocontrol:echo:bc5xxxxx:90F007186XXXXXX' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2018-06-17 04:10:06.324 [hingStatusInfoChangedEvent] - 'amazonechocontrol:flashbriefingprofile:bc5xxxxx:1' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2018-06-17 04:10:06.327 [hingStatusInfoChangedEvent] - 'amazonechocontrol:echo:bc5xxxxx:G090LF0964xxxxxxx' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2018-06-17 04:10:35.802 [hingStatusInfoChangedEvent] - 'amazonechocontrol:echo:bc5xxxxx:90F007186XXXXXX' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2018-06-17 04:10:36.539 [hingStatusInfoChangedEvent] - 'amazonechocontrol:echo:bc5xxxxx:G090LF0964xxxxxxx' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2018-06-17 04:10:38.480 [hingStatusInfoChangedEvent] - 'amazonechocontrol:account:bc5xxxxx' changed from OFFLINE (CONFIGURATION_ERROR): Login fails. Check your credentials and try to login with your webbrowser to http(s)://<youropenhab:yourport>/amazonechocontrol/bc5xxxxx

Important Message! To better protect your account, please re-enter your password and then enter the characters as they are shown in the image below. to ONLINE

2018-06-17 04:10:38.485 [hingStatusInfoChangedEvent] - 'amazonechocontrol:flashbriefingprofile:bc5xxxxx:1' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2018-06-17 04:11:10.026 [hingStatusInfoChangedEvent] - 'amazonechocontrol:account:bc5xxxxx' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR): Login fails. Check your credentials and try to login with your webbrowser to http(s)://<youropenhab:yourport>/amazonechocontrol/bc5xxxxx

Important Message! To better protect your account, please re-enter your password and then enter the characters as they are shown in the image below.

2018-06-17 04:11:10.058 [hingStatusInfoChangedEvent] - 'amazonechocontrol:flashbriefingprofile:bc5xxxxx:1' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2018-06-17 04:11:10.062 [hingStatusInfoChangedEvent] - 'amazonechocontrol:echo:bc5xxxxx:G090LF0964xxxxxxx' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2018-06-17 04:11:10.066 [hingStatusInfoChangedEvent] - 'amazonechocontrol:echo:bc5xxxxx:90F007186XXXXXX' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2018-06-17 04:11:11.608 [hingStatusInfoChangedEvent] - 'amazonechocontrol:echo:bc5xxxxx:90F007186XXXXXX' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2018-06-17 04:11:12.356 [hingStatusInfoChangedEvent] - 'amazonechocontrol:echo:bc5xxxxx:G090LF0964xxxxxxx' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2018-06-17 04:11:14.153 [hingStatusInfoChangedEvent] - 'amazonechocontrol:account:bc5xxxxx' changed from OFFLINE (CONFIGURATION_ERROR): Login fails. Check your credentials and try to login with your webbrowser to http(s)://<youropenhab:yourport>/amazonechocontrol/bc5xxxxx

Important Message! To better protect your account, please re-enter your password and then enter the characters as they are shown in the image below. to ONLINE

2018-06-17 04:11:14.158 [hingStatusInfoChangedEvent] - 'amazonechocontrol:flashbriefingprofile:bc5xxxxx:1' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2018-06-17 04:12:13.578 [hingStatusInfoChangedEvent] - 'amazonechocontrol:account:bc5xxxxx' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR): Login fails. Check your credentials and try to login with your webbrowser to http(s

is this working in Australia / New Zealand?
I have the binding installed and the amazon account thing online but our echo and our dot are both showing as online, any ideas?

In India it is working partly in India .
For Playlist giving following error :
2018-06-18 23:08:09.429 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.amazonechocontrol.handler.EchoHandler@1647cf4’: POST url ‘https://alexa.amazon.in/api/cloudplayer/queue-and-play?deviceSerialNumber=&deviceType=A7WXQPH584YP&mediaOwnerCustomerId=&shuffle=false’ failed: Bad Request

Hi all,
I have tried searching this very long thread to see if I can find the answer to my problem but it has become too long to be useful for this task.

I upgraded from previous versions of the binding to the latest 2.3 stable release and redid all my things, items and sitemap to accommodate the changes.
I am slowly working my way through each of the many exciting features and understanding how they work and what I can use them for, most excellent add-on!

I do have one issue that is troubling me and I am not sure how to solve.
I have five echo devices and only one of them has this issue.

I see this log entry sometimes multiple times per minute, any ideas?

2018-06-19 08:39:46.068 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 70 to 48

2018-06-19 08:39:50.490 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 48 to 70

2018-06-19 08:39:54.603 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 70 to 48

2018-06-19 08:39:56.620 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 48 to 70

2018-06-19 08:41:00.861 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 70 to 48

2018-06-19 08:41:05.200 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 48 to 70

2018-06-19 08:41:08.761 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 70 to 48

2018-06-19 08:41:10.903 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 48 to 70

2018-06-19 08:42:15.954 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 70 to 48

2018-06-19 08:42:23.169 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 48 to 70

2018-06-19 08:42:29.131 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 70 to 48

2018-06-19 08:42:31.380 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 48 to 70

Thanks

Paul

Hello,

Alexa just arrived in France so I just found the interest of this binding. Nice job. It will be useful to control volume level of groups of Echo, which cannot be achieved from Amazon UI.

Any chance that a command is implemented to mute the mic from OpenHAB?

Hi Paul,

check the rules again for that BR3_Echo_Volume.

Regards
Cadbures

Hi everybody,
sorry, but I’am really very busy.
I have tried now to answer all question which are belongs to the binding itself. I hope this helps to clarify some problems.

Unfortunately there seems to be to bugs: one is in the OH2.3 released runtime and the other seems to be in the binding itself. Please, read my answer below for more information.

Yes, it works with 2.4 snapshots.

This is very interesting, because there should really not request to amazon before you have created an account. Are you sure that you run the released version, because on off the beta versions have used the discovery service as global service without an account?

You should try to make the login through the OH installation with the binding url http(s)://:/amazonechocontrol

and

There is a very bad news for all users of windows installation of OH. The release of OH2.3 has a bug in the state storage so that it tries to create a filename with ‚:‘. This does not work in windows and the saving of state will fail.

What does this mean for the user of the binding?

  1. The binding is not able to store the session data. This will have an effect if you restart OH because a new login must be done. If you restart OH multiple times, amazon will request a captcha to enter, so you have to do the manual login.
  2. The flashbriefing device will not work anymore after a restart

Currently there is no solution for the OH2.3 release. But I think the bug is already fixed in OH2.4 daily build (https://github.com/eclipse/smarthome/pull/5698). But I have not checked this yet. Maybe a OH2.4 snapshot user can give me a feedback.

Maybe the indian domain does not support playing of music through the amazon routine. I expect, that this feature is not yet deployed. Please check in the alexa app in the routine section, if there is an „Music“ action available. Would be nice to get a feedback here.

No official, but the alexa web page opens an MQTT connection over an websocket a get information about the alexa state. The web application refresh after this event the page content, that’s the reason why you can see new played music or voice commands in the alexa webpage immediately.

No, this is not possible.

Your log is to short to see which command causes the problem. But maybe it is the same problem which I have described above for the play music command in the .in domain. Please check the routine section in the alexa app if there is an music option

No, because I can only use the API of the webpage.

Ups, this seems to be a bug in the binding. Currently I have no time to check this, but I will do this as soon as possible. It seems that somewhere a connection is not replace after a session renew. Thats really bad…

Maybe the old used connection (see my comment above) causes that amazon request the captcha… That’s bad…

No, maybe its the same problem from above

and

Please turn on debug level for the binding. Maybe I can find out what is going wrong.

Thats interesting, what domain does you use in the alexa web page?

Could be true, both operation reinitialize the account thing.

Of course, one possibility would be to provide an REST-API in the Servlet of the binding. In this, the connection is available and it should be easy to read out the needed information from the amazon server. Just log the request of the Alexa Web Page and add a new method to the Connection class for it. Then you can use this method in the servlet to provide the information.

No, only the voice commands which starts an routine of the alexa app will work.

There is no browser used in the binding, so I don’t think that clearing the browser cache will do something with the binding.

Can you check if you have the reminder feature in the web application of alexa and if it works?

Have you activated 2 factor authentication? Otherwise I have no idea.

You have to do the manual login again. But maybe you need also an openHAB restart because there seems to be a bug in the connection handle. See my comments above.

I expect you mean that the dots are offline. Please use the same url which is used for the manual login and navigate to the account page. If you see here the echo as offline, then it is definitely no bug in the binding because the dots are reported as offline from the amazon server. Maybe you can try a different domain, eg. amazon.com

Yes, the India server seems to have an different or older software version.

Do you have rules defined?

Only if amazon add this feature to the alexa app

I hope I have not overlook any questions. If so, please give me a hint.

I’m only using snapshots. I’ll see if I can recreate this one. However, I get the No session ID received error and a 500 from http://openhab:8080/amazonechocontrol/. It went away once after waiting about 5 hours, but came back after a restart.

Could you please clarify if step 3b needs to be done from the OH server? I’m currently running headless and get the same 500 error when I try from my laptop.

@cadburesI have checked the rules with grep and there is only two rules tjhat have ‘_Volume’ and neither is for BR3_Echo_Volume. And in each case it was a sendCommand to make a device bneep not as a trigger condition.

any other ideas? what’s the karaf command to debug this addon? Perhaps debug will shed further light.

Thanks
Pau