googlesamples / assistant-sdk-cpp

Example of Google Assistant gRPC in C++
Apache License 2.0
96 stars 44 forks source link

How to get device_action from AssistResponse #72

Open maimang9 opened 4 years ago

maimang9 commented 4 years ago

First i have create some action for my device model with dialogflow. then I run run_assistant_text and config with my device model id & device instance id,
when enter my "training phrases" of the action , assistant response only "text response" of the action, no device_action response.

how can i get device_action response from assistant?

Fleker commented 4 years ago

You cannot send a device action from a conversational action. A device action is triggered directly, without having to go through the "talk to" invocation.

eron93br commented 4 years ago

@Fleker , does this implementation have some bult-in actions like the seven (brightness, colorSpectrum, colorTemperature, dock, OnOff, StartpStop, getTemperature) from Python implementation?

I'm trying to use this cpp implementation as same the Python SDK on Raspberry Pi.

toymak3r commented 4 years ago

@maimang9 any progress with this issue?

maimang9 commented 4 years ago

@toymak3r currently have no progress. i think device & device instance's action maybe not configure correctly?

toymak3r commented 4 years ago

I'm not sure if the problem are device/device action configuration. We have the same problem even using same device with same id/model_id that works with python sdk version.

toymak3r commented 4 years ago

@maimang9 after few days working on different part of code i returned today and got actions on response with CPP SDK example, i do not known why the Built-in Device Actions do not works but with custom actions worked as we needed.

use: response.device_action().device_request_json()

do not forget to change this values: kDeviceModelId and kDeviceModelId

if you do not already registered your device follows instructions: here and here

Here the useful link: https://developers.google.com/assistant/sdk/device-actions-overview