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

Instructions what to do after reinstalling HA #194

Closed honkerst closed 1 year ago

honkerst commented 1 year ago

Is your feature request related to a problem? Please describe. I've had Alexa Actions working for a couple of years. After being forced to reinstall HA (long story) it no longer works. Instead of asking me an unprompted question, Alexa just says "There is a problem with the requested skills response".

Describe the solution you'd like Instructions on what to do in this situation. I thought I could go into Alexa somewhere and edit the account linking or token, but the UI was clearly designed by engineers and is pretty hard to use. So I'm probably doing it in the wrong place, or perhaps it just doesn't work. I've tried to go through the instructions to find the point where authorisation takes place but the instructions have changed dramatically since I set mine up. There are now installation steps that I'm 100% sure I never did when I was installing.

I'm also not sure what we are supposed about updates. Are there updates? e.g. what to do when for instance Alexa Actions updates the lambda. Should I be updating mine?

Describe alternatives you've considered Wiping everything and starting again. However it's not very clear how to do that either.

Additional context Add any other context or screenshots about the feature request here.

capdeveloping commented 1 year ago

@honkerst i installed this yesterday for the first time but went in the same problem. The readme doesn't explain that your input_text. ... need the exact input what it is inserted later from alexa. Your input_text should have this as text:

{"text": "{{ text }}", "event": "{{ event_id }}", "suppress_confirmation": "{{ suppress_confirmation }}"}

Maybe explain where exactly you stopped and what have you done.

honkerst commented 1 year ago

I haven't done anything yet, other than go into Alexa dev console and try to 'relink' the skill. When I relink it opens up my HA installation, and everything appears to be working, but nothing changes. I still get "There is a problem with the requested skills response" from Alexa and an accompanying error message in the HA log "Login attempt or request with invalid authentication from ec2-54-155-134-11.eu-west-1.compute.amazonaws.com (54.155.134.11). See the log for details."

xhemp commented 1 year ago

I have the same issue, I can't get the script part working. Alexa Media Player is fine as I can play trigger any other skills (Question of the day, for example), I believe the skills is also fine as the first test (input_text ) was also ok. Skill ID, etc is all good too. I can't see any logs, though, when I try to trigger the script from HA which is very odd.

DEADSEC-SECURITY commented 1 year ago

@xhemp can you send your script, input_text of HA and anythign else that could be helpfull?

xhemp commented 1 year ago

Hi @DEADSEC-SECURITY! Sure thing, I pasted them here:

https://pastebin.com/A5hbMQzS

Tried to activate the service on different echoes to no avail, echoes are working fine as I can play anything on them:

service: script.activate_alexa_actionable_notification data: text: Yes or no? event_id: alexa_actionable_notification_test alexa_device: media_player.my_echo_goes_here

Let me know if you need anything else I might have forgotten.

DEADSEC-SECURITY commented 1 year ago

Hi @DEADSEC-SECURITY! Sure thing, I pasted them here:

https://pastebin.com/A5hbMQzS

Tried to activate the service on different echoes to no avail, echoes are working fine as I can play anything on them:

service: script.activate_alexa_actionable_notification data: text: Yes or no? event_id: alexa_actionable_notification_test alexa_device: media_player.my_echo_goes_here

Let me know if you need anything else I might have forgotten.

Mind trying this? https://github.com/keatontaylor/alexa-actions/discussions/197#discussioncomment-6530070

xhemp commented 1 year ago

Sure! It works fine, I can send that to any echo. The fact that it says there could be something misconfigured on the HA side is weird, I have followed the instructions to the letter. I also tried to refollow the steps and recreate everything but I always get stuck at the script side. I do have Alexa enabled with Smart Skill so it can reach my HA with no issues at all.

DEADSEC-SECURITY commented 1 year ago

Can you try triggering alexa with out the script but with the same logic. Put some test data into the helper variable, then trigger the service to start the skill via the dev tools. If that works, then it could be an issue with the script it self.

DEADSEC-SECURITY commented 1 year ago

@honkerst to link the account you need to use the alexa app in your phone. Select the skill and then should have some button to link it up with HA

xhemp commented 1 year ago

Can you try triggering alexa with out the script but with the same logic. Put some test data into the helper variable, then trigger the service to start the skill via the dev tools. If that works, then it could be an issue with the script it self.

Just tried that, I can't trigger that skill but can trigger others if I need to. To add: I've tried with the long lived access token and with account linking but the result is the same. I didn't mean to hijack @honkerst 's thread so if you need , I can open another issue for this and copy my findings.

honkerst commented 1 year ago

@honkerst to link the account you need to use the alexa app in your phone. Select the skill and then should have some button to link it up with HA

OMG, this was what I forgot to do. I did this and everything works again. It's been so long since i first set this up, I totally forgot about the Alexa app. Thanks!