Amazon Echo SmartJ Binding Last Voice Command not working anymore

Noticed that I had the wrong version installed. Now everything is working perfectly. EXCEPT the textToSpeech, when I am sending something to the textToSpeech channel then the Alexa Device does not speak at all.

@J-N-K any idea what could cause this, or how I could help to pin point the reason for this ?

1 Like

That is one part I really do not understand. What system (RPi? Which one?) do you use? I have a similar report for the textCommand channel, which is handled by very similar code. However, both work perfectly fine for me.

Can you show the response that contains the history record? I don’t have a setup where two devices can hear me speaking.

Raspberry Pi 4 Model B Rev 1.4
Using openhabian
openHAB 4.0.4 - Release Build

This is how it looks like when checking the logs:

2023-11-27 17:40:54.038 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Fensterabfrage' received command ON
2023-11-27 17:40:54.040 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Amazon_Account_Refresh_Activity' received command ON
2023-11-27 17:40:54.372 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'AlexaTest_LetzterSprachbefehl' changed from uhrzeit to fensterstatus
2023-11-27 17:40:54.373 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Fensterabfrage' updated to OFF
2023-11-27 17:40:54.374 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Fensterabfrage' changed from ON to OFF
2023-11-27 17:40:54.438 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'AlexaTest_Sprich' received command <speak>Alle Fenster sind geschlossen.</speak>

I have added some logging. If you set the binding to TRACE before sending the command, you should see

18:24:08.268 | TRACE | OH-thingHandler-5    | ntrol.internal.connection.Connection | 285 | Executing textToSpeech TextWrapper{devices=[Device{accountName='Alexa Esszimmer', serialNumber='<redacted>', deviceOwnerCustomerId='<redacted>', deviceAccountId='<redacted>', deviceFamily='ECHO', deviceType='A2DS1Q2TPDJ48U', softwareVersion='9698494596', online=true, capabilities=[VOLUME_SETTING, DS_VOLUME_SETTING, DISPLAY_BRIGHTNESS_ADJUST, DISPLAY_ADAPTIVE_BRIGHTNESS, EARCONS, FLASH_BRIEFING, BT_PAIRING_FLOW_V2, I_HEART_RADIO, PERSISTENT_CONNECTION, GOLDFISH, ASCENDING_ALARM_VOLUME, ALEXA_VOICE, MUSIC_SKILL, TAHOE_BYOD, ALEXA_PRESENCE, PAIR_BT_SINK, TAP_GESTURES, MULTI_WAKEWORDS_SUPPORTED, TIDAL, EQUALIZER_CONTROLLER_MIDRANGE, FACE_TO_TALK, AMAZON_MUSIC, DEREGISTER_DEVICE, CLOCK_FORMAT_24_HR, SET_LOCALE, AUDIO_PLAYER, TIMERS_ALARMS_NOTIFICATIONS_VOLUME, SUPPORT_CALENDAR_ALERT, TEMPERATURE_SENSOR, MOTION_DETECTION, CHANGE_NAME, EFDCARDS, EQUALIZER_CONTROLLER_BASS, SOUND_SETTINGS, AUDIO_CONTROLS, DREAM_TRAINING, TIMERS_AND_ALARMS, TUNE_IN, DIALOG_INTERFACE_VERSION, PAIR_BT_SOURCE, DEEZER, APPLE_MUSIC, ADAPTIVE_LISTENING, SIRIUSXM, VOICE_TRAINING, SUPPORTS_CONNECTED_HOME_CLOUD_ONLY, SUPPORTS_LOCALE, SUPPORTS_SOFTWARE_VERSION, SLEEP, LEMUR_ALPHA, SALMON, SUPPORTS_LOCALE_SWITCH, LOCALIZATION, FAR_FIELD_WAKE_WORD, PANDORA, DISPLAY_POWER_TOGGLE, ACTIVE_AFTER_FRO, UPDATE_WIFI, POPTART, KINDLE_BOOKS, CUSTOM_ALARM_TONE, TUPLE, TUPLE_CATEGORY_A, GUARD_EARCON, SET_TIME_ZONE, SPEECH_RECOGNIZER_USS, ALEXA_GESTURES, EQUALIZER_CONTROLLER_TREBLE, REQUIRES_OOBE_FOR_SETUP, AUDIBLE, TAP_GESTURES_RESUME_MEDIA, GADGETS, TAP_GESTURES_SINGLE_TAP, REMINDERS, MOTION_SENSOR_RANGE_STRING, MICROPHONE, WAKE_WORD_SENSITIVITY]}], text='<speak>Alle Fenster sind geschlossen.</speak>', ttsVolumes=[null], standardVolumes=[25]}

