-
-
Notifications
You must be signed in to change notification settings - Fork 187
AdvancedFeatures
This is a place to add guides for enhanced functionality for the custom skill.
A guide for adding the ability for the skill to detect who responded to it via your Alexa Voice Profile
BIG DISCLAIMER: Do not expect this feature to be flawless, I've personally witnessed it not working in a few occasions. As such, I will be unable to provide support if it does not recognize you. So your mileage may vary.
- Navigate to https://developer.amazon.com/alexa/console/ask and login with the same credentials you use for your Alexa devices.
- Choose the custom skill you created during the initial setup of the Alexa Actions.
- In the bottom left of the page you'll see
Permissions
. Please click it. - Once on the permissions page find 'Skills Personalization' and toggle it on.
- You're all done.
- Download the latest lambda_function.py (version 0.6.0 or newer)
- Setup as normal.
- Trigger an automation and respond as usual.
- You should now see event_person_id in the event payload. This can be used for automations.
- Log into Home Assistant and go to Developer Tools
- Click on Events
- In the
Listen to events
section (you may need to scroll down putalexa_actionable_notification
in the box and click start listening. - Trigger the skill and provide a response, you should see JSON code popup when you respond to the actionable notification.
- In that response you should see
event_person_id:
followed by amzn1.ask.person.averylongstringofnumbersandletters this is the person_id for the detected person. Repeat this for all other voices to get all the IDs. Once you have them you can use them in your YAML or NodeRed automations.
automation:
- alias: Front door left unlocked for 5 mins
trigger:
platform: state
entity_id: lock.front_door
to: 'on'
for:
minutes: 5
action:
- service: script.activate_alexa_actionable_notification
data_template:
text: 'The front door has been unlocked for 5 mins, would you like me to lock it?'
event_id: 'actionable_notification_lock_left_unlocked'
alexa_device: 'media_player.living_room_echo'
- alias: Lock the door via actionable notificaiton if specific person
trigger:
platform: event
event_type: alexa_actionable_notification
event_data:
event_id: actionable_notification_lock_left_unlocked
event_response: ResponseYes
event_person_id: amzn1.ask.person.averylongstringofnumbersandletters
action:
- service: lock.lock
entity_id: lock.front_door
A guide for adding additional voice responses to the custom skill. Please ensure that you have a fully functional version of the custom skill and actionable notifications before continuing.
- Navigate to https://developer.amazon.com/alexa/console/ask and login with the same credentials you use for your Alexa devices.
- Choose the custom skill you created during the initial setup of the Alexa Actions.
- Find under Slot Types
Selections
- Click on it and add each of the things you would like to say to the slot type.
- Click
Build Model
automation:
- alias: When the TV turns on, ask what you want to watch (Netflix, Hulu, YouTube)
trigger:
platform: state
entity_id: media_player.tv
to: 'on'
action:
- service: script.activate_alexa_actionable_notification
data_template:
text: 'I noticed the TV was turned on, what would you like to play, Netflix, Hulu or YouTube?'
event_id: 'alexa_notification_media_tv_select'
alexa_device: 'media_player.living_room_echo'
- alias: TV turned on and user wants Netflix
trigger:
platform: event
event_type: alexa_actionable_notification
event_data:
event_id: alexa_notification_media_tv_select
action:
- service: media_player.select_source
entity_id: media_player.tv
data_template:
source: "{{ trigger.event.data.event_response }}"
If you get an error with the skills response:
For the URL make sure you are using an external URL and not your personal internal IP that you use to access the HA dashboard.
Make sure you setup port forwarding to let HA communicate to outside your firewall.
Go to this video and watch how to port forward, create a URL, and setup the DNS in Home Assistant. https://www.youtube.com/watch?v=jkBcGl7Vq8s