no welcome intent in smart home action, is it normal - actions-on-google

{
"actions":[
{
"name":"actions.devices",
"deviceControl":{
},
"fulfillment":{
"conversationName":"automation"
}
}
],
"conversations":{
"automation":{
"name":"automation",
"url":"https://echo.goodk2.com:8000/GoogleHomeNew/konke.do"
}
}
}
It's my action.json as same as official smart home document. No welcome intent in it.
Everything is ok in mobile app. But test in Simulator, I say "talk to smart k ", it always responds "Sorry, this action is not available in simulation" (debug info is empty).
Is it normal?

For Smart Home actions, you don't talk directly to the Action. Instead, you use the normal Smart Home commands that Google Home understands to change the settings of the devices you control.
So this behavior sounds correct.

Related

Google Action prompt link url on Webhook response not working as expected

I am trying to add a prompt link to my Google Action:
https://developers.google.com/assistant/conversational/reference/rest/v1/TopLevel/fulfill#link
My response looks like this:
payload.prompt.link = {
name: 'Open My Website',
open: {
url: 'https://mywebsite.com'
}
}
When testing on my Nest Hub, the link does show as a suggestion on the bottom of the page. However, when I click on it, it simply sends it as an utterance to my Action instead of open the web page.
Any idea why this is happening? And what is the expected behavior for prompt links? I cannot find much documentation on them.
This appears to be the Actions Builder implementation of Link-Out Suggestions, which were not originally available when the Actions Builder was released. They were, however, available for Dialogflow previously.
Link-Out Suggestions require the "WEB_LINK" device capability to work. Smart Displays do not have this device capability.

Actions on Google Simulator not working

I follow the actions on Google instruction, just have one action which is the default welcome intent.
I always get this error when I type "talk to XXX ".
Also, I tried the google smart home action example, I could see my devices on mobile assist APP - home control, but I had some error when I test on the simulator like "turn on my lights".
Anyone know what could cause this issue? Thanks!
{
"response": "We're sorry, but something went wrong. Please try again.",
"expectUserResponse": false,
"conversationToken": "",
"audioResponse": "",
"visualResponse": {
"visualElementsList": [
{
"displayText": {
"content": "Sorry, this action is not available in simulation"
}
}
],
"suggestionsList": [],
"agentLogoUrl": ""
},
"clientError": 4,
"is3pResponse": false
}
UPDATE
Hi, this issue is fixed. It is because APP activity control is turned off by the company account Administrator, even though I enabled web & App activity on my account.
When you are simulating a conversational action, are you making sure that the project is currently in a 'test draft' state? You may want to disable and re-enable testing by clicking on the testing button in the top right corner of the console.
If you are testing a smart home action, you can't make calls such as "talk to X" as there is no conversational entrypoint for a smart home action. However, after you do account linking commands like "turn on lights" should correctly send the command to your endpoint only for the currently tested action.

Still cannot find google action using Action SDK on Google Home App

I am developing a Google Smart Home App, and I follow the official development document.
Create my project in Google Console
'gactions update --action_project action.json --project {myproject}'
Complete the necessary information,including App Information, Account Linking;
'gactions test --action_project action.json --project {myproject}'
I have tried many times, even I used the other accout, and created it. But the result was same that my smart home app still not appear in my google home.
Someone said they created their app, and it would appear in Home Control section like [test]{project_name} after 'gactions test'. But it not work for me. It is very frustrated. And This step has blocked my further work for many days.
Further more, I want to confirm the following question:
When I created my smart home app, the section is like this:
Actions added from Actions SDK
Actions: (this place is emtpy, is it normal? or lack of something like agent or else)
The Smart Home App in test mode, it is required that voice-only conversations with the Google Home speaker, or directly appear in Google Home App after 'gactions test'?
Any help will be appreciated!
My action.json: { "actions": [{ "name": "actions.devices", "deviceControl": { }, "fulfillment": { "conversationName": "automation" } }], "conversations": { "automation" : { "name": "automation", "url": "https://xxxxx" } } }
running it the first time could be a bit painful. Below is what I do to get it working.
Make sure you have filled in all details on the action console.
Click on the Test button to start your app.
From the simulator, type Talk to . It might ask you to login.
If you can see the response from your app. Then it should work on your google home.
Please note that your test app will expire if you leave it idle for too long. You need to click on the test button to run it again or your google home won't be able to lunch your app.
Also, in your action.json, if you are pointing your intend to a webhook, please make sure your webhook is accessible from google.