Maybe we can find out what’s going on. To update to the new version:

Go to the console, type

update org.smarthomej.binding.amazonechocontrol https://download.smarthomej.org/org.smarthomej.binding.amazonechocontrol-4.0.2-SNAPSHOT.jar

Replace 4.0.2 with 4.1.0 if you are on 4.1.0-SNAPSHOT

I did the update. The lastVoiceCommand is back. :grinning: Therefore TTS has gone. :unamused:

The only suspicous messages I see are “Received a session closed for session XXX but the current session is YYY” with XXX and YYY being different numbers and in a few cases YYY=<not set>

Hi @J-N-K - here’s the output, where the Conservatory and Dining room speaker both hear a command:

15:13:49.663 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'alexa_refresh' received command ON
15:13:49.702 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'c_alexa_command' changed from alexa cancel to alexa lights off
15:13:49.887 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'd_alexa_command' changed from alexa cancel to alexa lights off
15:13:49.896 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'd_lights' received command ON
15:13:49.901 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'd_lights' predicted to become ON
15:13:49.947 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'd_lights' changed from OFF to ON
15:13:49.938 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'c_lights' received command ON
15:13:49.942 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'c_lights' predicted to become ON
15:13:49.947 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'c_lights' changed from OFF to ON

The device which chimed in confirmation was the Dining room speaker, not the Conservatory one, despite it being nearer. This is confirmed by the activity history from the Alexa app for the same event:
Screenshot 2023-11-28 at 14.34.45.jpeg

Updating to this version and everything works for me now. Should I still do a TRACE log for you?

But I ran into another issue, currently in my rule I am using the triggerItemName so the response is send to the correct Alexa Device. The issue now is that multiple Alexa Devices in different rooms picked up something and changed/updated aswell. The Device I was directly talking to was AlexaTestRaum1

2023-11-28 18:08:26.487 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Amazon_Account_Refresh_Activity' received command ON
2023-11-28 18:08:26.489 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Fensterabfrage' updated to ON
2023-11-28 18:08:26.491 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Fensterabfrage' changed from OFF to ON
2023-11-28 18:08:26.753 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'AlexaTestRaum2_LetzterSprachbefehl' updated to uhrzeit
2023-11-28 18:08:26.758 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'AlexaTestRaum2_LetzterSprachbefehl' changed from terrasse an to uhrzeit
2023-11-28 18:08:26.763 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'AlexaTestRaum3_LetzterSprachbefehl' updated to uhrzeit
2023-11-28 18:08:26.764 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'AlexaTestRaum3_LetzterSprachbefehl' changed from bĂŒro to uhrzeit
2023-11-28 18:08:26.765 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'AlexaTestRaum1_LetzterSprachbefehl' updated to uhrzeit
2023-11-28 18:08:26.765 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'AlexaTestRaum1_LetzterSprachbefehl' changed from fensterstatus to uhrzeit
2023-11-28 18:08:26.766 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'AlexaTestRaum4_LetzterSprachbefehl' updated to uhrzeit
2023-11-28 18:08:26.767 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'AlexaTestRaum4_LetzterSprachbefehl' changed from stopp to uhrzeit
2023-11-28 18:08:26.768 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'AlexaTestRaum2_LetzterSprachbefehl' updated to selbstzerstörung
2023-11-28 18:08:26.769 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'AlexaTestRaum2_LetzterSprachbefehl' changed from uhrzeit to selbstzerstörung
2023-11-28 18:08:26.771 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'AlexaTestRaum3_LetzterSprachbefehl' updated to selbstzerstörung
2023-11-28 18:08:26.771 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'AlexaTestRaum3_LetzterSprachbefehl' changed from uhrzeit to selbstzerstörung
2023-11-28 18:08:26.772 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'AlexaTestRaum1_LetzterSprachbefehl' updated to fensterstatus
2023-11-28 18:08:26.776 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'AlexaTestRaum1_LetzterSprachbefehl' changed from uhrzeit to fensterstatus
2023-11-28 18:08:26.779 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Fensterabfrage' updated to OFF
2023-11-28 18:08:26.779 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Fensterabfrage' changed from ON to OFF
2023-11-28 18:08:26.823 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'AlexaTestRaum2_Sprich' received command <speak>Folgendes Fenster ist offen: Test Zimmer 3 Fenster Rechts.</speak>

