I am so happy, I have searched a long time for a solution to let alexa speak anything what I want, and now I found the solution!
In the past, I found solutions with hacking an alexa remote or creating a MP3 with the amazon services which will be streamed with bluetooth. But I was not really happy with this solutions. Another possibility was the reminder feature, but there was a big disadvantage with this, because there was always a intro with ‘I remind you’ followed by the supplied text.
But now amazon have provided a new routine feature where a user can define a custom text to speak. And because my amazonechocontrol binding supports already starting a routine by using the preview feature, it was easy to use this feature now for TTS.
It’s very simple now that a amazon echo device speaks a text triggered by a rule:
rule "Say welcome if the door opens"
when
Item Door_Contact changed to OPEN
then
Echo_Living_Room_TTS.sendCommand('Hello World')
end
The only thing what you need is to install the current release candidate of my binding which can be downloaded for OH2.2 from the marketplace or download it manually (OH2.2, OH2,3) from my amazonechocontrol thread.
I hope now, that one of the openHAB maintainer (@Kai, @martinvw) find the time to finish the review of my pullrequest before the OH 2.3 is released, so that the binding will be part of the official distribution.
Btw, if there is anybody a native english speaker and want help me to provide a more perfect readme text, I’ am happy for any suggestion.
I just wanted to express my thankfullness for the ammount of time and effort you’ve put into this binding.
The outcome is a tremendous piece of work and I understood the above can be viewed as world’s first within the home automation space?
got it working, in paperui the amazon.com.au is not an option from the dropdown menu so I was using amazon.com. after manually typing amazon.com.au everything started to work.
I just wanted to chime in on this and say Thanks!!!
This is wonderful.
I was having some issues with the example rule, and needed " " instead of ’ ’ around the desired message to
speak in order for my device to output my “Door was opened” message.
Just in case this might help someone else in the same boat.
Hi, is TTS supposed to work in Spain? I am testing it and Alexa responds “Sorry I couldn’t find what you asked for” (in Spanish) whenever I send a TTS command. I am using version 2.4.0.201811041600 of the binding.
When the language to is set to English TTS works. It seems only reminders work in Spanish. Any way to know when Amazon will have TTS working in Spanish?
I tried setting this up here (I’m located in the US) and am unable to get past step 3b of First Steps. I tried logging in at the URL on my OH2 instance, but after successfully logging in per step 3b from the README, amazon complains as follows:
amazonechocontrol:account:account1 (Type=Bridge, Status=OFFLINE (CONFIGURATION_PENDING): Please login in through web site: http(s)://<YOUROPENHAB>:<YOURPORT>/amazonechocontrol/account1, Label=Karns Amazon Account, Bridge=null)
I am running openHAB 2.4.0~20181115123158-1 (Build #1425). I manually copied org.openhab.binding.amazonechocontrol_2.4.0.201811041600.jar to /usr/share/openhab2/addons. I enabled DEBUG logging for the binding, but no errors or warnings appear in the log when I sign on to my Amazon account.
In a browser returns: <UnknownOperationException/>
2018-11-28 11:30:23.876 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler@db8d120': POST url 'https://alexa.amazon.com/api/behaviors/preview' failed: Bad Request
org.openhab.binding.amazonechocontrol.internal.HttpException: POST url 'https://alexa.amazon.com/api/behaviors/preview' failed: Bad Request
at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:521) ~[?:?]
at org.openhab.binding.amazonechocontrol.internal.Connection.executeSequenceNode(Connection.java:1038) ~[?:?]
at org.openhab.binding.amazonechocontrol.internal.Connection.executeSequenceCommand(Connection.java:1023) ~[?:?]
at org.openhab.binding.amazonechocontrol.internal.Connection.textToSpeech(Connection.java:1014) ~[?:?]
at org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler.startTextToSpeech(EchoHandler.java:640) ~[?:?]
at org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler.handleCommand(EchoHandler.java:527) ~[?:?]
at sun.reflect.GeneratedMethodAccessor130.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) [101:org.eclipse.smarthome.core:0.10.0.201811071908]
at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [101:org.eclipse.smarthome.core:0.10.0.201811071908]
at com.sun.proxy.$Proxy224.handleCommand(Unknown Source) [190:org.openhab.binding.amazonechocontrol:2.4.0.201811251726]
Hi, unfortunately does it work in my installation. But I have heard from another user that he had the same problem. The error was, that he had two accounts. The tts does only work for the first account where it was bought. It seems that amazon have changed something, so that this configuration does not work anymore.
Btw, in which amazon domain is your account?
Michael
I just changed the Echo I tested with and the textToSpeech did indeed work. Awesome!
You’re correct, the first Echo (not working) that I configured is registered through my Amazon account which is a Family sub account on my wife’s Prime account. So even though the device shows in the my.local.openhab:8080/amazonechocontrol/ listing, it is associated to my account and must not be accessible.