Amazon Echo SmartJ Binding Last Voice Command not working anymore

Hi Jan,
i just tried the steps but can´t login again.
After logging out i get the Amazon login page and the redirect leads me to a blank page with this error:

Invalid redirect to 'https://www.amazon.com/ap/mfa?ie=UTF8&arb=<some code>&mfa.arb.value=<the same code>&mfa.arb.key=arb'
Try again

Any idea what went wrong?

I´m on oH 4.0.1 and used the 4.0.2 version of your beta.

Do you have two-factor authentication enabled?

Correct.

Please try amazonechocontrol listAccounts and then amazonechocontrol resetAccount <id> on the console. It seems that something is wrong with the account configuration.

3 Likes

Worked like a charm!
Thanks for you help Jan :+1:

1 Like

Now on 4.0.4 and with these links to both 4.0.x and 4.1, I always get offered the 4.1 version.
I can’t see any difference between 4.1 and 4.0.x links.
Opening https://download.smarthomej.org/addons-beta.json in the web browser I can see there’s a 4.0.2 version available, but OH doesn’t show it, only the 4.1 (and two of those actually). I only have https://download.smarthomej.org/addons-beta.json in the field.

Opening https://download.smarthomej.org/addons-beta.json in Firefox, I get:
SyntaxError: JSON.parse: unexpected character at line 33 column 1 of the JSON data

Can this be the reason why 4.0.2 is not there to install?

Thanks for making the channel working again. Is there anyway else, to trigger the Alexa_Refresh_Activity Item. I have a lot of voice requests, which would be a lot of work to put everything into an Alexa routine. But I also have “variable” requests like: Charge car to 70%. I can’t enter a routine for all percentage numbers :frowning: Maybe someone can come up with a workaround.

Gruß Joe

1 Like

yeah you can :slight_smile: because you never say “charge to 66%” :slight_smile: … ( that is my workaround)

I really wonder why you see the add-on two times. I have no idea how that could happen, when both are not installed. If you remove the 3rd party add-on entry completely. do both vanish?

They do… Or if I install one, they both appear installed. It’s really odd.

I think there’s an extra “comma” at the end of the json, right at the end after the } but before the ] - I’m not sure if that’s supposed to be there; the error in Firefox is removed when I remove that comma - I tried to mark it… What do you think?

I have installed your .kar to the addons folder, but it doesn’t show up in paperUI of course like that and I don’t know the parameters to create a thing out of it.

[
  {
    "uid": "org-smarthome-binding-amazonechocontrol-beta",
    "id": "amazonechocontrol",
    "type": "binding",
    "version": "4.1.0-SNAPSHOT",
    "author": "SmartHome/J",
    "maturity": "beta",
    "content_type": "application/vnd.openhab.feature;type=karfile",
    "link": "https://docs.smarthomej.org/4.1.0-SNAPSHOT/org.smarthomej.binding.amazonechocontrol.html",
    "url": "https://download.smarthomej.org/org.smarthomej.binding.amazonechocontrol-4.1.0-SNAPSHOT.kar",
    "title": "SmartHome/J Amazon Echo Control Binding (beta)",
    "description": "This binding can control Amazon Echo devices (Alexa) and Smarthome devices connected through Alexa or a skill. ",
    "compatible_versions": "[4.1.0.0;4.1.99]",
    "logger_packages": [ "org.smarthomej.binding.amazonechocontrol" ]
  },
  {
    "uid": "org-smarthome-binding-amazonechocontrol-beta",
    "id": "amazonechocontrol",
    "type": "binding",
    "version": "4.0.2-SNAPSHOT",
    "author": "SmartHome/J",
    "maturity": "beta",
    "content_type": "application/vnd.openhab.feature;type=karfile",
    "link": "https://docs.smarthomej.org/4.0.2-SNAPSHOT/org.smarthomej.binding.amazonechocontrol.html",
    "url": "https://download.smarthomej.org/org.smarthomej.binding.amazonechocontrol-4.0.2-SNAPSHOT.kar",
    "title": "SmartHome/J Amazon Echo Control Binding (beta)",
    "description": "This binding can control Amazon Echo devices (Alexa) and Smarthome devices connected through Alexa or a skill. ",
    "compatible_versions": "[4.0.0;4.0.99]",
    "logger_packages": [ "org.smarthomej.binding.amazonechocontrol" ]
  }**,**

]

