0
votes

I want to connect an external gateway which recieves data from mqtt devices to my google IoT Core.

In this picture you can find (more or less) a view of the project

Details of the project

Summarizing, I would like to connect the IoT Gateway of the prevous picture to Google IoT Core

I have seen a lot of examples about similar topics, but in noone I can find what I want to do.

It is possible to do it only knowing the host_name/endpoint of my google cloud account and put it in my getway to send data to that host?

How can I find my google cloud host_name/endpoint?

After putting the google cloud host_name/endpoint in the external gateway I will create the subscription in the IoT Core

If this is not the correct way, How I should do it?

Thanks!

1
most likely, you would first have to reserve and assign an external IP ...Martin Zeitler
Trying to understand what you're wanting to do. So you have a gateway device (maybe a Raspberry Pi or some similar 32-bit device) that has some number of other sensors/devices connected to it. You want to be able to take the data from the devices connected to the gateway device, and have the gateway device send the telemetry data up to IoT Core and your GCP project?Gabe Weiss
Thanks for the answers. I have attached a pic in the main post to see the project objective clearlyIoT user

1 Answers

0
votes

Assuming I'm understanding what you're wanting to do (simply connect your gateway device to IoT Core), check out this quickstart guide. It handles connecting a device to IoT Core. Then how you manage the different sensors behind it depends on what you want to accomplish. If you care about the data on a per device basis and need to keep it known what sensor is delivering it, I'd include a device ID in the telemetry payload from the sensor bundle to the gateway device in some fashion.

The gateway device, in whatever event loop it's receiving the telemetry from the sensors, is where you inject the publish code from the quickstart guide I linked to.

Note that there's no client SDK or library. IoT Core is a managed service, and provides a global endpoint (URL) to send telemetry data to. So as long as you can implement an MQTT connection on the gateway device, and can encrypt a JWT (Json Web Token), you can connect to IoT Core.