shivasiddharth / GassistPi

Google Assistant for Single Board Computers
Other
1.02k stars 304 forks source link

Error after saving credentials #116

Closed wpa-2 closed 6 years ago

wpa-2 commented 6 years ago

After running " sudo /home/pi/GassistPi/scripts/gassist-installer-pi-zero.sh "

Everything installs fine but then i get this.

credentials saved: /home/pi/.config/google-oauthlib-tool/credentials.json Usage: googlesamples-assistant-devicetool register-model [OPTIONS]

Error: Missing option "--type". Choose from LIGHT, SWITCH, OUTLET.

Im using a pizero.

shivasiddharth commented 6 years ago

Did you modify the script ? Because straight-away it will work without issues, because i have declared the type in script.

wpa-2 commented 6 years ago

Nope i have not modified anything in the script.

shivasiddharth commented 6 years ago

Open a terminal, move into the environment using: source env/bin/activate and then execute:

googlesamples-assistant-devicetool register-model --manufacturer "Pi Foundation" \
          --product-name $prodname --type LIGHT --model $modelid

make sure to change $prodname (roduct name) and $modelid (model-id). You can find your model-id in a text file in home/pi/ directory.

wpa-2 commented 6 years ago

(env) $ googlesamples-assistant-devicetool register-model --manufacturer "Pi Foundation" \ --product-name $prodname --type LIGHT --model $modelid Error: --model option requires an argument

shivasiddharth commented 6 years ago

That is what i asked you to do, change the product name and model-id and not just paste the code. You can find your model-id in a text file in home/pi/ directory.

wpa-2 commented 6 years ago

googlesamples-assistant-devicetool register-model --manufacturer "Pi Foundation" \ --product-name REMOVED --type LIGHT --model REMOVED

Usage: googlesamples-assistant-devicetool register-model [OPTIONS]

Error: Missing option "--product-name".

shivasiddharth commented 6 years ago

What product name did you use ?

wpa-2 commented 6 years ago

rock-objective-167517

shivasiddharth commented 6 years ago

You cannot use '-', numbers in product name. Here is some material for reference https://developers.google.com/assistant/sdk/reference/device-registration/device-tool Try "Test Lamp" . Since the name has space, you need to have them within quotes.

wpa-2 commented 6 years ago

Well that's what i got from the text file called modelid.txt in home/pi/ as you mentioned. SO how would i fix it ?

shivasiddharth commented 6 years ago

What you have in the text file is called model-id not product name. Please read through the comments carefully. I said, that model-id will be in the text file.

wpa-2 commented 6 years ago

I give up, i'm going to reflash and start again. Thanks for the help you might as well close this.