Friday, December 18, 2020

Amazon Alexa Smart Home Skill

To unlock, Alexa will require a 4 digit voice personal identification number for unlocking. Configure a 4 digit PIN in the Alexa app to unlock locks. The “dim” utterance will decrease the brightness of a light 25 percentage points. If the cover does not support tilt, all semantics “raise”, “lower”, “open”, “close” are assigned to the position functionality. Use the Entity Customization Tool to override the device_class attribute to correctly expose a cover to Alexa.

home assistant make alexa speak

You can push the virtual bulb to Alexa with the Nabu Casa cloud or use the Emulated Hue. The Dummy light to item select script will trigger the input select once the brightness level is triggered by the Alexa app. Now, you have created the Lambda function, but before you can test it, you have to set up the necessary aspects of your Home Assistant configuration. Put the following minimal configuration into your configuration.yaml file. It will expose all of your supported devices and automations to Alexa.

Alarm Control Panel

The timer entity can not include the word "timer" in the friendly name. Only temperature sensors are configured at this time. FAN_ONLY is not supported by the Alexa voice model and is shown as OFF in the Alexa App. Use the Entity Customization Tool to override the device_class attribute to expose a binary_sensor to Alexa.

home assistant make alexa speak

Next you need to copy the ARN displayed in the top of the page, which is the identity of this Lambda function. You will need this ARN to continue Alexa Smart Home skill configuration later. Finally go to newly created skill details page then proceed to Code tab and replace lambda_function.py with the code below. You can test this by adding the input select to you Lovelace screen. You can test each line to ensure the sentence is correct.

Amazon Alexa Smart Home Skill

Covers with a device_class of garage support the Open by Voice PIN feature in the Alexa app. Configure a 4 digit PIN code to open the garage door in the Alexa app. Enable preload stream option for cameras used with echo devices to reduce response time, and prevent timing out before the 6 second limit. To use the existing code configured for the Alarm Control Panel the code must be 4 digits and the code_format attribute must be number.

home assistant make alexa speak

With the light set to off, alexa announces the script with unknown brighness. However, if the light is set to on, I get this error. The entity list contains all the entities you wish to parse .

I want to build custom commands to use with Echo

Adjusting the brightness slider plays the phrase. Yes, I have deleted and move the brightness phrase to different position and it’s the same result. Disable and re-enable the skill using the Alexa App; then restart Home Assistant.

Semantics are assigned based on the features supported by the cover. Covers should be configured with the appropriate device_class. Each Echo device will need the communication and Announcements setting enabled, and the Do Not Disturb feature turned off. Device_classAlexa Sensor TypedoorContactgarage_doorContactopeningContactwindowContactmotionMotionpresenseMotionAsk Alexa for the state of a contact sensor.

Home assistant automatons do not allow the use of any persistent data. So, this project uses two Input selects to hold the data. Activate scenes with scene name, or “turn on” utterance. Home Assistant does not support deactivate or “turn off” for scenes at this time. Display category will default to CAMERA to enable presence detected notification settings in the Alexa App. Each Echo device will need the communication and Announcements setting enabled, and the Do Not Disturbed feature turned off.

I thought I’d figured out the pattern but I’m still confused. What’s really weird is that amzn_sfx_trumpet_bugle_04 works but not amzn_sfx_trumpet_bugle_03, which is in the same soundlibrary path. I really hope that you find this information useful and you now know how to control and use your Alexa and Home Assistant. I cannot keep up lately, so I decided to change the focus of this blog from Smart Home tutorials to Birds Watching tutorials.

I have not added anything to Emulated Hue file. This is my current input_select file and I can playback all except the brightness. I have tried different room light and all same. If the light is turned off, alexa will play the message with the brightness set to unknown. If the light turn on, no announcement and I see that error in log. If the climate entity supports on/off, use “turn on” and “turn off” utterances with the entity name or the mode utterance.

Your Lambda function will deliver the response back to Alexa. The last step is simply expose the virtual bulb to Alexa and trigger it with the Alexa routine in the phone app. I added this part of code in automation.yaml and my code editor (notepad++), complained about the spacing as you can see with the screenshot. If you require an attribute not listed above use the attribute number as listed in the developer tools states attribute column . The first attribute of an entity will be 0 the second will be 1 up to 9 the tenth attribute of the entity. This script simplifies the tasks of passing entity details for Alexa to speak using the brilliant Alexa speech module.

Amazon Alexa Custom Skill

After discovery, the Alexa app will offer the ability to use the existing code, or create an additional 4 digit PIN to use with Alexa. To limit which entities are being exposed to Alexa, you can use the filter parameter. Keep in mind that only supported platforms can be added. Click Functions in the left navigation bar, to display the list of your Lambda functions. The first thing you need to do after signing into the AWS console is to create an IAM Role for Lambda execution.

home assistant make alexa speak

AWS has very strict access control, so you have to specifically define and assign the required permissions. You first need to sign in to your AWS console, if you don’t have an AWS account yet, you can create a new user here with 12-month free tier benefit. The Lambda function will then deliver the response back to the Alexa Smart Home skill. Sound encoder forces 16k sample rate as a safe fallback for older devices. Do some testing to find out if your device is capable to play 24k and alter that setting according to the research result.

Input Number

In the next step we will do some “real” developer work. Keep Alexa Developer Console open, we will need to change the skill configuration later. Since our logic triggers on text_input change it can be started from any other place and not necessarily manually. You can implement a standard HA script to set entity state that will trigger our TTS or use it in automation and so on. We will add a media player in the Home Assistant dashboard that can control Alexa and it has enabled TTS (Text-To-Speech) field. Alexa app can see the binary_sensor, it’s state changes when i open the door, but the Routine refuses to trigger.

home assistant make alexa speak

Type desired skill name… but it doesn’t really matter. Just ensure options Custom model and Alexa-Hosted are selected. Alter hosting region (top-right corner) according to your location to get better responsiveness of the service.

No comments:

Post a Comment

Modern kitchen ideas: 35 contemporary designs for a kitchen

Table Of Content Install eye-catching brass hardware Cozy White Kitchen Incorporate Glass Let the Light Pour In Curved Seating Nook and Tiny...