Closed tmigone closed 4 years ago
@tomasmigone Thanks for the input! You also need to add the prefix to the NodeJS Script (index.js) in order to successfully publish messages for this device.
New line should read:
const deviceId = 'balena-' + process.env.RESIN_DEVICE_UUID;
Addressed in PR #4
It seems like IoT Core no longer accepts device ID's that start with a number, only letters. Solved it by adding a prefix to the DEVICE_UUID on line 43.
gcloud iot devices create 'balena-'$RESIN_DEVICE_UUID \ --project=$GOOGLE_IOT_PROJECT \ --region=$GOOGLE_IOT_REGION \ --registry=$GOOGLE_IOT_REGISTRY \ --public-key path=rsa-cert.pem,type=rs256