Same problem here.
yes if i remove 3rd party addon both disappear.
I have The official openhab then i have:

  1. SmartHome/J Amazon Echo Control Binding
    Clicking inside is the version 4.0.1
  2. SmartHome/J Amazon Echo Control Binding
    But clicking inside is: SmartHome/J Java Rule Automation 3.2.19
  3. SmartHome/J Amazon Echo Control Binding (beta)
    Clicking inside is SmartHome/J Amazon Echo Control Binding (beta) 4.1.0-SNAPSHOT
  4. SmartHome/J Amazon Echo Control Binding (beta)
    Clicking inside is SmartHome/J Amazon Echo Control Binding (beta) 4.1.0-SNAPSHOT

Tested with 4.04, 4.1 M3 and 4.1 snapshot.

Do you have “show incompatible add-ons” activated? Disable that. (Settings/Add-on management).

3 Likes

Good! now works! show only one beta version and is the correct one! (4.0.2-SNAPSHOT)
Thank you very much!
p.s. for version 4.1 M3 which json i have to use the one for 4.0 or the one for 4.1 snapshot?

Seems that works well.
But Alexa doesn’t answer anymore.
AlexaSala_Speak.sendCommand(“La stampa è terminata. ”)
Does nothing.
Using 4.1 snapshot was working fine.

Dear all,
i am runing openHAB 4.0.4.
Today i replayed the echo control binding with the SmartHome/J Amazon Echo Control Binding (beta) 4.0.2-SNAPSHOT.
Still i am getting no player channel updates when i tell echo to play music.
But when i click play and stop in openhab i am getting some echo reactions (but still buggy, may be a alexa issue.

Am i using a wrong openhab or binding version?

I enables TRACE log in the binding, this is the result (pressing play in openhab):

2023-11-15 11:09:56.354 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EchoBuro_Musikwiedergabe' changed from PLAY to PAUSE
==> /var/log/openhab/openhab.log <==
2023-11-15 11:10:10.954 [TRACE] [control.internal.handler.EchoHandler] - Command 'PLAY' received for channel 'amazonechocontrol:echoshow:e9784c827b:G091P3082196016C:player'
2023-11-15 11:10:10.957 [DEBUG] [rol.internal.util.HttpRequestBuilder] - > POST: https://alexa.amazon.de/api/np/command?deviceSerialNumber=G091P3082196016C&deviceType=A1XWJRHALS1REP (available: 2)
2023-11-15 11:10:10.971 [TRACE] [rol.internal.util.HttpRequestBuilder] - > POST to https://alexa.amazon.de/api/np/command?deviceSerialNumber=G091P3082196016C&deviceType=A1XWJRHALS1REP, headers = [Accept-Encoding=gzip,User-Agent=AmazonWebView/Amazon Alexa/2.2.556530.0/iOS/16.6/iPhone,Accept-Language=en-US,DNT=1,Upgrade-Insecure-Requests=1,csrf=-757335059,Content-Type=application/json;charset=utf-8,Content-Length=22,Expect=100-continue], cookies = [csrf=-757335059, session-id-time=2330761554l, session-id="257-7824929-9679535";$Path="/";$Domain=".amazon.de", ubid-acbde="259-2316425-8844535";$Path="/";$Domain=".amazon.de", x-acbde=""I?KMIhgGUetuhuMqOaTCh4YDJ7vRtEx0"";$Path="/";$Domain=".amazon.de", at-acbde=""Atza|IwEBIKAbsuEZc6SZGHvZEgtz0YimcU59kG0NjAMPafVJv1LzPyC-u_F_tcQ4myBsevLVyWg9vKUHTuaLHbhel783x__UeOXI9pfFWfd1CfLreYp6ReB4AcruLRVrF3vT4w2xsMJy8KPBEkyfCvF3JTqXnhVv-KeJGCzBXqExU89GWwYyF2f9aEvXUZnW3B59q1AriyGGh4f4zvYooxefJLLr3fdFv5M4FhuaG5k7UUPk3MniDZnlP5M2KDx0o0iH1pDpG3AIp0i1fnIfciDjpDXAEQ8JcyTKjQ4cK3bVNIQ85I--lXG50vPiuGq02Tzd4GMOeS8"";$Path="/";$Domain=".amazon.de", sess-at-acbde=""Gqr7cOwIX3Q39r2Y1T2H7dq3KGr2H/t+shx8hLYWsDM="";$Path="/";$Domain=".amazon.de"], content = {"type":"PlayCommand"}
2023-11-15 11:10:11.244 [TRACE] [pRequestBuilder$HttpResponseListener] - < POST to https://alexa.amazon.de/api/np/command?deviceSerialNumber=G091P3082196016C&deviceType=A1XWJRHALS1REP: 200, headers = [Content-Type=application/json,Content-Length=2,Connection=keep-alive,Server=Server,Date=Wed, 15 Nov 2023 10:10:11 GMT,x-amz-rid=F25ZYSAN440TXCKNCP46,x-amzn-RequestId=40445b39-9dee-4bcf-b64e-bc9cae3039a9,Vary=Content-Type,Accept-Encoding,User-Agent,Strict-Transport-Security=max-age=0; includeSubDomains;,X-Cache=Miss from cloudfront,Via=1.1 2d22bd8fe92380401bbc1d8cc010e5a0.cloudfront.net (CloudFront),X-Amz-Cf-Pop=MUC50-P3,X-Amz-Cf-Id=l8-ToZmr2gHGtmBwCdm_YNWtj8h6wTn1432KbW68UcFhblW7dxeXxQ==], content = null
==> /var/log/openhab/events.log <==
2023-11-15 11:10:10.931 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'EchoBuro_Musikwiedergabe' received command PLAY
2023-11-15 11:10:10.937 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EchoBuro_Musikwiedergabe' predicted to become PLAY
2023-11-15 11:10:10.939 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EchoBuro_Musikwiedergabe' changed from PAUSE to PLAY
2023-11-15 11:10:11.599 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'XiaomiKlimaSensor4_Batterie' changed from 79 to 78
==> /var/log/openhab/openhab.log <==
2023-11-15 11:10:12.248 [DEBUG] [control.internal.handler.EchoHandler] - Handle updateState amazonechocontrol:echoshow:e9784c827b:G091P3082196016C
2023-11-15 11:10:12.251 [DEBUG] [rol.internal.util.HttpRequestBuilder] - > GET: https://alexa.amazon.de/api/np/player?deviceSerialNumber=G091P3082196016C&deviceType=A1XWJRHALS1REP&screenWidth=1440 (available: 2)
2023-11-15 11:10:12.253 [TRACE] [rol.internal.util.HttpRequestBuilder] - > GET to https://alexa.amazon.de/api/np/player?deviceSerialNumber=G091P3082196016C&deviceType=A1XWJRHALS1REP&screenWidth=1440, headers = [Accept-Encoding=gzip,User-Agent=AmazonWebView/Amazon Alexa/2.2.556530.0/iOS/16.6/iPhone,Accept-Language=en-US,DNT=1,Upgrade-Insecure-Requests=1,csrf=-757335059], cookies = [csrf=-757335059, session-id-time=2330761554l, session-id="257-7824929-9679535";$Path="/";$Domain=".amazon.de", ubid-acbde="259-2316425-8844535";$Path="/";$Domain=".amazon.de", x-acbde=""I?KMIhgGUetuhuMqOaTCh4YDJ7vRtEx0"";$Path="/";$Domain=".amazon.de", at-acbde=""Atza|IwEBIKAbsuEZc6SZGHvZEgtz0YimcU59kG0NjAMPafVJv1LzPyC-u_F_tcQ4myBsevLVyWg9vKUHTuaLHbhel783x__UeOXI9pfFWfd1CfLreYp6ReB4AcruLRVrF3vT4w2xsMJy8KPBEkyfCvF3JTqXnhVv-KeJGCzBXqExU89GWwYyF2f9aEvXUZnW3B59q1AriyGGh4f4zvYooxefJLLr3fdFv5M4FhuaG5k7UUPk3MniDZnlP5M2KDx0o0iH1pDpG3AIp0i1fnIfciDjpDXAEQ8JcyTKjQ4cK3bVNIQ85I--lXG50vPiuGq02Tzd4GMOeS8"";$Path="/";$Domain=".amazon.de", sess-at-acbde=""Gqr7cOwIX3Q39r2Y1T2H7dq3KGr2H/t+shx8hLYWsDM="";$Path="/";$Domain=".amazon.de"], content = null
2023-11-15 11:10:12.445 [TRACE] [pRequestBuilder$HttpResponseListener] - < GET to https://alexa.amazon.de/api/np/player?deviceSerialNumber=G091P3082196016C&deviceType=A1XWJRHALS1REP&screenWidth=1440: 200, headers = [Content-Type=application/json,Content-Length=1530,Connection=keep-alive,Server=Server,Date=Wed, 15 Nov 2023 10:10:12 GMT,x-amz-rid=6QXKDEZ503S3HGVK36XA,x-amzn-RequestId=75aba540-4813-47cc-b1f0-e8eff7f980a7,Vary=Content-Type,Accept-Encoding,User-Agent,Strict-Transport-Security=max-age=0; includeSubDomains;,X-Cache=Miss from cloudfront,Via=1.1 2d22bd8fe92380401bbc1d8cc010e5a0.cloudfront.net (CloudFront),X-Amz-Cf-Pop=MUC50-P3,X-Amz-Cf-Id=leOA2VkKTw-XJWlj1sW0r9eSYZFmsbBcTr4xArDHA59qzeS0OArQsA==], content = {"playerInfo":{"hint":null,"infoText":{"header":null,"headerSubtext1":null,"multiLineMode":false,"subText1":null,"subText2":null,"title":"DONAU 3 FM"},"isPlayingInLemur":false,"lemurVolume":null,"lyrics":null,"mainArt":{"altText":"Albumdesign","artType":"UrlArtSource","contentType":"image/jpeg","url":"https://donau3fm.s3.welocal.world/sources/61b8b02924f9d.png"},"mediaId":"ed94a6dc-421d-4e67-a12f-afe79abc31e4:1","miniArt":{"altText":"Albumdesign","artType":"UrlArtSource","contentType":"image/jpeg","url":"https://donau3fm.s3.welocal.world/sources/61b8b02924f9d.png"},"miniInfoText":{"header":null,"headerSubtext1":null,"multiLineMode":false,"subText1":null,"subText2":null,"title":"DONAU 3 FM"},"playbackSource":null,"playingInLemurId":null,"progress":{"allowScrubbing":false,"locationInfo":null,"mediaLength":0,"mediaProgress":44,"showTiming":false,"visible":true},"provider":{"artOverlay":null,"fallbackMainArt":{"altText":null,"artType":"IconArtSource","iconId":"music-no-art","iconStyles":null},"providerDisplayName":null,"providerLogo":{"altText":"","artType":"IconArtSource","iconId":"amzn1.ask.skill.ee41de77-0b3d-47a3-8c57-bc84063af441","iconStyles":null},"providerName":""},"quality":null,"queueId":"ed94a6dc-421d-4e67-a12f-afe79abc31e4","state":"PAUSED","template":null,"transport":{"closedCaptions":null,"layoutType":"MusicTransportLayout","lyrics":"HIDDEN","next":"DISABLED","playPause":"ENABLED","previous":"DISABLED","repeat":"HIDDEN","shuffle":"HIDDEN"},"upNextItems":null,"volume":{"muted":false,"volume":7}}}
==> /var/log/openhab/events.log <==
2023-11-15 11:10:12.459 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EchoBuro_Musikwiedergabe' changed from PLAY to PAUSE

Hi Jan,
have you received my logs via mail?
The last voice command isn´t working even with the new version.

Yet one stupid question. After you upload a new version, should I just remove and reinstall the binding via UI to get the latest version installed?

Same here - textToSpeech does not work with 4.0.2-SNAPSHOT

Hi all,
for those who have problems with the player channel or TTS (or may be with other things), try Logout and Re-register. That solved the problems for me.

3 Likes

Indeed that fixed it, thank you very much!