Cannot Link to Google Assistant with SmartHome Local test washer project

38 Views Asked by At

I'm having a problem with the linking stage of the smarthome washer example for smart home local sdk example. I can run through all the setup and firebase deploy. Hosting URL and project console looks good. But when trying to add the device to my home on the home app (Pixel 7) I get an error.

I used the smarthome-local/app-done version of the code which I understand is complete. I can see my project ID in the .firebaserc no other

Ref. Step 3 'Link to Google Assistant' at https://developers.home.google.com/codelabs/smarthome-local#2

The error isnt very useful to me:

{
  "textPayload": "SYNC: Request ID 12803229277485576288 failed with code: BACKEND_FAILURE_URL_ERROR",
  "insertId": "ezfi4qg1z3h2ew",
  "resource": {
    "type": "assistant_action",
    "labels": {
      "action_id": "SMART_HOME_SYNC",
      "version_id": "",
      "project_id": "xxx"
    }
  },
  "timestamp": "2024-02-05T20:11:42.183479475Z",
  "severity": "ERROR",
  "logName": "projects/xxx/logs/actions.googleapis.com%2Factions",
  "receiveTimestamp": "2024-02-05T20:11:42.189264236Z"
}

{
  "insertId": "1kvsvg1fshwf36",
  "jsonPayload": {
    "syncLog": {
      "syncs": [
        {
          "requestId": "12803229277485576288",
          "httpLatencyMsec": "168",
          "status": "BACKEND_FAILURE_URL_ERROR"
        }
      ]
    }
  },
  "resource": {
    "type": "assistant_action_project",
    "labels": {
      "project_id": "xxx"
    }
  },
  "timestamp": "2024-02-05T20:11:42.409248756Z",
  "severity": "ERROR",
  "logName": "projects/xxx/logs/assistant_smarthome%2Fassistant_smarthome_logs",
  "receiveTimestamp": "2024-02-05T20:11:42.409248756Z"
}

The only change in the repo is this firebase.json which is:

{
  "database": {
    "rules": "database.rules.json"
  },
  "hosting": {
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  },
  "functions": [
    {
      "source": "functions",
      "codebase": "default",
      "ignore": [
        "node_modules",
        ".git",
        "firebase-debug.log",
        "firebase-debug.*.log"
      ]
    }
  ]
}

This says: https://developers.home.google.com/cloud-to-cloud/analytics/troubleshooting#platform_error_codes

Error Code Description BACKEND_FAILURE_URL_ERROR Google has received an HTTP 4xx error code other than 401 from your service.

                            Use the requestId in GCP Logging to check your smart home service logs.

I tried searching everything in my GCP logs, but can't find anything other than the log messages above.

The Cloud Functions log I can find doesnt contain the request ID, and is:

{
  "textPayload": "Function execution took 5 ms, finished with status code: 200",
  "insertId": "1sni6zif2ubxzq",
  "resource": {
    "type": "cloud_function",
    "labels": {
      "project_id": "xxx",
      "region": "us-central1",
      "function_name": "faketoken"
    }
  },
  "timestamp": "2024-02-05T20:18:45.493444252Z",
  "severity": "DEBUG",
  "labels": {
    "execution_id": "q9gjqrecpwh5",
    "runtime_version": "nodejs10_20240128_10_24_1_RC00"
  },
  "logName": "projects/xxx/logs/cloudfunctions.googleapis.com%2Fcloud-functions",
  "trace": "projects/xxx/traces/624f58b12b548e77a4dab7f8e60c78e2",
  "receiveTimestamp": "2024-02-05T20:18:45.822935863Z"
}

I tried following the example twice through. I can access the Hosting URL! And I can see the DB real time changes. I expected the test smart washer device to be added.

✔ Deploy complete!

Project Console: https://console.firebase.google.com/project/xxx/overview Hosting URL: https://xxx.web.app

I tried searching for the error code in general but nothing I can relate to BACKEND_FAILURE_URL_ERROR.

The home app just gives me the error "Could not reach test smart home washer. Please try again."

Any help greatly appreciated!

Thanks, B.

0

There are 0 best solutions below