could you please anybody help me with how to send GCP live data to Losant application.
Hello @Nagarjuna_Reddy,
Welcome to the Losant Forums, we’re happy to have you!
Would you be able to provide a little more context on your use case? From the looks of your question, it seems as if you are trying to get data from GCP to Losant, is that correct?
What type of data? From what service are you trying to send your data?
Any additional information you can provide will definitely help me give you better instruction and point you in the right direction.
Thank you,
Heath
i am just trying to send some static data using pub sub method.
Ex: when I publish some data in GCP immediately that data should come to Losant also?
I am assuming you are using a GCP Pub/Sub Integration in your Losant Application. From there, you will need to create an Application Workflow with an MQTT Trigger set to the Pub/Sub integration.
With this setup, the workflow will fire for messages received on any topic configured through the integration. From there you can do any sort of data manipulation you need to do with other nodes, and then you can save that data as Device State for a device in Losant with a Device: State Output Node.
Let me know if this helps or if need any more explanation.
Heath
I mentioned the MQTT trigger for the Pub/Sub integration, which is the incorrect trigger to use in this case. You should instead use the GCP Pub/Sub trigger.
We also have a great blog post that covers this exact thing.
Thank you,
Heath
i have followed same thing what you said, but I haven’t received any data from GCP cloud after publish the data?
Hello @Nagarjuna_Reddy,
In the top right of your first screenshot, it looks like your integration is not connected, indicated by the red Plug with a slash through it.
Once your connection is established, your workflow should fire as intended.
Thank you,
Heath
In order for it to connect, make sure your topic name matches. You show your subscription, but you don’t show our GCP topic setting. The leaf name needs to be the same as you configure on the Losant side. We learned that recently ourselves.
Most likely the service account you set up in Google Cloud most likely does not have the necessary permissions applied to it to establish a connection to your PubSub service.
The blog post that @Heath suggested in an earlier reply also touches on this. I recommend checking that out if you have not done so already.