androidthings / sample-googleassistant

Google Assistant API sample for Android Things
Apache License 2.0
467 stars 147 forks source link

Having trouble with device actions #80

Open simplejeremy opened 6 years ago

simplejeremy commented 6 years ago

I'm trying to test the capability of controlling hardware (e.g. LEDs) on the board using Google Voice Assistant. When I give the commands "Turn on" and "Turn off" to control the LED using the NXP i.MX7D Starter Kit, I get "Sorry, power control is not yet supported."

The device has been registered using the registration UI and DEVICE_MODEL_ID was modified to match the device model ID from the webpage. I didn't modify DEVICE_INSTANCE_ID so the value is initialized to "PLACEHOLDER".

Fleker commented 6 years ago

Are the credentials on the device the same account as the device model you registered in the console?

simplejeremy commented 6 years ago

Yes, it uses the same credentials with the JSON file downloaded from my account.

Fleker commented 6 years ago

Have you enabled the OnOff trait for that device model id in the console?

Can you register a device with that device model id, and update the DEVICE_INSTANCE_ID constant?

simplejeremy commented 6 years ago

Yes, it's selected under "Supported traits" on the Linked device models webpage.

When I try to follow the instructions on this webpage to get DEVICE_INSTANCE_ID, I get stuck at where $ACCESS_TOKEN is written since my sample-googleassistant\app\src\main\res\raw\credentials.json doesn't contain the property with the key "token" in the string.

Fleker commented 6 years ago

If you re-authenticate the tool, then you shouldn't need to save it to the credentials.json