简体   繁体   English

iot-smart-home-cloud(gcp 项目)注册的设备未出现在 flutter 应用程序和 Angular/web 中

[英]iot-smart-home-cloud (gcp project) registered devices not appear in the fluter app and in Angular/web

I have this issue open on github for 10 days: https://github.com/GoogleCloudPlatform/iot-smart-home-cloud/issues/20我在 github 上打开了这个问题 10 天: https : //github.com/GoogleCloudPlatform/iot-smart-home-cloud/issues/20

I can see the devices registered in the firestore(look photo below), but they do not appear on the mobile screen or in the Angular/web application.我可以看到在 firestore 中注册的设备(看下面的照片),但它们没有出现在移动屏幕或 Angular/Web 应用程序中。 In the latter case, the devices are correctly registered in the GCP/Cloud Iot Core Api/PubSub.在后一种情况下,设备已在 GCP/Cloud Iot Core Api/PubSub 中正确注册。

I already registered 1 device using the tutorial below, which also does not appear http://nilhcem.com/iot/cloud-iot-core-with-the-esp32-and-arduino我已经使用下面的教程注册了 1 个设备,它也没有出现http://nilhcem.com/iot/cloud-iot-core-with-the-esp32-and-arduino

How to solve?怎么解决?

在此处输入图片说明

在此处输入图片说明

Even though the error message in the screenshots mentions an issue with the authentication, the real error message was the "Device Not Found".尽管屏幕截图中的错误消息提到了身份验证问题,但真正的错误消息是“找不到设备”。

The issue was that the code was looking for a specific registry-device that didn't exist due to a mismatch in the registry name.问题是代码正在寻找由于注册表名称不匹配而不存在的特定注册表设备。

For reference, the configuration of the iot settings in firebase is mentioned in the step 3 of the quickstart :作为参考, 快速入门的第3步中提到了firebase中iot设置的配置:

Add your Cloud IoT Core project info as Firebase config environment variables:将您的 Cloud IoT Core 项目信息添加为 Firebase 配置环境变量:

 $ firebase functions:config:set \\ cloudiot.region=$REGION \\ cloudiot.registry=$REGISTRY

The Device Manager sample app you are working with registers the data scanned from a device QR code to the pending Firestore collection until until the backend can establish that the data provided matches an existing valid device in Cloud IoT Core (see the relevant code ).您正在使用的设备管理器示例应用将从设备 QR 码扫描的数据注册到pending Firestore 集合,直到后端可以确定所提供的数据与 Cloud IoT Core 中的现有有效设备相匹配(请参阅相关代码)。

If you are able to successfully register a device to pending but it's never removed from that collection, then the issue is in that code path somewhere.如果您能够成功将设备注册为pending设备,但它从未从该集合中删除,则问题出在该代码路径中的某处。 The cloud function logs should provide some insight into why your code is failing there (eg invalid credentials, bad configuration, etc.)云函数日志应该提供一些关于你的代码在那里失败的原因(例如无效的凭据、错误的配置等)

You might also find this blog post helpful, which overviews the architecture of the sample code's use case.您可能还会发现这篇博文很有帮助,它概述了示例代码用例的架构。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在GCP中托管我的Angular 4 Web App - How to Host my Angular 4 web App in GCP 如何从 Angular 9 web 应用服务访问 GCP Secret Manager - How to access GCP Secret Manager from Angular 9 web app service 滑块在Angular4 Web-App的主页组件中不起作用 - Slider not working in home component in Angular4 Web-App 将 Angular 项目 ARM 部署到 Azure Web 应用程序 - ARM Deployment of an Angular Project to Azure Web App 在Google云端存储桶上部署angular2 Web应用 - Deploying angular2 web app on google cloud buckets Angular - 如何在我的网络应用程序中创建持久/永久的“添加到主屏幕”按钮,就像Google Contribute一样 - Angular - How to create a persistent/permanent “Add to Home screen” button in my web app, just like Google Contribute 将Angular 6 Universal部署到GCP App Engine - deploying Angular 6 Universal to GCP App Engine web-app项目中Angular 13中的授权问题 - Problem with authorization in Angular 13 in web-app project 添加到主屏幕没有出现在我的角度应用程序上 - Add to home screen doesn't appear on my angular apps CORS GCP Cloud Run 后端 Flask 错误和 Angular - CORS Error in Flask Backend on GCP Cloud Run and Angular
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM