Problem with Openhab/openhab-google-assistant

Hi, i have Problems following the instructions:

What i have done:

  1. Create a project
    https://cloud.google.com/functions/docs/quickstart

  2. Activate the cloud function api
    https://cloud.google.com/functions/docs/quickstart

  3. Installed SDK on rp
    https://cloud.google.com/sdk/docs/

  4. gcloud init

gcloud init

My Settings now

Settings from your current configuration [default] are:
core:
  account: *****gmail.com
  disable_usage_reporting: 'True'
  project: long-carving-*******

The next step not work:

cd openhab-google-assistant/functions
gcloud beta functions deploy openhabGoogleAssistant --stage-bucket staging.<PROJECT ID>.appspot.com --trigger-http

I cant find the path “cd openhab-google-assistant/functions”

and the next step gets an error:

ERROR: gcloud crashed (IOError): [Errno 13] Permission denied: '.rnd'

If you would like to report this issue, please run the following command:
  gcloud feedback

To check gcloud for common problems, please run the following command:
  gcloud info --run-diagnostics

I run gcloud init as the user pi, without sudo…

Any ideas ?

Ok, I’m progressing

i git clone to

/var/lib/openhab2/openhab-google-assistant

change the dir to

/var/lib/openhab2/openhab-google-assistant/functions

and got another error:

BucketNotFoundException: 404 gs://staging.long-carving-190619.appspot.com bucket does not exist.
ERROR: (gcloud.beta.functions.deploy) Failed to upload the function source code to the bucket gs://staging.long-carving-190619.appspot.com/


Ok, i have to activate the App Engine on the google Cloud Plattform and now:

gcloud beta functions deploy openhabGoogleAssistant --stage-bucket staging.<PROJECT ID>.appspot.com --trigger-http
...
Copying file:///tmp/tmpjbmp_C/fun.zip [Content-Type=application/zip]...
/ [1 files][  8.2 KiB/  8.2 KiB]
Operation completed over 1 objects/8.2 KiB.                                     
Deploying function (may take a while - up to 2 minutes)...done.
availableMemoryMb: 256
entryPoint: openhabGoogleAssistant

:slight_smile:

After enabling a lot of things in the google cloud / action console almost everything worked, only the oauth2 setup not work or i dont understood what i have to do…

:frowning:

Maybe look at:


I just wait for the review process from google
Think this will be more future-proofed.

regards
Tom

I am experiencing the same problem and I am at your point where you say “I git clone to…” Can you be more specific? (“I git clone to” … and… “change the dir to”) What were your exact commands, please?

Sorry, i give it up. I dont know the commands any more, i buy the alexa :wink:

In any directory where you are happy to store a temporary copy of the openhab-google-assistant repository:

git clone https://github.com/openhab/openhab-google-assistant
cd openhab-google-assistant/functions

Perfect… Thank you…

1 Like