+1 i have the same issue
Error
2019-08-05 15:00:36.148 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method āThingHandler.handleCommand()ā on āorg.openhab.binding.amazonechocontrol.internal.handler.EchoHandler@ac6c37ā: POST url āhttps://alexa.amazon.com/api/behaviors/previewā failed: Unauthorized
org.openhab.binding.amazonechocontrol.internal.HttpException: POST url āhttps://alexa.amazon.com/api/behaviors/previewā failed: Unauthorized
at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:549)
I donāt think so, and the error does not seems to depend on the OH version.
Strange, the only common thing is, that all reported logs are from amazon.com. May the API has changed there, amazon.com is always the first domain with new SW version. And I have checked it, on my installation it is working fine. @jwiseman Is your installation still working?
- On which channels does this error occurs? Only TTS? Maybe you can try TTS with SSML like āHello Worldā, this would use a different API.
- One more thing what you can check for me ist the customer ID. The account page of the binding proxy (Same url which you have used for the login) shows the customer ID for the account and the devices. Is it the same for all?
- What happen for other channels, e.g. Volume?
- Did you see the last voice command in the the lastVoiceCommand channel?
- Has it ever worked or is it a new installation?
Best,
Michael
Hi Michael,
here my feedback.
I used the german API amazon.de - look at my upper screenshot. Here ist the same problem like the API amazon.com
I tested a few of channels:
doesnāt work
player
volume
shuffle
textToSpeech
ā¦
ā¦
works
musicProviderId (read)
equalizerTreble (read)
equalizerMidrange (read)
equalizerBass (read)
title (read)
imageUrl (read)
subtitle1 (read)
subtitle2 (read)
providerDisplayNam (read)
lastVoiceCommand (read)
notificationVolume (write)
ā¦
TTS and TTS with SSML the same error log
Here is the same customer ID at the devices and in the upper range. (sorry for the black bars )
look at point 1.
Yes!
It worked without problems.
When I switched to another Amazon account, it did not work anymore.
Best regards,
Nico
Hello Michael,
I have received the same error with amazon.de too.
- The used channel is startRoutine
- The Customer ID is the same for all
- Unfortunately I cannot test other channels because I do not have amazon devices, I only have smart home devices connected through skills.
- The lastVoiceCommand channel does not update.
- In my case is a new installation.
The simplest way to reproduce the error is to use the startRoutine with the default routine āstart my dayā. You can test it also on more domains, not only on your working one.
Regards,
Liviu
Same Problem here with the .de TLD
Best regards!
also the same problem here with the .de TLD.
It seems like you can only read information from the Device.
The only exception I can Switch on the alarm sound.
Hi @michi
This is the first version I have tried, so it is still possible it is my error. Is there an earlier beta version I can try since the 2.4 version is broken by Amazon changes?
Cheers!
Iām trying to create a rule that triggers when an Alexa alarm goes off, but canāt quite get my head around it. I can link a datetime item and reference it to the ā.nextAlarmā channel and have that display perfectly in OH GUI, but I canāt get it to trigger in a rule. Running binding beta 2.5 (RC1) - latest at time of writingā¦
Iāve triedā¦ (which of course, doesnāt really make sense anyway)
rule "When morning alarm sounds"
when
Item Echo_MasterBedroom_NextAlarm changed
then
...
Iāve triedā¦ (which makes more sense)
rule "When morning alarm sounds"
when
Channel "amazonechocontrol:echo:Amazon_Account:loungeecho:nextAlarm" triggered
then
...
But neither work. I assume there is some form of ātriggerā event I can use, as it would be a bit stupid if I had to create a rule that runs every minute and I have to compare date/time with nextAlarm date/time.
Any tips?!
EDIT:
I had a cron rule that ran every 1 minute for doing other tasks anyways, so simply added this to the rule as a workaroundā¦ the first if statement checks to ensure the alarm is actually set (return UNDEF as string if itās not)
// Get Dates and check against master bedroom alarm
if (Echo_MasterBedroom_NextAlarm.state !== null && Echo_MasterBedroom_NextAlarm.state.toString().length() > 0 && Echo_MasterBedroom_NextAlarm.state.toString() != "UNDEF")
{
val dDateTimeNow = new DateTimeType(now.toString())
val dDateTimeEcho = new DateTimeType(Echo_MasterBedroom_NextAlarm.state.toString())
val String sDateTimeNow = dDateTimeNow.toString().substring(0, 16)
val String sDateTimeEcho = dDateTimeEcho.toString().substring(0, 16)
// If date and time triggered
if (sDateTimeNow == sDateTimeEcho)
{
createTimer(now.plusSeconds(10), [|
logInfo("Echo", "Alarm activated, Now={}, Alarm={}", sDateTimeNow, sDateTimeEcho)
])
Echo_MasterBedroom_TTS.sendCommand('Good morning sleepy heads!')
...
// turn lights on etc...
...
}
}
Did amazon changed something in their api? I am not able to send any volume command anymore, with the volume channel.
Edit: it is not possible anymore to change vilume to alexa from the phone app, exept when music is playing.
But it is possible to change to volume vis a routine.
Device setting/ volume. Then you chose which device you want to make that change.
But i have 9 echo. And change the volume 5 times per day. That means i should create 45 new routine.
Anyone know a command to directly call that from the reverse proxy api? Thanks
Iād like to add my name to the list of people that this is failing to work for. I thought that Iād set it up incorrectly - given that Iām super new to the community - however, I was able to get my Echo devices to play alarm sounds and read various bits of information (as others have suggested).
Something which other people havenāt mentioned, as far as I can see, is that Iām able to READ the volume on my Echo device, just not WRITE it.
Hope this helps as controlling my Echo device is the only thing stopping me jumping in with both feet with OpenHab
Ta!
Yes this is what I saw too !
This is in line with the alexa app. You cannot change the sound mannually now, unless if music is playing. Soā¦ in the alexa app, you can also read but not write ( unless music is playing).
the workaround would be to create A LOT of routine to cope with this api change.
note:
this is crazy, amazon did not change anything in almost 1.5 yearā¦ and now all of this haha ā¦
Hi @michi,
now a lot of guys here with the same error.
Can you try to fix the binding?
Thanks for reply.
Best
Nico
Two problems/questions:
-
It appears that Echo shows no longer work with this binding. I have 2 of them and if I tell it to play music, neither show anything is happening. If I ask them for the time, i see no last voice command activity. It works fine on my 11 other echos (all dot gen 2ās). There are no error messages (or any messages at all for that matter). Let me know what I can send you to help solve the problem. Iām using the org.openhab.binding.amazonechocontrol_2.5.0.RC_1.jar vesion.
-
Is there support for echo on the ecobee device? What about echo auto? If so, what thing type do I use?
As iām more or less an absolute newbie to openHab2, one question regarding AMAZON Echo control binding:
Iām runnning an openHab 2.4 (stable) on a linux vm and everything works good so far, but not the Amazon Echo Control binding. Iāve installed the one you can install from Paper UI and i can get some information read from my 4 echo devices, but i can not set any channel to something an also i can not use the text to speech channel.
Will this work if i use the referenced 2.5 version or is this also broken for the moment and needs to be adapted to latest changes at the amazon api? (Donāt want to break my productive openHab installation).
Best regards
BoxSon
Not all channels are āwritableā. See here for which are R vs R/W:
However I would suspect you should be able to send a TTS command without issues. Iām personally running 2.5RC1 and have no issues with TTS, however without referring to newer release notes post the 2.4 (stable) version I canāt say whether this is a bug or not. Either way, I do find 2.5RC1 more stable then the supposedly 2.4 stable release.
What do your openhab logs say? Share your config and rules for your TTS in case itās a syntax issue.
Yesterday I moved my system from openhabian (raspberry pi) to a Mac Mini. Everything works except Amazon Echo Control. Everything is authorized, I see the commands as strong and the devices are online, but TTS is not working anymore. I get all the time an Unauthorized error. No change in config that worked on raspberry Pi without problems. Therefore it cannot be a configuration error I think!
Maybe new authorized installations are not allowed anymore to write anymore like TTS?
(Volume Control, Player, all that writes is also not working anymore but read works)
Iāve uninstalled the 2.4 Stable AMZON ECHO Control Binding today and installed the one mentioned at this thread (copied to addon diectory etc.).
But still i can read only item data. If i set the volume of one of my echos in Paper UI i can see the following error in log:
2019-08-09 13:16:41.840 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler@1cb675ed': POST url 'https://alexa.amazon.de/api/behaviors/preview' failed: Unauthorized org.openhab.binding.amazonechocontrol.internal.HttpException: POST url 'https://alexa.amazon.de/api/behaviors/preview' failed: Unauthorized at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:648) ~[?:?] at org.openhab.binding.amazonechocontrol.internal.Connection.executeSequenceNode(Connection.java:1195) ~[?:?] at org.openhab.binding.amazonechocontrol.internal.Connection.executeSequenceCommand(Connection.java:1180) ~[?:?] at org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler.handleCommand(EchoHandler.java:433) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?] at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240] at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [102:org.eclipse.smarthome.core:0.10.0.oh240] at com.sun.proxy.$Proxy197.handleCommand(Unknown Source) [259:org.openhab.binding.amazonechocontrol:2.5.0.RC_1] at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:75) [109:org.eclipse.smarthome.core.thing:0.10.0.oh240] at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [109:org.eclipse.smarthome.core.thing:0.10.0.oh240] at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?] at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240] at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?] 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) [?:?]
Iām getting a lot of the same errors that BoxSon is getting:
org.openhab.binding.amazonechocontrol.internal.HttpException: POST url 'https://alexa.amazon.com/api/np/command?deviceSerialNumber=G090LF1174770CD5&deviceType=A3S5BH2HU6VAYF' failed: Unauthorized