Amazon EchoControl LastVoiceCommand doesn't update anmore

Continuing the discussion from Amazon Echo SmartJ Binding Last Voice Command not working anymore:
I use (openHAbian running OH4.1.3) the LastVoiceCommand for multiple use cases, mainly

  • saving the last text if it contains a key word and let it play, if front door is opened
  • using it to update my shopping list (as amazon shut down the shoppinglist-API, I’d like to manually update my ShoppingList via openHAB: OH listens to the lastVoiceCommand and uses an API to update my Shopping List)

for the last use case, this would be interesting:

but: for the time being: I don’t get the LastVoiceCommands from the binding. Is the issue still open or did amazon permanently change something?

with the binding from JNK on smartHomeJ you can get the lastVoiceCommand. But before that you have to trigger the refresh activity channel of the bridge thing.
So one solution is to trigger a connected switch within an Alexa routine. Then you can react on the change of a lastVoiceCommand item within an openhab rule.

2 Likes

Thanks for that. Do I have to replace (aka remove the core-binding and then re-instate the SmarthomeJ-AddOn) it, or can I “migrate” somehow?

yes, uninstall is recommended.
it’s described here:

I think if you use the same UID everything should be restored as before.

1 Like

The URL is always https://download.smarthomej.org/addons.json for all supported versions.

2 Likes

found time to remove the “normal” binding and install the SmarthomeJ variant. All my things and items came back:

openhab> list -s | grep amazon
342 x Active x  80 x 4.1.0                  x org.smarthomej.binding.amazonechocontrol

What do you mean with “trigger refresh activity channel”? I added an item to the refresh activity and send “ON” to it, but i still don’t get the LastVoiceCommands. What did I miss?
I’m still on 4.1.3

Would be interested if you can solve it. Have the same problem :slight_smile:

You will need a dummy routine as described here:

Logging out and re-registering solved it in my case:

Troubleshooting:

If the lastVoiceCommand still does not work: use “Logout and Re-register” on the account page. Log in again
1 Like

Hello, I have been using version 4.2.1 since its launch and I have been using TextCommand and LastVoiceCommand for a long time. Unfortunately, since yesterday morning, the TextCommand command no longer works. Does anyone else have this problem?

yes, as I encountered some issues with my setup I found your entry here. I don’t find any ERROR or something in the logs. It just won’t do…
(I’m still on 4.2.0, openHABian on Pi4).

FYI
I restarted my installation (openhabian on RPI 4) and everything works again!?

That’s always a good idea. Sometimes Amazon changes things on their servers and a reconnection fixes it.

1 Like

I had already implemented the ‘refreshActivity’ workaround a long time ago and it worked. Unfortunately, this has stopped working for many months now. I didn’t have time to deal with it. Until now. Unfortunately, I can no longer get it to work.

The dummy switch is set to ‘ON’ and the binding calls the REST service at Amazon. However, this does not work and ends after several attempts with a ‘400 Bad Request’. The “lastVoiceCommand” is not updated.

Need help :cry:

Amazon logout and re-register: no effect
amazonSite = ‘amazon.de’ and ‘amazon.com’: no effect
Restart openhab: no effect
Reinstall binding: no effect
openHAB Version 4.2.2: no effect
openHAB Version 4.3.2: no effect

My current setup:
openHAB 4.3.2
4.3.0.202501181532 org.smarthomej.binding.amazonechocontrol
Release = Raspbian GNU/Linux 11 (bullseye)
Kernel = Linux 6.1.21-v8+
Platform = Raspberry Pi 4 Model B Rev 1.5

.thing

Bridge amazonechocontrol:account:account1 'Amazon Account' @ 'Accounts' [amazonSite='amazon.com', email='xxxxxx@mail.org', password='abcdef', pollingIntervalInSeconds=30]
   Thing echo echo_living 'Alexa' @ 'Living room' [serialNumber='abcdef']

.item

String Echo_Living_Room_LastVoiceCommand { channel='amazonechocontrol:echo:account1:echo_living:lastVoiceCommand'}

LOG

