Alexa smarthome skill routines - alexa

I need to create an Alexa smart home skill. I would like to control my lights using Alexa device. But based on my understanding, smart home skill only support utterances like this
Alexa, turn on name
Alexa, turn off name
Alexa, set name to x percent
Alexa, brighten name
Alexa, dim name
Alexa, dim name by x percent
Alexa, brighten name by x percent
Alexa, set name to x degrees
Alexa, decrease name by x degrees
Alexa, increase name by x degrees
Alexa, decrease name
But, my use cases is little different.
Alexa, turn on the kitchen light.
Alexa, dim the bedrromlight to 50%
Alexa, turn on the halllight for 3 hours
Alexa, set a daily timer for the testlight to turn on every day at 9am
Alexa, how dim is the bedrromlight right now?
Is smart home skill is suited for my use cases?

This will work fine today with a Smart Home Skill:
Alexa, turn on the kitchen light.
Alexa, dim the bedroomlight to 50 %.
You can use a routine for this (but Routine's can't currently be created using voice, only in the companion app):
Alexa, set a daily timer for the testlight to turn on every day at 9am
These are not currently supported by Alexa:
Alexa, how dim is the bedroomlight right now?
Alexa, turn on the halllight for 3 hours.
You could build a Custom Skill for these two use cases, or simply wait for Amazon to implement them. If it were me, I'd focus on the core use cases that already work using a Smart Home Skill and not waste time on a Custom Skill. You can't integrate Custom Skill stuff with Routines, for example.

I guess this is not only related to the specific Smart Home Skill. The user could give the different located devices (f.e. your lights) names like kitchen light and he could assign the different Smart Home devices to rooms.
Further more the user is also able to create groups with several devices in it so you could say:
Alexa, turn on the kitchen
and all related lights will switch on.
The user is also able to create routines in the Alexa app in your case:
switch the testlight on at 9 am every day.
This could probably not be done by voice but in the app.
So Alexa Smart Home should be fine for use case.

Related

Skill under development not available on all Alexa devices

I am building a piggy bank skill for my kids (no plans to publish it yet). After completing development, the skill immediately became available in my phone's Alexa app and one of two Alexa devices I own (both Echo Shows). Whenever I ask the non-functioning Echo Show ask piggy bank, it replies with I can't do that but for other ideas you can say, Alexa, open Amazon Kids. What could prevent a skill from being available on one but not being available on another device?
Answering my own question in case someone else runs into the same issue... It took me many hours to figure out the problem, even built a second skill and performed a full factory reset. The clue that ultimately led me down the right track was the Amazon Kids part of Alexa's response. On said device I had Amazon Kids enabled because it is in our family room, and I re-enabled it right away after the full factory reset. After disabling it, the skill under development started working as intended.

Maximum duration of user speech input in seconds for Amazon Alexa skill

I am creating an Amazon Alexa skill and would like to know the maximum duration of user input in seconds that a slot can hold. More specifically the AMAZON.SearchQuery type slot.
I'm not sure there is an official answer to this anywhere in public docs, but I don't think you'll be able to capture more than a few seconds (~8 max ?) of input. Plus if Alexa detects the user is done speaking, she will stop listening and process the utterance. Even a slight pause could be interpreted as the end of speech input.
I don't know your particular use case, but given all that, I would not recommend that slot type as a reliable way to capture long transcriptions. I don't believe there is a good way for skills to do at all currently.
This Amazon Lex blog is from 2017. I don't know if it will still work, but you can give it a shot.
Capturing Voice Input in a Browser and sending it to Amazon Lex

Can an Alexa skill keep the microphone always on?

I have been a C/C# developer for many years but haven't written any Alexa apps. I would like to write a skill to listen for baby babble (NOT WORDS) and respond in different ways. I would like my Alexa skill to keep the microphone ALWAYS on (similar to how "Alexa, Guard" works) because babies speak randomly.
Is there some sample code I can look at?
You can't do this.
There is no way to keep the microphone open with a custom skill.
When you activate the skill "open my skill", Alexa starts talking and then, when she stops, you have only 8 + 8 seconds to speak, otherwise, the session will be closed.
So you have 8 seconds, then if you don't speak there is a re-prompt phrase asking you to tell something, and another 8 seconds where you can speak.
If you don't, the session will be closed.
There is a way to keep the session open more than 8 seconds (playing some mute music for example), but the problem remains because you can only speak after that "music" is finished.

Developing an Alexa skill with custom wait time after re-prompt

I am trying to develop an alexa skill with a custom delay time. Currently, whenever a user asks a question, Alexa responds to it and waits for 8 seconds. After this, there is re-prompt speech (if present) and Alexa again waits for 8 seconds. This 16 second wait is followed by session closure.
I want to keep the re-prompt text to be active even if the user does not ask anything after 16 seconds time out. Is it possible?
This is not currently possible because Alexa will wait for a maximum of eight seconds before closing the session. You can add a re-prompt to reminder a user that a response is required to continue with the skill interaction, but it is not allowed to leave the session open for an undefined period of time. This enables the user to ask for different skills and first party features without closing a skill manually every time.
As with natural conversation, if the Alexa service thinks a question asked is misunderstood or confusing, re-prompts allow Alexa to clarify and reformulate a question to get the answer Alexa is seeking. Shorten a re-prompt for brevity when a customer is familiar enough with the context of a conversation that they won’t need the entire prompt again immediately. The key is that you provide enough information to guide the customer, understanding that you are essentially 8 seconds away from losing that connection if they don’t know how to answer. While re-prompts must be understandable, they provide an opportunity to expand on the initial request to get the conversation moving.
You can find additional info here:
https://developer.amazon.com/en-US/docs/alexa/alexa-design/available.html

Any mobile-friendly Credit Card billing solutions for mobile sites similar to Bango?

Are there any mobile-friendly Credit Card billing solutions for mobile sites similar to Bango?
The advantages of Bango I have seen compared to regular Credit Card solutions that make it considerably "mobile-friendly" are:
1) It does not require the user to enter their full name and billing
address to make a payment. The user is only required to enter their
Credit Card number, expiration date, and CVC code (if they are in
the U.S., they will also have to enter their Zip Code). That is significantly less input than is normally required for Credit Card payments, which is a big plus on small mobile key pads.
After a user makes an initial Credit Card payment, their details
are stored by Bango, and the next time the user needs to make a
payment with the same Credit Card, they just have to click a single
link and it processes the payment on their stored Credit Card.
Needless to say, this is very convenient for mobile users as it is
analogous to Direct Carrier Billing as far as the user is concerned since they won't need to input any details.
The downside with Bango is that their fees are higher than others, all payments must be processed via their site and branding, there is a high minimum ($1.99) and a low maximum ($30) on how much you can charge users, and you need to pay a monthly fee on top of the high transaction costs.
It is due to the downsides mentioned above that I am looking for an alternative solution that also does the advantages 1) and 2) above. Is there anything like that? I looked at JunglePay and they do neither 1) nor 2).
We, Balanced, have simliar functionality to what you're looking for. Card number, and expiration are the only required information. However the more information you gather the better that fraud detection can happen, only asking for the minimum could open you up to chargebacks and the cost associated with them.
The second requirement you mention is a feature called card tokenization and most card processors should support this functionality.
Balanced is not inherently mobile focussed. It's a REST API so whatever you serve to the customer is up to you. You, as the developer, would create a webpage that takes in the card information, tokenizes it securely, and then submits the token to your server where logic in your application makes the charge whenever you're ready.

Resources