Google Cloud IOT

Has anyone got a project working posting data to Google Cloud Platform through Pub/Sub or Cloud IOT?
Is the info here still up-to-date for OAuth-2.0 - an Amazon (as well as Google) account is needed for signatures? Any idea of the costs involved?
At the moment, I’m posting data to google sheets, which is simple, but not very scalable. So I’m looking for a solution that is more scalable, but not too difficult for a single person to get a system going.

Yes, there’s actually a library for this here: https://developer.electricimp.com/libraries/utilities/googlepubsub

The big gotcha right now is that we don’t have RS256 in the agents, so the JWT auth requires you to use AWS lambda which provides the crypto necessary to get tokens.

RS256 is however in development, so when that’s available it’ll be a totally google only solution.

1 Like

Great, I’ve tried the updated pubsub library and have data going in fine now.

Is the library compatible with Cloud IOT core (as the cloud interface instead of directly going to pubsub)? As far as I understand, this requires a per-device public/private key, as opposed to going directly to pubsub which uses a service account private key?

Oh, I should have updated this post… RS256 is now deployed, so the latest pubsub library is totally self-contained.

The library is just for pubsub; imp agents really provide more functionality/flexibility than IoT core does with its device state concept, but there are uses for it so we’re looking at a library for that too.

Great, thanks Hugo. I might keep using the PubSub library and delay trying to work up an IoT Core interface myself then. Having all the device management, logging, error reporting etc all managed in GCP using IoT Core will be nice when it’s ready.