ISSUE: Music Title (currently playing) Not Showing up on IOS App or via Basic UI
I have a strange one … I’m using the Amazon echo binding and have some inconsistencies
One strange one is the currently playing song title doesn’t show up on my openhab Phone APP or via the Basic UI … it DOES, however, show up on the HAPANEL tile and also shows up on Paper UI Control page
2019-08-05 14:34:27.883 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler@927df0’: 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) ~[?:?]
at org.openhab.binding.amazonechocontrol.internal.Connection.startRoutine(Connection.java:1170) ~[?:?]
at org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler.handleCommand(EchoHandler.java:594) ~[?:?]
at sun.reflect.GeneratedMethodAccessor81.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.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [102:org.eclipse.smarthome.core:0.10.0.oh240]
at com.sun.proxy.$Proxy156.handleCommand(Unknown Source) [275:org.openhab.binding.amazonechocontrol:2.4.0]
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.GeneratedMethodAccessor80.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) [?:?]
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
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?
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.
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?
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...
...
}
}
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
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 …
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).
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)