Released: Openhab2 Amazon Echo Control Binding (controlling alexa from openhab2)

development
binding
alexa
Tags: #<Tag:0x00007fd3162a9db0> #<Tag:0x00007fd3162a9a18> #<Tag:0x00007fd3162a95b8>

(Ben) #648

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.


(Alejandro) #649

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

(Rick) #650

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?


(sujit) #651

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


(Paul Miller) #652

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


(Yann) #653

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?


(Cadbures) #654

Hi Paul,

check the rules again for that BR3_Echo_Volume.

Regards
Cadbures


(Michael Geramb) #655

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.


(Scott Rushworth) #656

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.


(Paul Miller) #657

@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


(Scott Rushworth) #658

log:set DEBUG org.openhab.binding.amazonechocontrol


(Michael Geramb) #659

It can be done from everywhere, the calls to the amazon server are always done from the OH machine


(Michael Geramb) #660

No idea, but maybe this information helps: the channels will be updated in the polling interval and with a 1-5 second delay after receiving a command (all channels are updated, regardless which cannel receives the command. But no idea what could cause changing the value if there is no rule.


(Paul Miller) #661

I had commented out the BR3 Thing row and also the items rows to stop the frequent Volume change notifications.
This was the state when I placed the first post asking for the community assistance. After the I recieved the DEBUG command I then went back and uncommented the Thing entry and then uncommented the .items rows to bring the echo device back into service.

Lo & behold it was quiet!.

I then rebooted the openhab platform and looked to see what would happen at that point, back it came same deal multiple entries in most minutes.
here is the debug but I figure it is not going to help, not sure what DEBUG I should use to close in on the issue. Is there a specific DEBUG that can be used for ‘.ItemStateChangedEvent’ that might indicate what is triggering the change?

2018-06-20 17:33:32.731 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 48 to 43
2018-06-20 17:33:35.128 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/bluetooth?cached=true succeeded
2018-06-20 17:33:35.141 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090P308741307M7&deviceType=A7WXQPH584YP&screenWidth=1440
2018-06-20 17:33:35.481 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090P308741307M7&deviceType=A7WXQPH584YP&screenWidth=1440 succeeded
2018-06-20 17:33:35.486 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090P308741307M7&deviceType=A7WXQPH584YP
2018-06-20 17:33:35.939 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/bluetooth?cached=true
2018-06-20 17:33:37.077 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/bluetooth?cached=true succeeded
2018-06-20 17:33:37.085 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090L90971620LK5&deviceType=A3S5BH2HU6VAYF&screenWidth=1440
2018-06-20 17:33:37.336 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090L90971620LK5&deviceType=A3S5BH2HU6VAYF&screenWidth=1440 succeeded
2018-06-20 17:33:37.340 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090L90971620LK5&deviceType=A3S5BH2HU6VAYF
2018-06-20 17:33:37.591 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090L90971620LK5&deviceType=A3S5BH2HU6VAYF succeeded
2018-06-20 17:33:37.738 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 43 to 48
2018-06-20 17:33:37.809 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/bluetooth?cached=true
2018-06-20 17:33:38.547 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/bluetooth?cached=true succeeded
2018-06-20 17:33:38.555 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090LF0964851QJA&deviceType=A3S5BH2HU6VAYF&screenWidth=1440
2018-06-20 17:33:38.808 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090LF0964851QJA&deviceType=A3S5BH2HU6VAYF&screenWidth=1440 succeeded
2018-06-20 17:33:38.812 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090LF0964851QJA&deviceType=A3S5BH2HU6VAYF
2018-06-20 17:33:39.066 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090LF0964851QJA&deviceType=A3S5BH2HU6VAYF succeeded
2018-06-20 17:33:39.201 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/content-skills/enabled-feeds
2018-06-20 17:33:40.217 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/content-skills/enabled-feeds succeeded
2018-06-20 17:33:40.281 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/bluetooth?cached=true
2018-06-20 17:33:41.042 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/bluetooth?cached=true succeeded
2018-06-20 17:33:41.053 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090L90963910VUM&deviceType=A3S5BH2HU6VAYF&screenWidth=1440
2018-06-20 17:33:41.312 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090L90963910VUM&deviceType=A3S5BH2HU6VAYF&screenWidth=1440 succeeded
2018-06-20 17:33:41.320 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090L90963910VUM&deviceType=A3S5BH2HU6VAYF
2018-06-20 17:33:41.587 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090L90963910VUM&deviceType=A3S5BH2HU6VAYF succeeded
2018-06-20 17:33:41.671 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 48 to 43
2018-06-20 17:33:41.746 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090LF0971160DL3&deviceType=A3S5BH2HU6VAYF&screenWidth=1440
2018-06-20 17:33:42.111 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090LF0971160DL3&deviceType=A3S5BH2HU6VAYF&screenWidth=1440 succeeded
2018-06-20 17:33:42.117 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090LF0971160DL3&deviceType=A3S5BH2HU6VAYF
2018-06-20 17:33:42.402 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090LF0971160DL3&deviceType=A3S5BH2HU6VAYF succeeded
2018-06-20 17:33:42.567 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090P308741307M7&deviceType=A7WXQPH584YP&screenWidth=1440
2018-06-20 17:33:42.920 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090P308741307M7&deviceType=A7WXQPH584YP&screenWidth=1440 succeeded
2018-06-20 17:33:42.925 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090P308741307M7&deviceType=A7WXQPH584YP
2018-06-20 17:33:43.383 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090L90971620LK5&deviceType=A3S5BH2HU6VAYF&screenWidth=1440
2018-06-20 17:33:44.015 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090L90971620LK5&deviceType=A3S5BH2HU6VAYF&screenWidth=1440 succeeded
2018-06-20 17:33:44.020 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090L90971620LK5&deviceType=A3S5BH2HU6VAYF
2018-06-20 17:33:44.265 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090L90971620LK5&deviceType=A3S5BH2HU6VAYF succeeded
2018-06-20 17:33:44.348 [vent.ItemStateChangedEvent] - BR3_Echo_Volume changed from 43 to 48
2018-06-20 17:33:44.426 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090LF0964851QJA&deviceType=A3S5BH2HU6VAYF&screenWidth=1440
2018-06-20 17:33:44.675 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/np/player?deviceSerialNumber=G090LF0964851QJA&deviceType=A3S5BH2HU6VAYF&screenWidth=1440 succeeded
2018-06-20 17:33:44.679 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090LF0964851QJA&deviceType=A3S5BH2HU6VAYF
2018-06-20 17:33:44.970 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.com.au/api/media/state?deviceSerialNumber=G090LF0964851QJA&deviceType=A3S5BH2HU6VAYF succeeded
2018-06-20 17:33:45.095 [DEBUG] [onechocontrol.handler.AccountHandler] - refresh data amazonechocontrol:account:account1 finished

(Paul Miller) #662

Could this be causing me an issue?

I have the following in the log:

2018-06-20 18:39:22.888 [hingStatusInfoChangedEvent] - 'amazonechocontrol:account:account1' changed from OFFLINE (CONFIGURATION_ERROR): Login fails. Check your credentials and try to login with your webbrowser to http(s)://<youropenhab:yourport>/amazonechocontrol/account1

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

And yet going to PaperUI the account and all defined things are ONLINE and the Web page it requests you to look at says this?

[EDIT] Upon further investigation going into paperui directly I could see that the account and all the echo units were showing as offline, reentered the password and they all came back online.


(Daniel Walters) #663

Are you sure it uses MQTT over websocket rather than just websocket? It sounds like an odd choice to have the page open an MQTT connection.

If it’s the latter i.e. the page has a web socket connection to the Alexa API backend then this binding should be able to do the same.


(Kim Skatun) #664

ECHO ALARMS:

The information is stored here:
…alexa.amazon.com/spa/index.html#timersAndAlarms/alarms#timersAndAlarms/alarms
and is stored for each echo device and all alarms are avaiable there, so I guess we need to figure out how we would Implement this in OH:

 DateTime  Echo_Living_Room_NextAlarm               "Alarm Set Time"                            (Alexa_Living_Room) {channel="amazonechocontrol:echo:account1:echo1:nextalarm"}

    DateTime  Echo_Living_Room_WeekdaysAlarm               "Alarm Set Time"                            (Alexa_Living_Room) {channel="amazonechocontrol:echo:account1:echo1:weekdayalarm"}
    Switch weekdayAlarm "Alarm activated" (Alexa_Living_Room) {channel="amazonechocontrol:echo:account1:echo1:weekdayalarmActivated"}

    DateTime  Echo_Living_Room_WeekendAlarm               "Alarm Set Time"                            (Alexa_Living_Room) {channel="amazonechocontrol:echo:account1:echo1:weekdayalarm"}
    Switch weekendAlarm "Alarm activated" (Alexa_Living_Room) {channel="amazonechocontrol:echo:account1:echo1:weekendalarmActivated"}

Similar we could do for timers and reminders

Any input on this?


(Ercan Dogan) #665

Hi Andrew
thanks for your response but I can’t give any string command to TTS. The following code doesn’t work:

Echo_Living_Room_TTS.sendCommand(AQI_No_Inside.state.toString)

The same is also not working for the string AQI_Descpription:

Echo_Living_Room_TTS.sendCommand(AQI_Description)

Regards
Ercan


(Andrew Pawelski) #666

I use this (ignore all the array values - they are to get Alexa to randomise stuff she says)

Alexa_Living_Room_Speak.sendCommand('Hey ’ + heylist.get(rndheyNumber - 1).toString + ‘, ’ + reminderList.get(rndNumber - 1).toString + CalendarName1.state + ’ starting in 60 minutes’)


(Chris) #667

First of all, thanks for the great work!

The referenced implementation by Alexander Noack does also implement the “-lastalexa” feature (alexa_remote_control.sh -lastalexa), querying the amazon servers to get the device id of the last active alexa.
This would be useful to detect the echo, the last command was spoken to.

Are there any plans to integrate that into the binding?
Otherwise - has anyone managed to integrate the original script to openhab?

Thanks!