Any idea on how to fix this, or how I could ensure it gets the correct one ?

I think it is the same situation as here:

my app looks the same in the app it correctly showed that my voice command was for AlexaTestRaum1 and for all other devices it shows “Audio was not intended for this device”

Disabling and enabling the Amazon account brought lastVoiceCommand TTS back. :slight_smile: Yesterday I did the same without success. Very confusing. Now everything seems to work. :+1:

I just recognized an interesting log message, when adding something to the shopping list:

2023-11-28 18:33:06.402 [WARN ] [trol.internal.handler.AccountHandler] - Detected unknown command from activity stream: CommandTO{command='PUSH_LIST_ITEM_CHANGE', payload='{"listId":"YW16bjEuYWNjb3VudC5BRkpko2Sk5MSklYUTJVRFVXNkhVSDJBLVNIT1BQSU5HX0lURU0=","listItemId":"11245329-c222-4f09-acce-2586621c0ada","version":1,"eventName":"itemCreated","destinationUserId":"ABCDEFGHIJK"}', timeStamp=1701192786337}

My be it should suppressed.

As I already said: I need the response to /alexa-privacy/apd/rvh/customer-history-records. If the information cannot be seen from that response, we can’t do anything. Please send it to github@klug.nrw

Or added as a feature :slight_smile:

1 Like

@J-N-K Saved the response that you needed and send the email with the log. Let me know if I should do anything else.

@J-N-K

More debugging on this, I’m seeing this message sometimes on the OH Admin channel for lastVoiceCommand for my Echo (not the dot) when I actually asked for → TV Off <–.

Is this message baked into the code somewhere?

→ alexa yeah it is right now ←

My device isn’t even called Alexa, it’s called Echo so not sure where this is coming from?

Best, Jay

Yesterday i had to reboot the NanopiNEO3 because there was an update.
After the reboot TTS start to work again!!!
But last voice command works very strange way..
yesterday seems that was not working (i have covid again so no many energies to check)
today worked
 but i was in my room and i get answer from bathroom

But was sure that was the echo in my room that get the command because i have a routine that do a sound when echo receive this command (to avoid that alexa answer “i dont understand”) and the sound came from Echo in my room


Hi,

I implemented a workaround which principle is explained here:
This is neither pythonic nor openhabic but at least it works :woozy_face:

I have looked into that. It’s quite interesting, because you can see what items are added or removed from lists (e.g. your shopping list). I just don’t know a good way to present these things in openHAB, because we don’t have an item-type for lists.

I thought about a use case, but I didn’t found any. A first step could be to make a readable log entry.
There could also be channels like LastAddedListItem and LastRemovedListItem for using in rules. I am convinced that there is someone who can do something useful with it.

1 Like

It would be good, if you provide this version directly in the 3rd party add ons.
After updating to M4 LastVoiceCommand stopped working. I did all know steps to get it up. Nothing helped. Because of the rrd4j issue I downgraded to M3, but it didn’t solve it. Since two days I had no success with LastVoiceCommand. I set up a separate installation only for that. Also no success. Right now I saw that there is a newer version available, but that was no more in my mind. So I did the update. Because of several unusual log entries, I restarted openHAB and everything worked again.
I think you understand my suggestion. :slight_smile:

1 Like