keatontaylor / alexa-actions

A README and associated code to get actionable notifications setup for Alexa devices.
GNU General Public License v3.0
399 stars 187 forks source link

[Bug]: French/CA working with French/FR ? #159

Closed MrDrew514 closed 1 year ago

MrDrew514 commented 1 year ago

Did you check our FAQ and Issue/PR for similar issues?

Contact Details

andrewberniergoupil@gmail.com

What happened?

I've been trying a few scenarios to make this work but without success so I'll explain my issue. My Alexa setup is French/Canada which is not available in the laguage list but French/FR (France) is there. So I gave FR/fr a try. Under that setup, I'm getting some Utterance Conflicts but I still continued the setup. The testing step was working in the develpper console. Configured the server ip and the token. Once I created the script and edited the skill id's, I couldn't listen to the event when executing the script even tho my media_player was correct nor I couldn't get the alexa echo to speak. So I deleted the skill and started everything again, this time selecting the English/US. Test was sucessful, edited the skill id, but once again I couldn't listen to the event when launching the script. Event was only triggered when testing in the developper console (US language) but nothing using the script and no sound was coming out of the echodot. So I'm really wondering what could be wrong ? Is it because my general setup is French/CA?

Version

last

What Alexa device are you using?

Echo

What other Alexa device are you using?

No response

Relevant log output

No response

DEADSEC-SECURITY commented 1 year ago

What is your alexa default language? @MrDrew514

DEADSEC-SECURITY commented 1 year ago

Also please post the logs from cloudwatch so i can better help you figure this out

MrDrew514 commented 1 year ago

The default language is set to French/Canada, CA/fr, I'll post the logs in a few mins.

If Alexa default langue is set to CA/fr, should I be using FR/fR or US for the setup?

MrDrew514 commented 1 year ago

Do I need to signup for the AWS to get the cloudwatch logs?

It seems like Echodot is not being called when executing the script. Did something change recently?

I came across this post, do you think it could be related?

image

DEADSEC-SECURITY commented 1 year ago

On the code editor in the top menu you can see cloudwatch logs, click it and it should take you to the logs.

MrDrew514 commented 1 year ago

So what happens is I'm able to get the text from the script (once executed in home assistant) on the 'Test' tab using the words 'actionable notifications', but the echodot speaker is not speaking.

In the Developer Tools > EVENTS, the event alexa_actionable_notification is not triggered when executing the script but it is working when I put the words 'actionable notifications' in the 'Test' tab.

image

Not error or warnings in the home assistant logs

Here are the cloudwatch logs:

image

START RequestId: e236349a-5152-45d7-8068-5db616964036 Version: 4
--
Locale is en
[INFO]  2023-01-11T16:17:46.911Z    e236349a-5152-45d7-8068-5db616964036    Locale is en
Session Ended Request Handler triggered
[INFO]  2023-01-11T16:17:46.913Z    e236349a-5152-45d7-8068-5db616964036    Session Ended Request Handler triggered
END RequestId: e236349a-5152-45d7-8068-5db616964036
REPORT RequestId: e236349a-5152-45d7-8068-5db616964036  Duration: 364.26 ms Billed Duration: 365 ms Memory Size: 512 MB Max Memory Used: 49 MB  Init Duration: 308.07 ms
START RequestId: bb0919aa-035e-45cc-8e11-be949a0437a5 Version: 4
Locale is en
[INFO]  2023-01-11T16:17:47.297Z    bb0919aa-035e-45cc-8e11-be949a0437a5    Locale is en
END RequestId: bb0919aa-035e-45cc-8e11-be949a0437a5
REPORT RequestId: bb0919aa-035e-45cc-8e11-be949a0437a5  Duration: 140.52 ms Billed Duration: 141 ms Memory Size: 512 MB Max Memory Used: 50 MB
START RequestId: 63db2b52-4792-49bd-8368-f158eacc949f Version: 4
Locale is en
[INFO]  2023-01-11T16:22:10.444Z    63db2b52-4792-49bd-8368-f158eacc949f    Locale is en
Session Ended Request Handler triggered
[INFO]  2023-01-11T16:22:10.444Z    63db2b52-4792-49bd-8368-f158eacc949f    Session Ended Request Handler triggered
END RequestId: 63db2b52-4792-49bd-8368-f158eacc949f
REPORT RequestId: 63db2b52-4792-49bd-8368-f158eacc949f  Duration: 251.32 ms Billed Duration: 252 ms Memory Size: 512 MB Max Memory Used: 50 MB
START RequestId: cb0957dd-20de-4865-81da-1e267db14462 Version: 4
Locale is en
[INFO]  2023-01-11T16:22:10.745Z    cb0957dd-20de-4865-81da-1e267db14462    Locale is en
END RequestId: cb0957dd-20de-4865-81da-1e267db14462
REPORT RequestId: cb0957dd-20de-4865-81da-1e267db14462  Duration: 81.39 ms  Billed Duration: 82 ms  Memory Size: 512 MB Max Memory Used: 50 MB

