Release Candidate and Support: Amazon Echo Control Binding

This error seems to be coming when the binding tries to access the playlists. Somehow one of them has a strange version number. In my case it’s “My favorites” that has version “2:923521”, which can’t be parsed as a number. Every other playlist has a valid number for the version.

OK, that can be the Problem. My “My Favorites” looks like yours.
"title":"Meine Favoriten","trackCount":0,"version":"1:870161590"
and I get the following message in the Log under the json:
Parsing json failed com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For input string: "1:870161590"

But this Playlist can’t be removed, so that the Problem can’t be resolved.

Someone already created an issue for this: https://github.com/openhab/openhab-addons/issues/8491

1 Like

I am having a problem with the sign-on which does not appear to be the same as what anyone else has reported. This is after making sure I had the latest 2.5.8 jar, removing any existing Amazon account and starting over to get a new ID, etc. Basically what is happening is that the sign-on process errors-out while I am doing the Amazon verification process (responding to the SMS they send me by clicking the link, etc). I can see that for some reason the sign-on page is trying to make an async request to:

<<server>>:<<port>>/ap/uedata?<params omitted>

And this is returning a 404. This appears to be breaking the login process. Even though I approve the login with Amazon, the process in OpenHAB never completes.

Presumably the problem is with me LOL but maybe someone can point me in the right direction.

I am also facing a problem with the login. It’s the first time I try this binding and when I sign in, a receive an SMS to approve the request but as soon as I receive it, I get kicked out (in the browser where I was configuring the binding) and I see again the Sign In screen.
That goes on and on…
Any ideas?

Thank you!

This worked me:

@Sergi_Mola, have you had any luck?

I’m having the same problem where i receive the text and immediately accept and verify, but it just cycles back to the sign in.

I’ve tried resetting the account in karaf. I’ve tried removing my manual thing configuration and adding from the inbox. I’ve removed the binding and added snapshots 2.5.8 and 2.5.9.

Unfortunately, nothing is working for me.

I’ve just made it work!
I enabled two factor authentication in my amazon account and that did the trick.

1 Like

YESSS! thank you! that worked.

1 Like

Nice, @Sergi_Mola - that worked for me as well. I had disabled it while initially fighting with this issue.

1 Like

Hi,
I have been filling up my logs for the last few days with the following.

I am using 2.5.7.202007201632
I have checked and all my amazon channels trackID, playlist are not configured on any of my echos. I can confirm the playlist names are on my Amazon music account. I have not changed them or gone to my account before today in over a year.

not sure where the code button on the editor has gone to insert code blocks… apologises.

2020-09-22 00:41:28.124 [WARN ] [mazonechocontrol.internal.Connection] - Parsing json failed com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For input string: "1:1038256507" at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:227) ~[?:?] at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:217) ~[?:?] at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[?:?] at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[?:?] at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) ~[?:?] at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72) ~[?:?] at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) ~[?:?] at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187) ~[?:?] at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) ~[?:?] at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[?:?] at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[?:?] at com.google.gson.Gson.fromJson(Gson.java:888) ~[?:?] at com.google.gson.Gson.fromJson(Gson.java:853) ~[?:?] at com.google.gson.Gson.fromJson(Gson.java:802) ~[?:?] at com.google.gson.Gson.fromJson(Gson.java:774) ~[?:?] at org.openhab.binding.amazonechocontrol.internal.Connection.parseJson(Connection.java:929) ~[?:?] at org.openhab.binding.amazonechocontrol.internal.Connection.getPlaylists(Connection.java:1094) ~[?:?] at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.refreshData(AccountHandler.java:552) ~[?:?] at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.checkData(AccountHandler.java:458) ~[?:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_201] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_201] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_201] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_201] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201] Caused by: java.lang.NumberFormatException: For input string: "1:1038256507" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) ~[?:1.8.0_201] at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[?:1.8.0_201] at java.lang.Double.parseDouble(Double.java:538) ~[?:1.8.0_201] at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1201) ~[?:?] at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:225) ~[?:?] ... 25 more 2020-09-22 00:41:28.169 [WARN ] [mazonechocontrol.internal.Connection] - Illegal json: {"playlists":{"A Ryan's Playlist":[{"entryList":null,"playlistId":"ef667c1b-94c3-43c2-af4f-3bb52993e684","title":"A Ryan's Playlist","trackCount":0,"version":"1"}],"Boulevard Of Broken Dreams":[{"entryList":null,"playlistId":"282c5be6-a41b-4896-b3d4-4b65308dc62e","title":"Boulevard Of Broken Dreams","trackCount":3,"version":"4"}],"Cooking":[{"entryList":null,"playlistId":"7b8bbe21-ffbc-4112-b048-96f9327ab290","title":"Cooking","trackCount":48,"version":"38"}],"Green Day":[{"entryList":null,"playlistId":"6e63ef43-9b58-45e1-baf3-64b344c1339b","title":"Green Day","trackCount":2,"version":"3"}],"My Likes":[{"entryList":null,"playlistId":"783bf193e42742b8979c5f6356e22181","title":"My Likes","trackCount":0,"version":"1:1038256507"}],"Nostalga":[{"entryList":null,"playlistId":"df602d1e-cdd6-4e70-958c-677b78200a63","title":"Nostalga","trackCount":2,"version":"1"}],"Superman":[{"entryList":null,"playlistId":"e479a177-7e0d-4e04-b6f1-2ce2ddecfebe","title":"Superman","trackCount":2,"version":"3"}]}}

I cannot see a thing / item to do with playlist else I would simply try removing its definition. Anyone abe to assist?

Thanks
Paul

This should be fixed in the 2.5.10 snapshot.

org.openhab.binding.amazonechocontrol-2.5.10-SNAPSHOT.jar

1 Like

re code button… for me the icon isn’t showing but if I hover over where it should the tool tip shows and it works

Hello, with 2.5.10 the log is clean, but my Habpanel no longer works. The message from the Habpanel is “connection lost trying to reconnect”.

Thanks Mark,
I can see the tool tips come up, strange that the icons are not visible, its as if to discourage their use.

Regards
Paul

that did it, a clean log once again :slight_smile: I can relax again.

an addition: I deleted the binding, all echo devices and the Amazon account. Then I reinstalled Binding 2.5.10. Immediately afterwards I can no longer use Habpanel, the message “connection lost …”.

Hi

is it possible to somehow control apple music?
It is supported by alexa for a few month now i think. i can start a playlist with a voice command. so i should be able to (at least with a workaround with sending my command via string) start playing a apple music song/playlist. But what about controls?

Thank you!

Different problem since 2.5.7:
The account cannot be linked to the OH installation. Now I am on 2.5.9 and if I am logged in in my Account the Account-Thing changed from Offline to Online. When I logging out the OH Thing change from Online to Offline.

I deleted the items without any result. This was with 2.5.7. Today I tried again with a new Bridge - same problem. Any suggestions from other side?

thanks. works as expected