Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialogflow V2 API not supported #14343

Closed
oeN opened this issue May 8, 2018 · 14 comments · Fixed by #25975
Closed

Dialogflow V2 API not supported #14343

oeN opened this issue May 8, 2018 · 14 comments · Fixed by #25975

Comments

@oeN
Copy link

oeN commented May 8, 2018

Home Assistant release with the issue:

0.68.1

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.):

hassio version 1.3.0 on a Raspberry PI 2

Component/platform:

Dialogflow

Description of problem:
The new API V2 are not supported

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

dialogflow:
intent_script:
  GetTVState:
    speech:
      text: Return the tv state

Traceback (if applicable):

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 381, in start
    resp = await self._request_handler(request)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_app.py", line 322, in _handle
    resp = await handler(request)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 88, in impl
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/static.py", line 68, in staticresource_middleware
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py", line 27, in real_ip_middleware
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/ban.py", line 68, in ban_middleware
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/auth.py", line 52, in auth_middleware
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/view.py", line 104, in handle
    result = await result
  File "/usr/lib/python3.6/site-packages/homeassistant/components/dialogflow.py", line 63, in post
    response = yield from async_handle_message(hass, message)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/dialogflow.py", line 100, in async_handle_message
    action_incomplete = req['actionIncomplete']
TypeError: 'NoneType' object is not subscriptable

Additional information:
The payload dialogflow send when using the API V2 is quite different from the one with the V1

@dshokouhi
Copy link
Member

Isn't this more of a feature request since the first one is supported? Might want to consider closing this and starting a feature request in the forum.

https://community.home-assistant.io/c/feature-requests

@antoniosap
Copy link

i am on debug now on version V2, and have some error on responses

Webhook call failed. Error: Failed to parse webhook JSON response: Cannot find field: displayText in message google.cloud.dialogflow.v2.WebhookResponse.

@miticojo
Copy link

miticojo commented Aug 19, 2018

Until HA will not support V2, you can set agent to use V1 and let it works again - take a look on this:
https://dialogflow.com/docs/agents#settings
@dshokouhi at the moment I haven't seen any feature request for V2 so I will open it asap

@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@vyashub
Copy link

vyashub commented Oct 30, 2018

Setting agent to use V1 , worked for me, thanks @miticojo

@pratesbh
Copy link

Dialogflow API V1 is deprecated and will be shut down on October 23th, 2019.

@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@AlexGreenUK
Copy link

Is this still an issue you are experiencing? Can you please try upgrading to the latest version of Home Assistant (0.90) and report back if this is still a problem? Thanks!

@SteveEdson
Copy link
Contributor

Still an issue, docs say it only supports v1. Any plans to update for V2?

@stale
Copy link

stale bot commented Jul 13, 2019

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 13, 2019
@SteveEdson
Copy link
Contributor

As far as I can tell, this is still an issue, and shouldn't be marked as stale.

Thanks

@stale stale bot removed the stale label Jul 13, 2019
@gojimi
Copy link

gojimi commented Jul 17, 2019

Any new agents created on dialogflow now default to V2 with NO option to revert to V1. So this is now a bug report in my view not a feature request as the feature no longer works with newly added agents.

@werddomain
Copy link

Can't link dialogflow, error : Webhook call failed. Error: Failed to parse webhook JSON response: Expect message object but got: null.

@dedepene
Copy link

dedepene commented Oct 11, 2019

Now that V2 is the only option, I keep getting "Webhook call failed. Error: Failed to parse webhook JSON response: Expect message object but got: null."

Is this script supposed to work at all?

intent_script:
  GetTemperature:  # Intent type
    speech:
      text: We have {{ states.sensor.temperature }} degrees
    action:
      service: notify.notify
      data_template:
        message: Hello from an intent!
{
  "responseId": "0cebd4b5d-1dfddf-41c7-8efde8-e84c22fd60224c-f640fd6966",
  "queryResult": {
    "queryText": "what's the temperature at my house?",
    "action": "GetTemperature",
    "parameters": {},
    "allRequiredParamsPresent": true,
    "fulfillmentText": "Cannot connect to Home Assistant or it is taking to long”",
    "fulfillmentMessages": [
      {
        "text": {
          "text": [
            "Cannot connect to Home Assistant or it is taking to long”"
          ]
        }
      }
    ],
    "intent": {
      "name": "projects/test-iissffxjusk/agent/intents/43dsf1b4faa-187sdf3-4aesfde-aecfsd3-f7fddfs724960d",
      "displayName": "first intent"
    },
    "intentDetectionConfidence": 1,
    "diagnosticInfo": {
      "webhook_latency_ms": 581
    },
    "languageCode": "en"
  },
  "webhookStatus": {
    "code": 3,
    "message": "Webhook call failed. Error: Failed to parse webhook JSON response: Expect message object but got: null."
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.