Release Candidate and Support: Amazon Echo Control Binding

Hi i’m italian, the TTS doesn’t work in italian?
I try to do this rule:
rule “Say welcome if the door opens”
when
Item CancelloC changed to OPEN
then
Echo_Living_Room_TTS.sendCommand(‘Benvenuto’)
end

But i receive a bad answare from alexa also she don’t understand the question… if i change the languange in Alexa and i change the command TTS Echo_Living_Room_TTS.sendCommand(‘Hello’) it works fine…

I try the command remind, with this command Alexa works, she speak italian and she speak it
rule “Say welcome if the door opens”
when
Item CancelloC changed to OPEN
then
Echo_Living_Room_Remind.sendCommand(‘si sta aprendo il cancello’)
end

hi,
I just fail on the point 2 of the First Step.:disappointed_relieved:
I have an account on amazon.it (yes ! finally echo just arrived here)
I create an account in paper ui (but tested also via file same problem)
the account remain offline so I move to point 2.
I see the account name I create in the http://openhab:8080/amazonechocontrol/ page but when I click on the link instead of to jump in the alexa login page, I jump on a strange character page (just text no link).
Can you help me?
Thanks Lorenzo

Which Radiostation ID’s can we use?

Same here, I use openHAB 2.4.0~20181101034247-1 (Build #1408) and org.openhab.binding.amazonechocontrol-2.4.0-SNAPSHOT-Beta3.jar. Today I get:

2018-11-02 20:20:06.176 [INFO ] [mazonechocontrol.internal.Connection] - Login failed: POST url ‘Amazon.com’ failed: Not Found

Instead of login page http://192.168.10.120:8080/amazonechocontrol/account1/ I get something like this:

��]]][W��w�fAy7�I9K���n��� >H��ע�ae�&�;��8F7�%����}��k��,gY!�g�n�p"x��sXye%S�b�$�����" �8K�кǶ� �S��\ޯX�aU;�n�˺�u��r��uW+WءW��U�ndZ�?:�!@�šE��ʌ[�qdn��R"�…]Lz�+{�(&�EI;�Ib�|����,,#0-F��Kxv�b���Т,7�-��t6��

Instead of login page http://192.168.10.120:8080/amazonechocontrol/account1/ I get something like this:
��]]][W��w�fAy7�I9K���n���>H��ע�ae�&�;��8F7�%����}��k��,gY!�g�n�p"x��sXye%S�b�$�����" �8K�кǶ��S��\ޯX�aU;�n�˺�u��r��uW+WءW��U�ndZ�?:�!@�šE��ʌ[�qdn��R"�…]Lz�+{�(&�E I;�Ib�|����,,#0-F��Kxv �b���Т,7�-��t6��

I experienced the same login page gibberish yesterday. Restarting openhab did not help. But a shut down and reboot fixed it and login was possible.

  • Thomas

Hi everybody,
Short answer: Download the BETA 5 from the top most posting.

Long answer:
Amazon have changed the server response to be GZIP if there is no Accept-Encoding Header. Because my binding had not sent this header, the response was send with Content-Encoding: GZIP and currently this is not supported.
For the moment, I have added an empty Accept-Encoding Header which fix the problem for the moment Download new version from the top-most posting. But I will a the GZIP Encoding Support in the future, because then we have lesser network traffic.

Sorry for that issue,
Best regards,
Michael

2 Likes

Thanks for the quick response @michi for an Openhabian system on the Pi, where should I be placing the JAR file? I’ve put it in the addons folder but maybe I need to rename it to something particular?

2018-11-03 10:18:47.768 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.amazonechocontrol_2.4.0.201811022124.jar

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.amazonechocontrol [244]

  Another singleton bundle selected: osgi.identity; type="osgi.bundle"; version:Version="2.4.0.201811021724"; osgi.identity="org.openhab.binding.amazonechocontrol"; singleton:="true"

	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org

UPDATE : I did a search for anything named “amazon” and deleted any files or references to the SNAPSHOT jar file. I no longer seem to be getting the above error anymore but still looks like there are issues with logging in? So maybe it’s not using the latest JAR file?

Hi @michi

Just want to say a big thank you. It is the first time automation has a high waf factor …I think it topped the upper side of this Variable lol.

All is working good with snaphot #1409 And your beta (5).

Matth

Edit: time to clone this ssd!

@michi thank you for reply and support. All is working fine with beta 5 and build #1409.
Wojtek

What OH version are you using?

Thanks with ver 5 now it works !!
Just one question:
I have an echo-dot and the textToSpeech seems does not work as expected.:
I copy the rule of you post but instead to repeat the writing message, the echo just say “sorry, I don’t find any answer to your question” (in Italian)… It seems it read the message as a Command ?!?.
Any advice to solve the issue?
Lorenzo

Hi i’m new.
I have intalled openhabian two days ago on rpi.
How can i get ver 5 work manually? I’m reading a lot of posts but i can’t understand how to do.
Thanks to all for your job.

Hi All

Started to see this error now, any thoughts?

18:07:02.940 [INFO ] [amazonechocontrol.internal.Connection] - Login failed: POST url ‘https://www.amazon.com/ap/signin’ failed: Not Found

Hi Valerio,
just copy the jar file in the addon directory in openhab.
if you need help also in Italian, send a PM
Ciao
Lorenzo

@michi
All is working good with snaphot #1346 and your beta (5).

Update: When I start openhab I always get this error message, but binding is working

    2018-11-04 17:19:26.531 [INFO ] [.handler.FlashBriefingProfileHandler] - FlashBriefingProfileHandler initialized
    2018-11-04 17:19:27.564 [WARN ] [mazonechocontrol.internal.Connection] - Parsing json failed {}
    com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 8 column 1 path $
            at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224) [16:com.google.gson:2.7.0]
            at com.google.gson.Gson.fromJson(Gson.java:887) [16:com.google.gson:2.7.0]
            at com.google.gson.Gson.fromJson(Gson.java:852) [16:com.google.gson:2.7.0]
            at com.google.gson.Gson.fromJson(Gson.java:801) [16:com.google.gson:2.7.0]
            at com.google.gson.Gson.fromJson(Gson.java:773) [16:com.google.gson:2.7.0]
            at org.openhab.binding.amazonechocontrol.internal.Connection.parseJson(Connection.java:700) [244:org.openhab.binding.amazonechocontrol:2.4.0.201811022124]
            at org.openhab.binding.amazonechocontrol.internal.Connection.getEnabledFlashBriefings(Connection.java:1058) [244:org.openhab.binding.amazonechocontrol:2.4.0.201811022124]
            at org.openhab.binding.amazonechocontrol.handler.AccountHandler.updateFlashBriefingProfiles(AccountHandler.java:575) [244:org.openhab.binding.amazonechocontrol:2.4.0.201811022124]
            at org.openhab.binding.amazonechocontrol.handler.AccountHandler.addFlashBriefingProfileHandler(AccountHandler.java:178) [244:org.openhab.binding.amazonechocontrol:2.4.0.201811022124]
            at org.openhab.binding.amazonechocontrol.handler.FlashBriefingProfileHandler.initialize(FlashBriefingProfileHandler.java:74) [244:org.openhab.binding.amazonechocontrol:2.4.0.201811022124]
            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) [94:org.eclipse.smarthome.core:0.10.0.201808242044]
            at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [94:org.eclipse.smarthome.core:0.10.0.201808242044]
            at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
......

Thanks!

Solved, just restarted openhaband check from console if new binding was active.
Once I’ve added a new thing, I’ve been able to choose the new binding.

Hi,
Simple answer is no, this seems to be bug in the Italian version of the amazon SW. Other users of the iobroker reports the same.
But I have a question, what happen if you create a routine in the alexa app which should “Say” a custom text?
Best regards,
Michael

New Beta Version 6

If you are using Beta 5, there is no need to upgrade. The new version fix the 2 factor authentication problem, which only occurs on new setup an account things. The second fix is the support for GZIP response of the amazon server. It makes the response size smaller, but I don’t think that this is a big advantage.

The problem which is reported for some echo dot devices in the TTS is not yet fixed. The problem for this issue is, that I could not reproduce the problem. But I work on this with an OH user from US.

You can download the new version from the top most posting.

Best regards,
Michael

1 Like

Thanks. Please sent me also the “Type” and “Family” code listed on the http://<youropenhab/amazonechocontrol/ page for the fire cube device.