androidthings / sample-googleassistant

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

Assistant won't recognize device traits #55

Closed mrcartier closed 6 years ago

mrcartier commented 6 years ago

Using a python3 virtualenv & I registered several device traits. The model info returns:

(venv3) cartier@cartier-VirtualBox:~/venv3$ googlesamples-assistant-devicetool get --model my-model
Device Model Id: my-model
Project Id: my-id
Device Type: action.devices.types.LIGHT
Trait action.devices.traits.Brightness
Trait action.devices.traits.ColorTemperature
Trait action.devices.traits.OnOff

The device info returns:

(venv3) cartier@cartier-VirtualBox:~/venv3$ googlesamples-assistant-devicetool get --device my-id
Device Instance Id: my-id
Nickname: Assistant SDK light
Model: my-model

However, when I say "Ok Google, turn on." the assistant replies "Sorry, power controls is not yet supported." Is there some change/update I need to make to the credentials.json or somewhere else within the sample app? As best I can tell, the traits look OK, I haven't seen anything in the terminal of concern & the assistant responds fine to most requests...

Fleker commented 6 years ago

The sample app currently does not support the v1alpha2 endpoints, so things like device actions won't be supported as the v1alpha1 API does not support sending the necessary parameters in the request to make it work.

We're working on updating the sample. Until then, you may need to do the migration yourself by replacing the service proto and rebuilding.

Fleker commented 6 years ago

The sample is updated to v1alpha2, so now should support device actions.