assistant-sdk-cpp icon indicating copy to clipboard operation
assistant-sdk-cpp copied to clipboard

How to get device_action from AssistResponse

Open maimang9 opened this issue 4 years ago • 6 comments

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?

maimang9 avatar Mar 11 '20 06:03 maimang9

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.

Fleker avatar Mar 11 '20 14:03 Fleker

@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.

eron93br avatar Mar 11 '20 15:03 eron93br

@maimang9 any progress with this issue?

toymak3r avatar Mar 16 '20 19:03 toymak3r

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

maimang9 avatar Mar 17 '20 03:03 maimang9

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 avatar Mar 17 '20 11:03 toymak3r

@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

toymak3r avatar Mar 25 '20 15:03 toymak3r