- My goal is:
To create a Google Cloud IoT Core MQTT Gateway which will be used to send sensor data from multiple devices to a PubSub topic and ultimately a Firebase Realtime Database.
I am developing this project using multiple ESP32. I am trying to utilize 2x ESP32 for the sensor devices and 1x ESP32 for the gateway device. All are using Mongoose OS JS-enabled firmware from https://github.com/mongoose-os-apps/demo-js.
I am stuck trying to create the Gateway device for this project. I have successfully created non-gateway devices that can publish to the PubSub topic, but have been having a difficult time with the gateway.
- My actions are:
I have used this mos command to create the non-gateway devices:
mos gcp-iot-setup --gcp-project YOUR_PROJECT_ID --gcp-region europe-west1 --gcp-registry iot-registry
This command is described in Mongoose OS Documentation, but I am having a hard time finding documentation about creating a gateway with a similar command.
I know how to create a Gateway device using the Google Cloud IoT Core console and gcloud commands, but when it comes to making my particular Mongoose OS device a gateway I am lost.
- The result I see is:
This approach only creates non-gateway devices.
- My expectation & question is:
Is there a way to create a gateway using similar “mos gcp-iot-setup…” commands? Is there another approach I can use? Currently a CS student so my apologies if this is trivial.
Google Cloud IoT Core documentation explains how to create a gateway, but I’m not really sure how to incorporate this with my ESP32 with Mongoose OS. It seems like it is possible to create a script to do this, but I don’t know how to run a script on my device with MongooseOS on it.
Lastly, there is an approach that uses a RaspberryPi instead of the ESP32, perhaps that will be necessary…