我对物联网世界有点陌生,并试图了解一些有关 GCP 产品的知识。我制作了一个简单的 python 应用程序,它使用 PAHO 向 IOT 主题(GCP 中的 IOT Core)发送消息。显然,一切都很好。但我想知道是否可以在堆栈驱动程序上看到设备发送的消息的内容。
我已经为它启用了调试日志,但是消息没有出现。
在 stackdriver 中发布日志:
{
insertId: "78178yfwnl"
jsonPayload: {
eventType: "PUBLISH"
protocol: "MQTT"
publishFromDeviceTopicType: "EVENTS"
resourceName: "projects/demoiot/locations/us-central1/registries/iotchicago/devices/2753540639583"
serviceName: "cloudiot.googleapis.com"
status: {
code: 0
}
}
labels: {
device_id: "us_chi"
}
logName: "projects/demoiot/logs/cloudiot.googleapis.com%2Fdevice_activity"
receiveTimestamp: "2018-11-20T11:10:01.123928203Z"
resource: {
labels: {
device_num_id: "2753540639583"
device_registry_id: "iotchicago"
location: "us-central1"
project_id: "demoiot-223010"
}
type: "cloudiot_device"
}
severity: "DEBUG"
timestamp: "2018-11-20T11:10:01.104415969Z"
}