google-cloud-iot

How can an IoT device upload a file to the cloud?

怎甘沉沦 提交于 2021-01-29 10:42:48
问题 Is it possible for an IoT device on Google Cloud Platform to upload a file to the cloud somehow? In this case it's not exactly a telemetry data publishing. A direct access to the bucket could be useful. Either that or access to my AppEngine-based application, but if I upload it to my app (that will in the next step put the file into a bucket), how can I possibly authenticate the device to make sure that the device that sends it to me is actually the device it claims to be? 回答1: How big of a

Google Cloud IoT - Invalid MQTT publish topic

非 Y 不嫁゛ 提交于 2021-01-28 04:25:14
问题 I am using a Python client with paho-mqtt to publish in this specific topic of Google Cloud IoT: projects/my_project/topics/sm1 . My code is below, based on examples of the Google IoT documentation: import paho.mqtt.client as mqtt import ssl, random, jwt_maker from time import sleep root_ca = './../roots.pem' public_crt = './../my_cert.pem' private_key = './../my_pr.pem' mqtt_url = "mqtt.googleapis.com" mqtt_port = 8883 mqtt_topic = "/projects/my_project/topics/sm1" project_id = "my_project"

Google Cloud IoT - Invalid MQTT publish topic

ぐ巨炮叔叔 提交于 2021-01-28 04:00:56
问题 I am using a Python client with paho-mqtt to publish in this specific topic of Google Cloud IoT: projects/my_project/topics/sm1 . My code is below, based on examples of the Google IoT documentation: import paho.mqtt.client as mqtt import ssl, random, jwt_maker from time import sleep root_ca = './../roots.pem' public_crt = './../my_cert.pem' private_key = './../my_pr.pem' mqtt_url = "mqtt.googleapis.com" mqtt_port = 8883 mqtt_topic = "/projects/my_project/topics/sm1" project_id = "my_project"

Google iot MQTT - ESP32 Connects the first time and only reconnects after 30m

烈酒焚心 提交于 2020-05-16 22:34:45
问题 I'm working with google Iot cloud with ESP32, I am sending fake values just to make a test with the MQTT data PUB/SUB, Apparently I'm succeeding in publishing the values, sometimes, I can't reconnect to google iot. I don't know why it keeps checking wifi...publising and doest check for the JWT key. I have noticed that if I connect once to the google iot and then I unplug the esp32 from my pc (disconnect no power), and plug it back again and try to connect, I will enter in this "checking wifi"

Google IoT - Right mode to receive notifications (subscribe working)

跟風遠走 提交于 2020-01-24 01:05:29
问题 I am following this tutorial and I already have my code publishing messages to /devices/sm1/events topic, in which sm1 is my device id. I would like to know how to subscribe to this topic since the tutorial says to use /devices/sm1/config but I am getting empty messages. I already tried use the same "path" used in publishing ( /devices/sm1/events ), but it also did not work. It is strange that the name I gave to the topic was sm1 and the topic associated to my device is on GoogleIoT console

Google iot core connection status

依然范特西╮ 提交于 2020-01-02 09:59:26
问题 I am using Google IOT core with mongoose os. I wanted to update device connection status to firestore. But i am unable to find event which reports mqtt connection status to pub/sub like when device disconnects or reconnect i.e if device is offline or not. I am stuck on this problem for days.Any help will be appreciated 回答1: Update As @devunwired mentioned in this response it is now possible to monitor Stackdriver logs for disconnect events. You must have at a minimum enabled INFO level

Digitally signing a device public key with CA certificate

我怕爱的太早我们不能终老 提交于 2019-12-25 00:18:56
问题 I'm trying to register an IoT device with Google Cloud IoT Core, and I'm having issues signing the device public key with a CA certificate installed on Google Cloud (device registry). Following are Google's requirements: CA and device certificates must be X.509v3, encoded in base64, wrapped in -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----. CA certificates do not need to be self-signed ("root CA"); device certificate must be signed by a specific CA certificate at the registry level

Integrating MQTT with GCP using IOT adapter and google pub/sub api in python

蹲街弑〆低调 提交于 2019-12-22 01:14:42
问题 Integration with Cloud Pub/Sub APIs from App Engine Standard I am working on developing a Google app engine app in standard Python environment. For some portions of the code, I need to integrate with Google Cloud pub/sub APIs. As mentioned here, Pub/Sub can only be integrated in the App Engine flexible environment (BTW it is also only in alpha). Can someone please describe how to integrate with Pub/Sub in the App Engine Standard environment? My use case description I am trying to integrate

Google apis node library - cloudiot missing

╄→尐↘猪︶ㄣ 提交于 2019-12-11 15:19:34
问题 I was looking for a way to manage cloud iot core devices with google cloud functions. After days of testing I can't figure out how I can add a device to a registry. I have tried to install googleapis module on my pc with npm but I can't find cloudiot core in the apis directory while there is on github (the version of the installed package is 22.2.0 but on github is 22.3.0). Any ideas ? How can I install the latest version ? 回答1: Update It appears that currently, when you don't explicitly load

GCP IoT Error on sending new device configuration: “Error 413 (Request Entity Too Large)!!”

删除回忆录丶 提交于 2019-12-11 14:55:29
问题 I'm trying to send my GCP IoT device a new configuration. The Base64-encoded binary string is approximately 15k bytes in length. GCP IoT device config size limit is 64k according to the docs. But I'm still getting a 413 (request entity too large) error. What am I doing wrong? 15k seems incredibly tiny to be producing such an error. Thanks for any help. Here's the JavaScript code that sends the config data: sendDeviceConfig(deviceId, configPayload) { const parentName = `projects/${this