Hi guys
I have a problem configuring this component.
Everything is done exactly as described in the lesson. But regardless of the value of ‘async_action’ api.ai always falls on timeout.
api.ai Fulfillment: webhook url is
https://{myhass}.duckdns.org/api/apiai?api_password={myhasspwd}
Values of Intent, Action and User says all set to Summary Use webhook is checked
Seems like the api is working to me. My guess is there is something wrong with the config you did on the api.ai site. My config is like the following:
Fullfillment -> Webhook
Enabled button on
URL: https://{{DOMAIN}}/api/apiai
BASIC AUTH: empty
HEADERS: x-ha-access {{PASSWORD}}
Content-Type application/json
DOMAINS: Disable webhook for all domains
In my Intents I have in the Response a Text Response “Cannot connect to HA or it is taking to long” and below that in the Fullfilment section I have the “Use Webhook” checkbox checked.
I had a similar issue. In my case it was Cloudflare causing the problem between api.ai and home assistant and was fixed by adding a page rule that turned “Browser Integrity Check” to Off.
Many things have changed since the last attempt.
There was a complete reinstallation of HASS, installed a couple of updates, router was reset to factory defaults.
But now api.ai is working correctly.
I tried that, but get this error: 2017-08-23 07:00:35 ERROR (MainThread) [homeassistant.config] Invalid config for [apiai]: not a valid value for dictionary value @ data['apiai']. Got OrderedDict([('intent_script', OrderedDict([('Garage', OrderedDict([('speech', "The Status of Garage is {{states('cover.garage_door')}}")]))]))]). (See /home/homeassistant/.homeassistant/configuration.yaml, line 132). Please check the docs at https://home-assistant.io/components/apiai/
My configuration is simple, like below
intent_script:
Garage:
speech: The Status of Garage is {{states('cover.garage_door')}}```
Same here… need help 2017-08-22 23:45:58 ERROR (MainThread) [homeassistant.config] Invalid config for [apiai]: not a valid value for dictionary value @ data['apiai']. Got OrderedDict([('intents', OrderedDict([('GetTemperature', OrderedDict([('speech', "We have {{ states('sensor.citronnier_temperature') }} degrees"), ('async_action', False), ('action', OrderedDict([('service', 'notify.notify'), ('data_template', OrderedDict([('message', 'Api.ai has send a request')]))]))]))]))]). (See /home/homeassistant/.homeassistant/configuration.yaml, line 126). Please check the docs at https://home-assistant.io/components/apiai/
Configuration:
apiai:
intents:
GetTemperature:
speech: We have {{ states('sensor.citronnier_temperature') }} degrees
async_action: False
action:
service: notify.notify
data_template:
message: Api.ai has send a request
First off you did put “intent” instead of “intent_script” like stated in the component page. Next you put it under apiai altough it clearly is next to it not indented in the example.
You are right. The example is correct, however, I can see how I got it wrong.
Pays to just copy and paste from the component page rather than typing it in.
It also worked for me taking the example at home assistant api.ai component page.
The customizations I’ve made to make it work were:
My endpoint isn’t SSL secured. So I pointed to the unsecure address em added on headers KEY = x-ha-access, value = MYPASSWORD.
Changed the example to match the sensors I have in my setup.
At this point I can write asking the temperature of my house on api.ai console and the answer is returned.
Is anybody using this with Google Assistant? I would like to know how to connect this apiai project I’ve created with my google assistant instance running on my Raspberry Pi. As far as I remember in order to trigger this apiai project I have to say “hey google, test app”, and this is something I would like to avoid.