Action console asking for "app information" for "smart home app" and no "actions" listed under "actions added from actions SDK"

I created a project for smart home app. My action package is like this:
{
"actions":
[
{
"name": "actions.devices",
"fulfillment":
{
"conversationName": "automation"
}
}
],
"conversations":
{
"automation":
{
"name": "automation",
"url": "endpoint url here"
}
}
}
As you can see, it is for smart home. But I am still asked to fill in the pronounciation for the app name in the app information. This is weird, because a smart home app doesn't need to be called like talk to Blah Blah Blah. You just need to enable it under home control > add devices. So, why do I need to fill in the pronounciation? Does this mean the action console didn't recognized it as a smart home app?
Another thing is, I don't have any actions listed under Actions added from actions sdk. Is this the normal for smart home app? The docs didn't explain that much so I really don't know what really is correct.
Yes both of these behaviors are expected. You should be able to register your devices with the Google Home app and then control them with the Assistant.
As it stands, the Actions on Google console does not give any visual special considerations for Smart Home projects, so it will still look for things like actions and pronunciation. But if you can sync your devices using the app, then you will see that your Smart Home action is recognized.

Initiating a phone call

Is it possible yet to initiate a phone call? E.g. if I'm making a branch finder action a dialogue might go like:
"Hi, where's my nearest store?"
"Your nearest store is our Oxford Street branch, at 300 Oxford St, Marylebone."
"Call it"
"Sure"
It then initiates a call to the store, like an Android app using an ACTION_DIAL intent.
I would think something like this should be possible, especially considering the current devices supporting Assistant are phones and Google Home, both of which can make calls (I guess future devices with assistant built in might not, but then there can be a check like app.phoneCapabilities). I've tried using .addSuggestionLink with a tel: address with no luck.
I actually made a dodgy work around for this, if anyone comes back to this and is interested.
You can suggest a webpage URL, which can be a page which has a tel: link from there. Either using server side work or just simple JavaScript (mine uses simple JavaScript), you can update the link.
My link is below - feel free to use it, I use it in my app. It's pretty basic, the documentation is in the comments:
https://domdomegg.github.io/linkgenerator?href=tel%3A%2B442070313000&bgcolor=607d8b&buttontext=Click%20to%20call%20Google
For starters, the Google Home cannot (yet) make calls. That feature was announced at I/O and will be rolling out later this year. It is not yet known if there will be API access to that feature when it does roll out. (There is certainly potential for abuse of the feature, although there are some ways that can mitigate that abuse.)
I haven't tested, but I'm a little surprised that the tel: url form didn't work since I thought that would just launch an intent on Android (tho I don't know how iOS would handle it) and tel: goes to the dialer intent.
You can show a call button which will redirect to the specified number on the dialer app.
Here's a way to do that from fulfillment response:
"buttons": [
{
"title": "Call",
"openUrlAction": {
"url": "tel:+91123456789",
"androidApp": {
"packageName": "com.android.phone"
},
"versions": []
}
}
]
Add this JSON to your response and it will show a button which will redirect to default call app and shows +91123456789 number filled.
EXTRA
Similarly, if you want to send mail then you can add:
{
"title": "Send Mail to Jay",
"openUrlAction": {
"url": "mailto:Jp9573#gmail.com",
"androidApp": {
"packageName": "android.intent.extra.EMAIL"
},
"versions": []
}
}