Amazon Echo SmartJ Binding Last Voice Command not working anymore

@berland , @Jagohu : Why do you prefer to poll continuously instead of one trigger item that is switched by Alexa? Polling causes constant traffic and even with 2 seconds you get quite different delays of openhab reactions.
I don’t see any disadvantage in using a connecting item that triggers the rule.

Just to give you a heads-up: I have made progress on this issue in the last days. There was quite some refactoring to do before it was possible to add the HTTP/2 connection, but that is what I’m currently working on.

11 Likes

To me it didn’t seem like Alexa would switch anything anymore. The LastVoiceCommand was just not updated at all without the bash script polling the Echo. I must have missed something if it works for everyone else - I didn’t get it what should trigger the update of this channel if the binding doesn’t work properly.

1 Like

At the moment the binding does not work but J-N-K is about to fix it :crossed_fingers:
In the meantime you can use the workaround:

  • create an item of type switch in OH
  • add Alexa metadata of type switch
  • add expire metadata (off after 1s)
  • call “Alexa search new devices”
  • create a routine in Alexa that is triggered by your voice command and then switches the (just found) device on
  • create the rule (either in the UI with JavaScript action (see my posts) or the text-based DSL version) in OH that is triggered when the item is switched on

It’s done in 5 minutes and better than constantly polling

Is there someone here that uses at least latest OH 4.1 milestone? I have something to test available. Please contact me by private mail. Thanks.

2 Likes

I do have the same issue with the PLAYER channel, which is responding very slow…
Does anyone have the same issue here?
I am using Openhab 3.4.2 on a RPI3b+ and AmazonEchonControl binding Version 3.4.2.

Already posted the problem here, but no solution.

Can someone tell me if

			<channel id="amazonMusicTrackId" typeId="amazonMusicTrackId"/>
			<channel id="amazonMusicPlayListId" typeId="amazonMusicPlayListId"/>
			<channel id="amazonMusic" typeId="amazonMusic"/>

these channels still work? I don’t use Amazon Music, so I don’t have playlists I could try with. They have been reported to be no longer functional in the past and are marked as “for future removal”. With the big changes I have made, it would be nice to solve that, too.

Had lots of issues with this one in the past (especially for the unpaid Amazon music user), so I just started using this instead and it’s worked for the last 3 years.

Echo_Guest_Bathroom_StartRoutine.sendCommand(‘play seventies’)

Best, Jay

1 Like

I have added the channel and an item for each to test but do not see any results/info populated when I start playing a song from my playlist. However, I am not sure if I have something wrong with my setup. Up until yesterday the workaround for the lastvoice command not working is no longer working for me (it was working really well before).

When pasting this into a browser I used to get the info required (last voice):
http://192.168.1.10:8080/amazonechocontrol/Amazon/PROXY/api/activities?startTime=&size=1&offset=1

I now get:

HTTP ERROR 500 org.openhab.binding.amazonechocontrol.internal.HttpException: GET url ‘https://alexa.amazon.co.uk/api/activities?startTime=&size=1&offset=1’ failed: Not Found

At the moment I am not sure if Amazon implemented more restrictions or if there is an issue with my setup. Is this still working for anyone else?

1 Like

Same here.

http://192.168.0.32:8080/amazonechocontrol/account1/PROXY/api/activities?startTime=&size=1&offset=1

Request failed
[Try again](http://192.168.0.32:8080/amazonechocontrol/account1)

This URL still works → http://openhabian:8080/amazonechocontrol/account1

Best, Jay

They switched the URL to www.amazon.co.uk/alexa-privacy/apd/rvh/customer-history-records?startTime=, You might run into trouble with the proxy here, because it always uses the Alexa API host as target, not the retail website. Unfortunately there is no easy fix for the proxy, since we can’t detect what the correct host is.

When I checked some days ago, they redirected to the new URL with 302, so maybe they removed that re-direction now.

Same here also.
If anyone has a workaround for the workaround :grin: or any suggestion/idea, I can help to test.

Same problem here

nooooo, not again…
I don’t see any other possibility yet to retrieve via API what I have said to my echos. Really hoping someone figures this out.

FYI, providers getting cut off also with last voice commands.

We’re writing to let you know that on October 31st, 2023 the Amazon Alexa service will no longer be available on IFTTT.

Amazon has made the decision to no longer support their integration on IFTTT. Like you, many of us here on the IFTTT team use the Alexa IFTTT integration daily for things ranging from controlling lights and music in our homes to integrating with task management apps to boost productivity. We were disappointed to hear about this change, we understand it is always difficult to see an existing service removed from IFTTT.

We encourage you to update your Alexa Applets to use alternative triggers prior to October 31st. You can find more information on how to update your Applets, as well as suggested alternative triggers here.

Starting November 1st, Applets that use the Say a specific phrase trigger will be migrated to instead use the IFTTT Button Widget. Applets that use any Amazon Alexa trigger other than Say a specific phrase or any Amazon Alexa query will be archived on October 31st if they are not updated to use a different trigger and/or query prior to that date.

  • IFTTT Community team

Good evening.

Those that are on OH 4.0.x or OH 4.1.0-SNAPSHOT (latest SNAPSHOT, M2 is NOT working):

  • Uninstall the old binding
  • Go to the karaf console and verify with list -s | grep amazon that it is really not installed.
  • Change the JSON 3rd-party marketplace URL:
    – OH4.0.x: https://download.smarthomej.org/addons.json|https://download.smarthomej.org/addons-beta.json
    – OH 4.1.0-SNAPSHOT: https://download.smarthomej.org/addons-snapshot.json|https://download.smarthomej.org/addons-beta.json
  • Install “SmartHome/J Amazon Echo Control Binding (beta)”
  • Go to http://<openhab>/amazonechocontrol, select your account
  • On the account page, “Logout” (upper right corner), log in again
  • Check if the account and all your amazonechocontrol things come online

Troubleshooting:

  • If the lastVoiceCommand still does not work: use “Logout and Re-register” on the account page. Log in again
  • If that still does not help, please use “Logout and Re-register”, the the binding to TRACE logging (you can do that on the bindings info page in the add-on store), log in and send the log to me.
  • If you encounter messages at ERROR or WARN level, please set the binding to TRACE logging and sent a log with the five request before the error to me.

Send logs to my email address github@klug.nrw. Your amazon password is nowhere in the logs. If all works fine for you, please report in this thread. After there is a new release of the add-on, please uninstall the beta and with back to the release. I’ll remove the beta downloads then.

12 Likes

Thank you very much!
The Binding works, but is still slow to update. When you change settings or update, e.g. DND mode or lastvoicecommand, the binding takes about 15 seconds and does not update immediately. Is it possible to make this work like it did before?
And the NotifyNowPlayingUpdated channel throws errors, see the email.

No, we don’t receive “activity ended” anymore, Amazon removed that event. We now try to guess from the beginning of the activity when it’ll end and request the activity afterwards.

In the account thing is a new configuration option for that time. The default is 10s, which may be too long for you. Lowering that time improves the response time but you might miss events that have very long questions or answers.

1 Like

First of all, thanks a lot for all your work.

I used this feature as a trigger for many many rules and am really wondering how this could be realized otherwise with a decent reaction time? Even going down to 5 seconds (which presumably would cause some trouble as described) would still be an awkward delay, e.g. when you want to switch on the TV?

Does anyone have any thoughts on that?

First of all - thanks a lot for your awesome work. LastVoiceCommand works for me, with the delay described.

I did not figure out how to change the JSON 3rd party marketplace URL, I downloaded manually the kar file from the link in the JSON. Maybe someone can point me to the proper way for this step.