2025-01-18 18:26:20.640 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Amazon_Refresh' received command ON
2025-01-18 18:26:20.716 [TRACE] [pRequestBuilder$HttpResponseListener] - < GET to https://www.amazon.de/alexa-privacy/apd/rvh/customer-history-records?startTime=1737221060644&endTime=1737221210644&maxRecordSize=1: 400, headers =
2025-01-18 18:26:20.717 [DEBUG] [pRequestBuilder$HttpResponseListener] - Retrying call to https://www.amazon.de/alexa-privacy/apd/rvh/customer-history-records?startTime=1737221060644&endTime=1737221210644&maxRecordSize=1
2025-01-18 18:26:22.718 [TRACE] [rol.internal.util.HttpRequestBuilder] - > GET to https://www.amazon.de/alexa-privacy/apd/rvh/customer-history-records?startTime=1737221060644&endTime=1737221210644&maxRecordSize=1, 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], cookies = [at-
2025-01-18 18:22:47.015 [TRACE] [pRequestBuilder$HttpResponseListener] - < GET to https://www.amazon.de/alexa-privacy/apd/rvh/customer-history-records?startTime=1737220840656&endTime=1737220990656&maxRecordSize=1: 400, headers = 

2025-01-18 18:22:47.016 [INFO ] [ntrol.internal.connection.Connection] - getting activities failed
org.smarthomej.binding.amazonechocontrol.internal.ConnectionException: https://www.amazon.de/alexa-privacy/apd/rvh/customer-history-records?startTime=1737220840656&endTime=1737220990656&maxRecordSize=1 failed with code 400: Bad Request
	at org.smarthomej.binding.amazonechocontrol.internal.util.HttpRequestBuilder$HttpResponseListener.onComplete(HttpRequestBuilder.java:385) ~[?:?]
	at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:218) ~[?:?]
	at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:210) ~[?:?]
	at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:481) ~[?:?]

additional info: some times the request leads to a http 429 reponse and HTML is sent back:

    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
        <title>Seite wurde nicht gefunden</title>
        <style type="text/css">
            a:link { font-family: verdana,arial,helvetica,sans-serif; color: #004B91; }
            a:visited { font-family: verdana,arial,helvetica,sans-serif; color: #996633; }
            a:active { font-family: verdana,arial,helvetica,sans-serif; color: #FF9933; }
        </style>
    </head>
    <body bgcolor="#FFFFFF" text="#000000" style="font-family: verdana,arial,helvetica,sans-serif;">
        <!--
            Um über den automatisierten Zugriff auf Amazon-Daten zu sprechen, wenden Sie sich bitte an api-services-support@amazon.com.
Weitere Informationen über die Migration zu unseren APIs finden Sie in unseren Marketplace APIs unter https://developer.amazonservices.com/ref=rm_5_sv bzw. in unserer Product Advertising API, wenn es sich um Anwendungsfälle im Rahmen von Werbung handelt: https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html/ref=rm_5_ac.
        -->
        <center>
            <a href="/ref=cs_404_logo">
                <img src="https://images-eu.ssl-images-amazon.com/images/G/03/ShoppingPortal/logo._TTD_.png"
                     alt="Amazon" border="0"/>
            </a>
            <table border="0" align="center" style="margin-top: 20px;">
                <tr>
                    <td>
                        <img src="https://images-eu.ssl-images-amazon.com/images/G/03/x-locale/common/kailey-kitty._TTD_.gif" width="40" height="35" border="0">
                    </td>
                    <td>
                        <b style="color:#E47911">Suchen Sie etwas?</b>
                        <br/>
                        Tut uns leid.  Die eingegebene Webadresse ist keine funktionsfähige Seite auf unserer Website.
                        <br/><br/>
                        <img src="https://images-eu.ssl-images-amazon.com/images/G/03/x-locale/common/orange-arrow._TTD_.gif" width="10" height="9" border="0">
                        <b><a href="/ref=cs_404_link">Klicken Sie hier, um zur Amazon-Startseite zurückzukehren.</a></b>
                    </td>
                </tr>
            </table>
        </center>
    </body>
</html>

In the last few weeks, I didn’t have time to deal with the topic. When I looked at my system again, I was very surprised. Everything works as it should. The last voice command is stored in openHAB when refreshActivity is executed. I have NOT changed anything on the system. All very strange. Anyway, the main thing is that it works now. :tada:

1 Like

Markus, is lastVoiceCommand working for you?

After some back and forth, it’s running with my system (OH 4.3.1 on openHABian on a Pi4/4GB) with the in the initial post linked Marketplace-version fine since December I think. Everything works as expected, even all WARNs or ERRORs are gone.

In the meantime it work’s for me - most of the time :thinking: Some times the error message from Amazon appears in my logs and it does not work. It is not really reasonable why and when this happens. In a nutshell: the binding itself work like it should, but Amazon not :smiling_face_with_tear: