Skip to content
This repository was archived by the owner on Aug 3, 2022. It is now read-only.
This repository was archived by the owner on Aug 3, 2022. It is now read-only.

Accessing pre-defined traits on Android Things #12

@PaulTR

Description

@PaulTR

https://codelabs.developers.google.com/codelabs/androidthings-assistant/index.html?index=..%2F..%2Fio2017#5

Running into some weird issues with step 5. Enabled traits in the console, ran through the terminal commands listed and authenticated, but any time I tell the device "turn on", it says power controls is not yet supported. Normal assistant commands (like 'what time is it') work as expected, and not seeing the traits in the list command, either, though I see them on the actions console page.

(env) ➜ MachineLearningDemo git:(master) ✗ googlesamples-assistant-devicetool --project-id ptr-machine-learning-demo list --model
Device Model ID: ptr-machine-learning-demo-machinelearningdemo-dvuzw4
Project ID: ptr-machine-learning-demo
Device Type: action.devices.types.LIGHT
No traits

After a while I created a new project because I messed up some stuff trying to work via the terminal, but managed to connect a device to the assistant with one model, then updated it via this command to enable traits.

googlesamples-assistant-devicetool --project-id project_id register --model model_id --product-name demolight --device instance_id --client-type SERVICE --type LIGHT --manufacturer test --trait OnOff

Kind of wonky, and not in the code lab, but it was the only way I could get things to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions