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

development
binding
alexa
Tags: #<Tag:0x00007fd312abcd80> #<Tag:0x00007fd312abcc18> #<Tag:0x00007fd312abcab0>

(Markus Simons) #634

Hi Sihui.
Yes, this version i had before. And after two times of re-login i saw in the post’s:
Wenn Sie die Seite http (s) öffnen: // youropenhab: port / amazonechocontrol (z. B. http: // localhost: 8080 / amazonechocontrol 3 ) können Sie überprüfen, ob die RC3 korrekt installiert ist. es sollte so aussehen:
RC3.
So i used this version. Because i can’t see RC3. But both gives the same result.
Already deleted the cache and temp folder. All things deleted, restart and new Installation.
Greetings,
Markus


(Joe Bishop) #635

Hey guys, this is a great Binding, I’m really enjoying getting a LOT more out of my Echo Dots than I ever thought possible, thanks to this!! TextToSpeech is freaking awesome, I’m enjoying plugging that in to some of my alert rules, fun!

I’m struggling with the “Routine” part. the guide indicates Type in what you normally say to Alexa without the preceding "Alexa," which I am interpreting to mean I can pass a string to Alexa in the same manner I would speak that phrase, and Alexa should respond “as if” I had verbally said that string. Just as an example, this is what I’ve tried (with no success):

.items file:
String DotRoutine {channel="amazonechocontrol:echo:myaccount:itemguidhere:startRoutine"}

.rules file:
then
  DotRoutine.sendCommand('what time is it?')

But, to no avail. I figured when the rule triggered, Alexa would blurt out “The time is 2:3ppm”. but no joy.
Am I missing something in my item or rule, or is this function simply not intended to do what I’m attempting?

thanks all!


(Sebastian) #636

Hey,
Routine is an Alexa feature so you do this in the Alexa app. There you can define a command Alexa should listen to and manually specify how alexa reacts on this command.
my use-case:
I have a routing calles “which windows are open” that triggers a proxy item (switch) within openhab. This switch triggers a rule, which then calculates windows, and uses TTS to have Alexa spit the reply.

The startRoutine channel is a bit different: Say you have manually created a routing called “start my day” and added Alexa items like reading the news, turning on lights, etc.
This routine can then be started like:

DotRoutine.sendCommand('start my day')

Hope this helps. Additions & corrections welcome.
Best Seb


(Ben) #637

So I let everything sit since yesterday as suggested - no luck. Still no session ID received and srever error.


(SiHui) #638

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


(Ben) #639

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:


(Scott Rushworth) #640

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


(Joe Bishop) #641

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?


(sujit) #642

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 ?


(Falk S.) #643

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)


(Ercan Dogan) #644

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


(Andrew Pawelski) #645

AQI_No_Inside.state.toString


(Ben) #646

Still no luck for me. Still server error.


(Alejandro) #647

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??


(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?