Thank you very much for the support

DEADSEC-SECURITY commented 1 year ago

What do you mean with Test tab? Did you try triggering the media_player with the skill id and checking if the echo dot speaks? Using developer test tab wont make it speak in your alexa.

MrDrew514 commented 1 year ago

I'm sorry if I wasn't clear; I get the even triggered when I enter the 'actionable notification' (invocation name) in the Amazon Dev Test tab (Where we initially test the skill) doing this sends an event trigger in home assistant but when I run the script in home assistant with the right skill_id, the echodot does not speak. My alexa is set to CA/fr (French Canadian) and I'm using the Nabu Casa alexa

DEADSEC-SECURITY commented 1 year ago

Are you logged in to you amazon account in HA? Can you share the code or print of what you did to trigger the skill via HA?

MrDrew514 commented 1 year ago

Home Assistant is connected to my Amazon account with Nabu Casa and I'm using the token method which is working.

Script used

input_text: image

script.yaml image

when I call the service image

there is nothing in the event image

When I enter 'actionable notifications' in the amazon dev 'test tab', Alexa respond with the text from the service called. image

and the event is now showing image

DEADSEC-SECURITY commented 1 year ago

Lets forget the dev tools from amazon cuz that doesn't help. Can you try putting quotes around the text? Can you delete all the logs in cloudwatch run the service one time and send me the new logs? I want to make sure that the service is calling the skill properly.

MrDrew514 commented 1 year ago

I deleted all the logs in cloudwatch and I ran the script. It seems like no new logs are created.

I'm getting an error message accessing the cloudwatch logs which says

User: arn:aws:sts::270144201668:assumed-role/VoiceHubSSORole/VoiceHubSSORole is not authorized to perform: cloudwatch:GetMetricData because no identity-based policy allows the cloudwatch:GetMetricData action

AWS logs, I feel like there is a permission problem

image

MrDrew514 commented 1 year ago

I think Nabu Casa is causing this.. It seems like it's not giving me the right permission to access the AWS services. Let me try the normal way and I'll get back to you asap.

MrDrew514 commented 1 year ago

So I started from scratch with a different amazon account without Nabu Casa, and I'm still having the same issue where the script is not executing the audio, and no log is being generated in the cloudwatch logs.

Can it be because my Alexa is set to Canada/French and the skill is set to US/English ?

MrDrew514 commented 1 year ago

UPDATE: I finally got it working using English/US with both skill and EchoDot. My echodot was set to French/CA or English/CA and it wasn't working. Once I changed my device language to US/English, it worked and I was able to hear it on the speak and the event was triggered.

Working method; I had to enable local support for other languages, manually add the language and the intents you want with the good pronounciation and build the models. Thank you very much for the support given.

It would be gladly appreciated if you can add CA/fr to the repo as it's the same as the Fr/fr one. thank you.